Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local _ENV = getfenv() or _ENV
- local a,b,c,d,e,f,g,h,i = game, "LocalPlayer", "HumanoidRootPart", "Particles", "MeshPart", "Humanoid", "WalkSpeed", "Auto Grab Toggle", "Made by ScriptBox"
- local p = a:GetService("Players")[b]
- local s = Instance.new("ScreenGui", p:WaitForChild("PlayerGui"))
- s.ResetOnSpawn = false
- s.Name = "UI_"..math.random(1000,9999)
- local m = Instance.new("Frame", s)
- m.Size = UDim2.new(0,220,0,170)
- m.Position = UDim2.new(0,100,0,100)
- m.BackgroundColor3 = Color3.fromRGB(25,25,25)
- m.Active = true
- m.Draggable = true
- local t = Instance.new("TextLabel", m)
- t.Size = UDim2.new(1, 0, 0, 30)
- t.Text = h
- t.TextColor3 = Color3.new(1,1,1)
- t.BackgroundTransparency = 1
- t.Font = Enum.Font.SourceSansBold
- t.TextSize = 20
- local u = Instance.new("TextButton", m)
- u.Size = UDim2.new(0,180,0,40)
- u.Position = UDim2.new(0,20,0,35)
- u.Text = "Grab: OFF"
- u.BackgroundColor3 = Color3.fromRGB(100,0,0)
- u.TextColor3 = Color3.new(1,1,1)
- u.Font = Enum.Font.SourceSansBold
- u.TextSize = 18
- local x = Instance.new("TextBox", m)
- x.Size = UDim2.new(0,180,0,30)
- x.Position = UDim2.new(0,20,0,85)
- x.PlaceholderText = "Enter Speed"
- x.Text = "16"
- x.BackgroundColor3 = Color3.fromRGB(35,35,35)
- x.TextColor3 = Color3.new(1,1,1)
- x.Font = Enum.Font.SourceSans
- x.TextSize = 16
- local cr = Instance.new("TextLabel", m)
- cr.Size = UDim2.new(1,0,0,30)
- cr.Position = UDim2.new(0,0,0,130)
- cr.Text = i
- cr.TextColor3 = Color3.fromRGB(200,200,200)
- cr.BackgroundTransparency = 1
- cr.Font = Enum.Font.SourceSans
- cr.TextSize = 16
- local q, j, k = false, false, 0.15
- local l = 5
- local y = tonumber(x.Text) or 16
- local function getHRP()
- local ch = p.Character
- return ch and ch:FindFirstChild(c)
- end
- local function run()
- if j then return end
- j = true
- while q do
- local hrp = getHRP()
- if not hrp then task.wait(0.5) continue end
- local F = workspace:FindFirstChild(d)
- if not F then task.wait(0.5) continue end
- for _,v in pairs(F:GetChildren()) do
- if not q then break end
- if v:IsA(e) and v:IsDescendantOf(workspace) then
- if (v.Position - hrp.Position).Magnitude > l then
- v.CFrame = CFrame.new(hrp.Position + Vector3.new(math.random(-2,2), 1, math.random(-2,2)))
- end
- end
- task.wait(k)
- end
- task.wait(0.3)
- end
- j = false
- end
- u.MouseButton1Click:Connect(function()
- q = not q
- u.Text = q and "Grab: ON" or "Grab: OFF"
- u.BackgroundColor3 = q and Color3.fromRGB(0,150,0) or Color3.fromRGB(100,0,0)
- if q then run() end
- end)
- x.FocusLost:Connect(function()
- local n = tonumber(x.Text)
- if n then
- y = n
- local h = p.Character and p.Character:FindFirstChildOfClass(f)
- if h then h[g] = y end
- end
- end)
- p.CharacterAdded:Connect(function(ch)
- ch:WaitForChild(c)
- local h = ch:WaitForChild(f)
- h[g] = y
- if q then run() end
- end)
- task.wait(1)
- local h = p.Character and p.Character:FindFirstChildOfClass(f)
- if h then h[g] = y end
Advertisement
Add Comment
Please, Sign In to add comment