Guest User

scri

a guest
Mar 23rd, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. local plr = game.Players.LocalPlayer
  2. wait(0.5)
  3. local char = plr.Character
  4. local hum = char:WaitForChild('Humanoid')
  5. local mouse = plr:GetMouse()
  6. local canwater = true
  7. local fl = true
  8. local wateref = "rbxassetid://370220441"
  9. local isdown = false
  10.  
  11.  
  12. mouse.KeyDown:Connect(function(key)
  13. if key == 'f' then
  14. do
  15. if plr.Character and plr.Character.Humanoid.Health > 0 and mouse.Target ~= nil then
  16. local a = Instance.new("Attachment", char['Right Arm'])
  17. canwater = false
  18. fl = false
  19. local marker = Instance.new('Part')
  20. local pt = Instance.new("Attachment", marker)
  21. local ef = script.water:Clone()
  22. ef.Parent = marker
  23. marker.Transparency = 1
  24. marker.Size = Vector3.new(0.2, 0.2, 0.2)
  25. marker.Anchored = true
  26. marker.CanCollide = false
  27. marker.Parent = game.Workspace.CurrentCamera
  28. pt.Axis = Vector3.new(0, 1, 0)
  29. pt.SecondaryAxis = Vector3.new(-1, 0, 0)
  30. isdown = true
  31. marker.CFrame = mouse.Hit
  32.  
  33. while isdown == true do
  34. local remote = game.ReplicatedStorage.waterdam
  35. local damage = 20
  36. marker.Touched:Connect(function(hit)
  37. if hit.Name == "Head" or "Torso" or "Right Arm" or "Left Arm" or "Left Leg" or "Right Leg" then
  38. remote:FireServer('damage', marker)
  39. end
  40. end)
  41. mouse.KeyUp:Connect(function(key)
  42. if key == 'f' and fl == true then
  43. isdown = false
  44. fl = false
  45. marker:Destroy()
  46. ef:Destroy()
  47. pt:Destroy()
  48. wait(3)
  49. canwater = true
  50. else
  51. isdown = false
  52. fl = true
  53. marker:Destroy()
  54. ef:Destroy()
  55. pt:Destroy()
  56. canwater = true
  57. end
  58.  
  59. end)
  60. end
  61. end
  62. end
  63. end
  64. end)
Advertisement
Add Comment
Please, Sign In to add comment