Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---you could modify or edit this script as you own script that is better
- ---reset you character if you want it to stop
- local player = game.Players.LocalPlayer
- local service = game:GetService("Players")
- local isTeleporting = false
- function teleportRandomly()
- while isTeleporting do
- for _, otherPlayer in ipairs(service:GetPlayers()) do
- if otherPlayer ~= player then
- local character = otherPlayer.Character
- if character and character:FindFirstChild("HumanoidRootPart") then
- local humanoidRootPart = character.HumanoidRootPart
- local randomPosition = humanoidRootPart.Position + Vector3.new(math.random(-10, 10), 0, math.random(-10, 10))
- player.Character.HumanoidRootPart.CFrame = CFrame.new(randomPosition)
- wait(1) -- Adjust the wait time as needed
- end
- end
- end
- wait(0.1) -- Adjust the wait time as needed
- end
- end
- game:GetService("UserInputService").InputBegan:Connect(function(input)
- if input.KeyCode == Enum.KeyCode.V then
- isTeleporting = not isTeleporting -- Toggle teleporting
- if isTeleporting then
- teleportRandomly()
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement