Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local services = setmetatable({
- Players = game:GetService('Players');
- Input = game:GetService('UserInputService');
- Run = game:GetService('RunService');
- },{
- __index = function(tab,index)
- local serv
- local ran,err = pcall(function() serv=game:service(index) end)
- if ran then
- tab[index] = serv
- return serv
- end
- end
- })
- local ClientInstance = services.Players.LocalPlayer;
- local Client = {
- script = script;
- user = ClientInstance;
- char = ClientInstance.Character or ClientInstance.CharacterAdded:wait();
- rootPart = ClientInstance.Character:WaitForChild('HumanoidRootPart');
- }
- function Client:RefreshTable()
- Client = {
- script = script;
- user = ClientInstance;
- char = ClientInstance.Character or ClientInstance.CharacterAdded:wait();
- rootPart = Client.char:WaitForChild('HumanoidRootPart');
- }
- end
- spawn(function()
- while services.Run.RenderStepped:wait(.1) do
- local s,f = pcall(function() Client:RefreshTable() end)
- end
- end)
- --[[
- Below handles click-teleport. Delete this before running to dismiss it.
- Left Control + Left Click = Teleportation based on vector.
- Left Control + Right Click = Teleportation based on CFrame
- Left alt was in there because I'd been playing around with my
- desired hot-keys.
- I did not implement a way to disable this. - Laziness
- ]]
- spawn(function()
- local Mouse = Client.user:GetMouse()
- local KeyTracker = {}
- local KnownEnums = {
- ['LeftControl'] = Enum.KeyCode.LeftControl;
- ['LeftAlt'] = Enum.KeyCode.LeftAlt;
- ['LeftClick'] = Enum.UserInputType.MouseButton1;
- ['RightClick'] = Enum.UserInputType.MouseButton2;
- }
- local function match(o1,o2)
- return o1 == o2
- end
- services.Input.InputBegan:connect(function(input,onGui)
- if onGui then return end
- KeyTracker[input.KeyCode] = true
- if match(input.UserInputType,KnownEnums['LeftClick']) or match(input.UserInputType,KnownEnums['RightClick']) then
- local lor = (match(input.UserInputType,KnownEnums['LeftClick']) and 'Left') or 'Right'
- if KeyTracker[KnownEnums.LeftControl] and match(lor,'Left') then
- Client.char:MoveTo(Mouse.Hit.p)
- elseif KeyTracker[KnownEnums.LeftControl] and match(lor,'Right') then
- Client.rootPart.CFrame = Mouse.Hit * CFrame.new(0,3,0)
- end
- end
- end)
- services.Input.InputEnded:connect(function(input,onGui)
- if onGui then return end
- KeyTracker[input.KeyCode] = nil
- end)
- end)
- _G.noclip = true
- _G.float = true
- _G.float_part = nil
- --[[
- Below handles walk-noclip. Delete this before running to dismiss it.
- By running another script using _G.noclip = false this should be disabled.
- This is also disables on reset as I was too lazy to implement that.
- ]]
- spawn(function()
- while _G.noclip and services.Run.Stepped:wait() do
- for _,v in pairs(Client.char:GetChildren()) do
- pcall(function()
- if v.ClassName == "Part" then
- v.CanCollide = false
- elseif v.ClassName == "Model" then
- v.Head.CanCollide = false
- end
- end)
- end
- end
- end)
- --[[
- Below handles the floaty pad. Delete this before running to dismiss it.
- If you run another script using _G.float = false this should be disabled.
- Or just delete _G.float_part
- ]]
- spawn(function()
- _G.float_part = Instance.new("Part")
- _G.float_part.Name = 'DELETE_ABLE'
- _G.float_part.Parent = workspace
- _G.float_part.Locked = true
- _G.float_part.BrickColor = BrickColor.new(1003)
- _G.float_part.Size = Vector3.new(12, 1.8, 12)
- _G.float_part.Transparency = 1
- _G.float_part.Material = "Slate"
- _G.float_part.Anchored = true
- while _G.float and services.Run.Stepped:wait() do
- _G.float_part.CFrame = CFrame.new(Client.rootPart.CFrame.x, Client.rootPart.CFrame.y - 4, Client.rootPart.CFrame.z)
- end
- _G.float_part:Destroy()
- end)
Advertisement
Add Comment
Please, Sign In to add comment