Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game.Players.LocalPlayer
- wait(0.5)
- local char = plr.Character
- local hum = char:WaitForChild('Humanoid')
- local mouse = plr:GetMouse()
- local canwater = true
- local fl = true
- local wateref = "rbxassetid://370220441"
- local isdown = false
- mouse.KeyDown:Connect(function(key)
- if key == 'f' then
- do
- if plr.Character and plr.Character.Humanoid.Health > 0 and mouse.Target ~= nil then
- local a = Instance.new("Attachment", char['Right Arm'])
- canwater = false
- fl = false
- local marker = Instance.new('Part')
- local pt = Instance.new("Attachment", marker)
- local ef = script.water:Clone()
- ef.Parent = marker
- marker.Transparency = 1
- marker.Size = Vector3.new(0.2, 0.2, 0.2)
- marker.Anchored = true
- marker.CanCollide = false
- marker.Parent = game.Workspace.CurrentCamera
- pt.Axis = Vector3.new(0, 1, 0)
- pt.SecondaryAxis = Vector3.new(-1, 0, 0)
- isdown = true
- marker.CFrame = mouse.Hit
- while isdown == true do
- local remote = game.ReplicatedStorage.waterdam
- local damage = 20
- marker.Touched:Connect(function(hit)
- if hit.Name == "Head" or "Torso" or "Right Arm" or "Left Arm" or "Left Leg" or "Right Leg" then
- remote:FireServer('damage', marker)
- end
- end)
- mouse.KeyUp:Connect(function(key)
- if key == 'f' and fl == true then
- isdown = false
- fl = false
- marker:Destroy()
- ef:Destroy()
- pt:Destroy()
- wait(3)
- canwater = true
- else
- isdown = false
- fl = true
- marker:Destroy()
- ef:Destroy()
- pt:Destroy()
- canwater = true
- end
- end)
- end
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment