Guest User

Untitled

a guest
May 18th, 2018
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. skatedamage = false
  2.  
  3.  
  4. local player = game.Players:FindFirstChild(script.Parent.Player.Value)
  5. local character = player.Character
  6. if not character or not character.Parent then
  7. character = player.CharacterAdded:wait()
  8. end
  9.  
  10. game.Workspace:WaitForChild(character.Name)
  11. hitvalue = false
  12.  
  13. local list = {}
  14. table.insert(list, "Spooky")
  15.  
  16. script.Parent.Touched:connect(function(hit)
  17. if skatedamage == false then
  18. local ehum = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
  19. print(ehum.Parent)
  20. skatedamage = true
  21.  
  22. if ehum and ehum ~= character.Humanoid then
  23. stringvalue = ehum.Parent.Name
  24. hitvalue = false
  25. for owo = 1,#list do
  26. if list[owo] == stringvalue then
  27. print("Hit Before")
  28. print(list[owo].."owo")
  29. hitvalue = true
  30. end
  31. end
  32. if hitvalue == false then
  33. table.insert(list, stringvalue)
  34. ehum:TakeDamage(30)
  35. ehum.Sit = true
  36. local vel = CFrame.new(ehum.Parent.HumanoidRootPart.Position,character.HumanoidRootPart.Position).lookVector
  37.  
  38. ehum.Parent.Head.Velocity = vel * math.random(100, 200) * -1
  39. end
  40. skateboydamage = coroutine.wrap(seriously)
  41. skateboydamage()
  42. end
  43. end
  44. end)
  45.  
  46. function seriously()
  47. wait(0.1)
  48. skatedamage = false
  49. end
Advertisement
Add Comment
Please, Sign In to add comment