Advertisement
KeroroGunso0

flashbang!!!

Feb 10th, 2016
360
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.70 KB | None | 0 0
  1. me = game.Players.KeroroGunso2016
  2.  
  3. if script.Parent.className ~= "HopperBin" then
  4. h = Instance.new("HopperBin",me.Backpack)
  5. h.Name = "Flashbang"
  6. script.Parent = h
  7. end
  8.  
  9. sp = script.Parent
  10.  
  11. gren = Instance.new("Part")
  12. gren.Parent = game.Lighting
  13. gren.formFactor = 0
  14. gren.Size = Vector3.new(1,2,1)
  15. gren.Anchored = false
  16. gren:BreakJoints()
  17. mes = Instance.new("SpecialMesh",gren)
  18. mes.MeshType = "FileMesh"
  19. mes.MeshId = "http://www.roblox.com/asset/?id=16975131"
  20. mes.Scale = Vector3.new(0.8,1,0.8)
  21.  
  22. rs = me.Character.Torso["Right Shoulder"]
  23. th = rs.C0
  24.  
  25. thrown = false
  26.  
  27. function sel(mouse)
  28. gren.Parent = me.Character
  29. weld = Instance.new("Weld")
  30. weld.Parent = me.Character["Right Arm"]
  31. weld.Part0 = weld.Parent
  32. weld.Part1 = gren
  33. weld.C1 = CFrame.fromEulerAnglesXYZ(-1.57,0,0) * CFrame.new(0,1,0)
  34. mouse.Button1Down:connect(function()
  35. if thrown == true then return end
  36. thrown = true
  37. for i=1, 7 do
  38. rs.C0 = rs.C0 * CFrame.fromEulerAnglesXYZ(0,0,0.6)
  39. wait()
  40. end
  41. wait(0.05)
  42. for i=1, 2 do
  43. rs.C0 = rs.C0 * CFrame.fromEulerAnglesXYZ(0,0,-0.6)
  44. wait()
  45. end
  46. gr = gren:clone()
  47. gr.Parent = workspace
  48. gr.CFrame = CFrame.new(gren.Position, mouse.Hit.p)
  49. bf = Instance.new("BodyForce")
  50. bf.Parent = gr
  51. bf.force = gr.CFrame.lookVector * 4000
  52. for i=1, 2 do
  53. rs.C0 = rs.C0 * CFrame.fromEulerAnglesXYZ(0,0,-0.6)
  54. wait()
  55. end
  56. rs.C0 = th
  57. bf:remove()
  58. wait(4)
  59. local eff = Instance.new("Part")
  60. eff.Parent = workspace
  61. eff.Shape = "Ball"
  62. eff.BrickColor = BrickColor.new("Institutional white")
  63. eff.Size = Vector3.new(2,2,2)
  64. eff.Anchored = true
  65. eff.CFrame = gr.CFrame
  66. local mgg = Instance.new("SpecialMesh")
  67. mgg.Parent = eff
  68. mgg.Scale = Vector3.new(1,1,1)
  69. mgg.MeshType = "Sphere"
  70. coroutine.resume(coroutine.create(function()
  71. for i=1, 15, 0.3 do
  72. wait()
  73. mgg.Scale = Vector3.new(i,i,i)
  74. eff.Transparency = eff.Transparency + 0.03
  75. end
  76. gr:remove()
  77. eff:remove()
  78. end))
  79. thrown = false
  80. plas = game.Players:GetChildren()
  81. for i = 1, #plas do
  82. if (gr.Position - plas[i].Character.Torso.Position).magnitude < 60 then
  83. local sc = Instance.new("ScreenGui")
  84. sc.Parent = plas[i].PlayerGui
  85. local fr = Instance.new("Frame")
  86. fr.Parent = sc
  87. fr.BackgroundColor3 = Color3.new(1,1,1)
  88. fr.BorderSizePixel = 0
  89. fr.Size = UDim2.new(1.2,0,1.2,0)
  90. fr.Position = UDim2.new(0,-20,0,-30)
  91. coroutine.resume(coroutine.create(function()
  92. for i = -4, 1, 0.05 do
  93. wait(0.04)
  94. fr.BackgroundTransparency = i
  95. end
  96. sc:remove()
  97. end))
  98. end
  99. end
  100. end)
  101. end
  102.  
  103. function desel()
  104. gren.Parent = game.Lighting
  105. end
  106.  
  107. sp.Selected:connect(sel)
  108. sp.Deselected:connect(desel)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement