Advertisement
PotatoSaiyan

Untitled

May 27th, 2017
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 KB | None | 0 0
  1. --[[
  2. Rap God script by PotatoSaiyan.
  3. Press on someone to transform them into a rapper :)
  4. --]]
  5. explode = false -- if u want them to explode or not
  6. local countdown = 7 -- seconds before the explosion if u have it on
  7. plr = game.Players.LocalPlayer
  8. char = plr.Character
  9. hum = char.Humanoid
  10. tool = Instance.new("HopperBin", plr.Backpack)
  11. tool.Name = "Do da rap"
  12. mouse = plr:GetMouse()
  13. flyspeed = 2
  14.  
  15.  
  16. tool.Selected:connect(function()
  17. mouse.Button1Down:connect(function()
  18. if tool.Active == true and mouse.Target.Parent:FindFirstChild("Humanoid") or mouse.Target.Parent.Parent:FindFirstChild("Humanoid") or mouse.Target.Parent:FindFirstChild("Torso") then
  19. local torso = mouse.Target.Parent:FindFirstChild("Torso")
  20. local thum = torso.Parent:FindFirstChild("Humanoid")
  21. if thum ~= hum then
  22.  
  23. local humrootpart = torso.Parent:FindFirstChild("HumanoidRootPart")
  24. local bv = Instance.new("BodyVelocity")
  25. bv.MaxForce = Vector3.new(0,1e8,0)
  26. bv.Velocity = Vector3.new(flyspeed,flyspeed,flyspeed)
  27. bv.Parent = torso
  28.  
  29. local pe = Instance.new("ParticleEmitter", torso)
  30. pe.LightEmission = 1
  31. pe.Size = NumberSequence.new(0.5)
  32. pe.Lifetime = NumberRange.new(5,10)
  33. pe.Rate = 50
  34. pe.VelocitySpread = 45
  35. pe.Speed = NumberRange.new(10)
  36.  
  37. local Rap = Instance.new("Sound", torso)
  38. Rap.Volume = 5
  39. Rap.SoundId = "rbxassetid://657411321"
  40. Rap.TimePosition = 0
  41. Rap:Play()
  42. if explode == true then
  43. local ex = Instance.new("Sound", torso)
  44. ex.Volume = 1
  45. ex.SoundId = "rbxassetid://138186576"
  46. ex.TimePosition = 23.5
  47. ex:Play()
  48. for i = 1,countdown do
  49. tool.Name = "Exploding in " .. countdown - i .. "."
  50. wait(1)
  51. end
  52. tool.Name = "Do da rap // by PotatoSaiyan"
  53. local explosion = Instance.new("Explosion", torso)
  54. explosion.Position = torso.Position
  55. ex.TimePosition = 0.4
  56. ex:Play()
  57. Rap:Stop()
  58. torso.Parent:BreakJoints()
  59. pe:Destroy()
  60. end
  61. end
  62. end
  63. end)
  64. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement