-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProject LKB.lua
148 lines (126 loc) · 4.66 KB
/
Project LKB.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
--[[
WARNING: Heads up! This script has not been verified by ScriptBlox. Use at your own risk!
]]
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local LocalPlayer = Players.LocalPlayer
local Workspace = game:GetService("Workspace")
local angle = 1
local radius = 10
local blackHoleActive = false
local function setupPlayer()
local character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
local Folder = Instance.new("Folder", Workspace)
local Part = Instance.new("Part", Folder)
local Attachment1 = Instance.new("Attachment", Part)
Part.Anchored = true
Part.CanCollide = false
Part.Transparency = 1
return humanoidRootPart, Attachment1
end
local humanoidRootPart, Attachment1 = setupPlayer()
if not getgenv().Network then
getgenv().Network = {
BaseParts = {},
Velocity = Vector3.new(14.46262424, 14.46262424, 14.46262424)
}
Network.RetainPart = function(part)
if typeof(part) == "Instance" and part:IsA("BasePart") and part:IsDescendantOf(Workspace) then
table.insert(Network.BaseParts, part)
part.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
part.CanCollide = false
end
end
local function EnablePartControl()
LocalPlayer.ReplicationFocus = Workspace
RunService.Heartbeat:Connect(function()
sethiddenproperty(LocalPlayer, "SimulationRadius", math.huge)
for _, part in pairs(Network.BaseParts) do
if part:IsDescendantOf(Workspace) then
part.Velocity = Network.Velocity
end
end
end)
end
EnablePartControl()
end
local function ForcePart(v)
if v:IsA("Part") and not v.Anchored and not v.Parent:FindFirstChild("Humanoid") and not v.Parent:FindFirstChild("Head") and v.Name ~= "Handle" then
for _, x in next, v:GetChildren() do
if x:IsA("BodyAngularVelocity") or x:IsA("BodyForce") or x:IsA("BodyGyro") or x:IsA("BodyPosition") or x:IsA("BodyThrust") or x:IsA("BodyVelocity") or x:IsA("RocketPropulsion") then
x:Destroy()
end
end
if v:FindFirstChild("Attachment") then
v:FindFirstChild("Attachment"):Destroy()
end
if v:FindFirstChild("AlignPosition") then
v:FindFirstChild("AlignPosition"):Destroy()
end
if v:FindFirstChild("Torque") then
v:FindFirstChild("Torque"):Destroy()
end
v.CanCollide = false
local Torque = Instance.new("Torque", v)
Torque.Torque = Vector3.new(1000000, 1000000, 1000000)
local AlignPosition = Instance.new("AlignPosition", v)
local Attachment2 = Instance.new("Attachment", v)
Torque.Attachment0 = Attachment2
AlignPosition.MaxForce = math.huge
AlignPosition.MaxVelocity = math.huge
AlignPosition.Responsiveness = 500
AlignPosition.Attachment0 = Attachment2
AlignPosition.Attachment1 = Attachment1
end
end
local function toggleBlackHole()
blackHoleActive = not blackHoleActive
if blackHoleActive then
for _, v in next, Workspace:GetDescendants() do
ForcePart(v)
end
Workspace.DescendantAdded:Connect(function(v)
if blackHoleActive then
ForcePart(v)
end
end)
spawn(function()
while blackHoleActive and RunService.RenderStepped:Wait() do
angle = angle + math.rad(2)
local offsetX = math.cos(angle) * radius
local offsetZ = math.sin(angle) * radius
Attachment1.WorldCFrame = humanoidRootPart.CFrame * CFrame.new(offsetX, 0, offsetZ)
end
end)
else
Attachment1.WorldCFrame = CFrame.new(0, -1000, 0)
end
end
LocalPlayer.CharacterAdded:Connect(function()
humanoidRootPart, Attachment1 = setupPlayer()
if blackHoleActive then
toggleBlackHole()
end
end)
local library = loadstring(game:HttpGet("https://raw.githubusercontent.com/miroeramaa/TurtleLib/main/TurtleUiLib.lua"))()
local window = library:Window("Projeto LKB")
window:Slider("Radius Blackhole",1,100,10, function(Value)
radius = Value
end)
window:Toggle("Blackhole", true, function(Value)
if Value then
toggleBlackHole()
else
blackHoleActive = false
end
end)
spawn(function()
while true do
RunService.RenderStepped:Wait()
if blackHoleActive then
angle = angle + math.rad(angleSpeed)
end
end
end)
toggleBlackHole()