Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Keybinds
- -- F - Toggle
- -- R - UP
- -- Y - Down
- local toggled = false
- local goingup = false
- local goingdown = false
- local plr = game.Players.LocalPlayer
- local char = game.Workspace:WaitForChild(plr.Name)
- local plrY = char.HumanoidRootPart.Position.Y
- plr:GetMouse().KeyDown:Connect(function(key)
- if key == "f" then
- print("toggled")
- if toggled == false then
- toggled = true
- part.Transparency = 0.5
- part.CanCollide = true
- plrY = char.HumanoidRootPart.Position.Y
- else
- toggled = false
- part.Transparency = 1
- part.CanCollide = false
- end
- end
- if key == "r" then
- --plrY = plrY + 1
- goingup = true
- end
- if key == "y" then
- --plrY = plrY - 1
- goingdown = true
- end
- end)
- plr:GetMouse().KeyUp:Connect(function(key)
- if key == "r" then
- goingup = false
- end
- if key == "y" then
- goingdown = false
- end
- end)
- part = Instance.new("Part")
- part.Parent = game.Workspace
- part.Name = "float"
- part.Size = Vector3.new(75, 1, 75)
- part.Anchored = true
- part.CanCollide = false
- part.Transparency = 0
- while true do
- if toggled == true then
- local plrPos = char.HumanoidRootPart.Position
- part.Position = Vector3.new(plrPos.X, plrY - 4, plrPos.Z)
- end
- if goingup == true then
- plrY = plrY + 0.5
- elseif goingdown == true then
- plrY = plrY - 0.5
- end
- wait()
- end
Advertisement
Add Comment
Please, Sign In to add comment