Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local RunService = game:GetService("RunService")
- local GuiService = game:GetService("GuiService")
- local Players = game:GetService("Players")
- local LocalPlayer = Players.LocalPlayer
- local Pause = false
- local Origin
- RunService.RenderStepped:Connect(function()
- local Character = LocalPlayer.Character
- local RootPart = Character:FindFirstChild("HumanoidRootPart")
- if RootPart then
- if GuiService.MenuIsOpen then
- if not Origin then
- Origin = RootPart.CFrame
- end
- RootPart.AssemblyLinearVelocity = Vector3.new(0, 2147483648, 0)
- if not Pause then
- Pause = true
- end
- else
- if Pause then
- RootPart.AssemblyLinearVelocity = Vector3.zero
- if Origin then
- RootPart.CFrame = Origin
- end
- Origin = nil
- Pause = false
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment