MellonYt

Random

Jun 25th, 2018
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. local Part = Instance.new('Part')
  2. local Player = game:GetService('Players')
  3.  
  4. local Players = Player:GetChildren ()
  5. local Pick = 0
  6. local Roll = function ()
  7. Pick = math.random(1,#Players)
  8. end
  9. local FadeOut = function ()
  10. Part.Transparency =10
  11. wait(0.5)
  12. Part.Transparency =9
  13. wait(0.5)
  14. Part.Transparency =8
  15. wait(0.5)
  16. Part.Transparency =7
  17. wait(0.5)
  18. Part.Transparency =6
  19. wait(0.5)
  20. Part.Transparency =5
  21. wait(0.5)
  22. Part.Transparency =4
  23. wait(0.5)
  24. Part.Transparency =3
  25. wait(0.5)
  26. Part.Transparency =2
  27. wait(0.5)
  28. Part.Transparency =1
  29. wait(0.5)
  30. Part.Transparency =0
  31.  
  32. end
  33. function onKeyPress(inputObject, gameProcessedEvent)
  34. if inputObject.KeyCode == Enum.KeyCode.K then
  35. Part.Color = Color3.fromRGB(255, 0, 0)
  36. Part.Material = 'Neon'
  37. Part.Size=Vector3.new(10,10,10)
  38. Roll()
  39.  
  40. local FindPlayer = game.Workspace:WaitForChild(Players[Pick].Name)
  41. if FindPlayer.Name == 'sprite21112' then
  42. return
  43. end
  44. local Head = FindPlayer:WaitForChild ("Head")
  45. Part.Position = Vector3.new(Head.Position.X,Head.Position.Y,Head.Position.Z)
  46. FindPlayer:BreakJoints ()
  47. FindPlayer:Destroy ()
  48. FadeOut()
  49.  
  50. end
  51. end
  52.  
  53. game:GetService("UserInputService").InputBegan:connect(onKeyPress)
Advertisement
Add Comment
Please, Sign In to add comment