Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- waterlevel = 1 -- Water level, in terms of height
- repeat wait() until game.Players.LocalPlayer.Character ~= nil
- local char = game.Players.LocalPlayer.Character
- function makeswim()
- if char:FindFirstChild("SwimForce") == nil then
- local bp = Instance.new("BodyPosition")
- bp.Name = "SwimForce"
- bp.maxForce = Vector3.new(0,85000,0)
- bp.position = Vector3.new(0,waterlevel + 3,0)
- bp.Parent = char.Torso
- end
- end
- makeswim()
- while true do
- if char.Torso.Position.Y < waterlevel then
- if char.Torso:FindFirstChild("SwimForce")==nil then
- makeswim()
- end
- else
- if char.Torso:FindFirstChild("SwimForce") then
- local c = char.Torso:GetChildren()
- for i = 1, #c do
- if c[i].Name == "SwimForce" then
- c[i]:Destroy()
- end
- end
- end
- end
- wait(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement