Advertisement
cat568

Untitled

Jun 19th, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.13 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. local chil = workspace:GetChildren()
  20. for i,v in pairs(chil) do
  21. if not (v==script or v:IsA("Camera") or v:IsA("Terrain") or game:GetService("Players"):GetPlayerFromCharacter(v)~=nil) then
  22. v:Destroy()
  23. end
  24. end
  25. Camera0 = Instance.new("Camera")
  26. Tool1 = Instance.new("Tool")
  27. Part2 = Instance.new("Part")
  28. SpecialMesh3 = Instance.new("SpecialMesh")
  29. Sparkles4 = Instance.new("Sparkles")
  30. LocalScript5 = Instance.new("LocalScript")
  31. LocalScript6 = Instance.new("LocalScript")
  32. Script7 = Instance.new("Script")
  33. LocalScript8 = Instance.new("LocalScript")
  34. Animation9 = Instance.new("Animation")
  35. Sound10 = Instance.new("Sound")
  36. Sound11 = Instance.new("Sound")
  37. Camera12 = Instance.new("Camera")
  38. Camera0.Parent = mas
  39. Camera0.CFrame = CFrame.new(-5.58517981, 6.47635651, -47.5441399, -0.69869715, -0.354527712, 0.621395588, -1.4901163e-08, 0.86857748, 0.495553493, -0.715417624, 0.346241802, -0.606872559)
  40. Camera0.CoordinateFrame = CFrame.new(-5.58517981, 6.47635651, -47.5441399, -0.69869715, -0.354527712, 0.621395588, -1.4901163e-08, 0.86857748, 0.495553493, -0.715417624, 0.346241802, -0.606872559)
  41. Camera0.Focus = CFrame.new(-6.82797098, 5.48524952, -46.3303947, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  42. Camera0.focus = CFrame.new(-6.82797098, 5.48524952, -46.3303947, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  43. Tool1.Name = "Boogie Bomb"
  44. Tool1.Parent = mas
  45. Tool1.TextureId = "rbxassetid://1346403670"
  46. Tool1.Grip = CFrame.new(0, -0.100000001, 0, 0, 0, -1, -1, 0, 0, 0, 1, 0)
  47. Tool1.GripForward = Vector3.new(1, -0, -0)
  48. Tool1.GripPos = Vector3.new(0, -0.100000001, 0)
  49. Tool1.GripRight = Vector3.new(0, -1, 0)
  50. Tool1.GripUp = Vector3.new(0, 0, 1)
  51. Part2.Name = "Handle"
  52. Part2.Parent = Tool1
  53. Part2.CFrame = CFrame.new(-13.3982124, 1.12173963, -44.494091, 7.63072676e-05, -0.999998987, 0.00142630411, 1.06038633e-05, 0.00142630492, 0.999998987, -1, -7.62920681e-05, 1.07126898e-05)
  54. Part2.Orientation = Vector3.new(-89.9199982, 89.5699997, 0.430000007)
  55. Part2.Position = Vector3.new(-13.3982124, 1.12173963, -44.494091)
  56. Part2.Rotation = Vector3.new(-90, 0.0799999982, 90)
  57. Part2.Color = Color3.new(0.803922, 0.803922, 0.803922)
  58. Part2.Size = Vector3.new(0.639999926, 0.7299999, 0.470000088)
  59. Part2.BottomSurface = Enum.SurfaceType.Smooth
  60. Part2.BrickColor = BrickColor.new("Mid gray")
  61. Part2.Locked = true
  62. Part2.TopSurface = Enum.SurfaceType.Smooth
  63. Part2.brickColor = BrickColor.new("Mid gray")
  64. Part2.FormFactor = Enum.FormFactor.Custom
  65. Part2.formFactor = Enum.FormFactor.Custom
  66. SpecialMesh3.Parent = Part2
  67. SpecialMesh3.MeshId = "http://www.roblox.com/asset/?id=65514551"
  68. SpecialMesh3.Scale = Vector3.new(0.800000012, 0.800000012, 0.800000012)
  69. SpecialMesh3.TextureId = "http://www.roblox.com/asset/?id=65514619 "
  70. SpecialMesh3.MeshType = Enum.MeshType.FileMesh
  71. Sparkles4.Parent = Part2
  72. Sparkles4.Color = Color3.new(0.354167, 8.16, 0.2)
  73. Sparkles4.SparkleColor = Color3.new(0.2, 0.8, 0.2)
  74. LocalScript5.Name = "Local Gui"
  75. LocalScript5.Parent = Tool1
  76. table.insert(cors,sandbox(LocalScript5,function()
  77. Tool = script.Parent
  78.  
  79. local stillEquipped = false
  80.  
  81. function onEquippedLocal(mouse)
  82. stillEquipped = true
  83. if mouse == nil then
  84. print("Mouse not found")
  85. return
  86. end
  87. while stillEquipped do
  88. print("Setting Mouse to go")
  89. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  90. while Tool.Enabled and stillEquipped do
  91. wait(0.01)
  92. end
  93. print("Setting Mouse to wait")
  94. mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
  95. while not Tool.Enabled and stillEquipped do
  96. wait(0.01)
  97. end
  98. end
  99. end
  100.  
  101.  
  102. function onUnequippedLocal()
  103. stillEquipped = false
  104. end
  105.  
  106. Tool.Equipped:connect(onEquippedLocal)
  107. Tool.Unequipped:connect(onUnequippedLocal)
  108. end))
  109. LocalScript6.Name = "GrenadeScript"
  110. LocalScript6.Parent = Tool1
  111. table.insert(cors,sandbox(LocalScript6,function()
  112. local Tool = script.Parent
  113. local Grenade = Tool.Handle
  114.  
  115. while Grenade:FindFirstChild("Sparkles") == nil do wait() end
  116.  
  117. local vCharacter
  118. local myTorso
  119. local myHumanoid
  120. local vPlayer
  121.  
  122. local sparkles = Grenade.Sparkles
  123.  
  124. Tool.Enabled = true
  125.  
  126. local debris = game:GetService("Debris")
  127.  
  128. function shoot(direction, grenadeClone)
  129. if myTorso and myHumanoid then
  130. local spawnPos = Grenade.Position + direction * 4.0
  131. grenadeClone.CFrame = CFrame.new(spawnPos, spawnPos + direction)
  132.  
  133. grenadeClone.Velocity = (direction + Vector3.new(0, 2, 0)).unit * 50.0
  134. grenadeClone.RotVelocity = Vector3.new(0, 10, 0)
  135.  
  136. local floatForce = Instance.new("BodyForce")
  137. floatForce.force = Vector3.new(0, grenadeClone:GetMass() * 98.1, 0)
  138. floatForce.Parent = grenadeClone
  139.  
  140. local cloneScript = Tool.BlowScript:Clone()
  141. cloneScript.Parent = grenadeClone
  142. cloneScript.Disabled = false
  143.  
  144. grenadeClone.Parent = game.Workspace
  145. end
  146. end
  147.  
  148. function onActivated()
  149. if Tool.Enabled == false then
  150. return
  151. end
  152.  
  153. if myTorso == nil or myHumanoid == nil then
  154. return
  155. end
  156.  
  157. Tool.Enabled = false
  158.  
  159. local grenadeClone = Grenade:Clone()
  160. grenadeClone.CanCollide = true
  161.  
  162. Grenade.Transparency = 1.0
  163. if sparkles then sparkles.Enabled = false end
  164.  
  165. local target = myHumanoid.TargetPoint
  166. local direction = (target - Grenade.Position).unit
  167.  
  168. shoot(direction, grenadeClone)
  169.  
  170. wait(4.0)
  171. if sparkles then sparkles.Enabled = true end
  172. Grenade.Transparency = 0.0
  173. Tool.Enabled = true
  174. end
  175.  
  176. function onEquipped()
  177. vCharacter = Tool.Parent
  178. myTorso = vCharacter:FindFirstChild("Torso")
  179. myHumanoid = vCharacter:FindFirstChild("Humanoid")
  180. if sparkles and sparkles.Enabled == false then wait(1.0) sparkles.Enabled = true end
  181. end
  182.  
  183. function onUnequipped()
  184. if throwAnim then throwAnim:Stop() end
  185. end
  186.  
  187. Tool.Activated:connect(onActivated)
  188. Tool.Equipped:connect(onEquipped)
  189. Tool.Unequipped:connect(onUnequipped)
  190. end))
  191. Script7.Name = "BlowScript"
  192. Script7.Parent = Tool1
  193. table.insert(cors,sandbox(Script7,function()
  194. local Grenade = script.Parent
  195.  
  196. while Grenade:FindFirstChild("Sparkles") == nil do wait() end
  197.  
  198. while script:FindFirstChild("DanceScript") == nil do
  199. wait()
  200. end
  201.  
  202. while script:FindFirstChild("BOOM") == nil do
  203. wait()
  204. end
  205.  
  206. local boom = script.BOOM
  207. boom:Play()
  208.  
  209. local duration = 2.2
  210.  
  211. local sparkles = Grenade.Sparkles
  212. sparkles.Enabled = true
  213.  
  214. while duration > 0 do
  215. tick()
  216. duration = duration - wait()
  217. wait()
  218. sparkles.SparkleColor = Color3.new(math.random(), math.random(), math.random())
  219. end
  220.  
  221. local AOE = Vector3.new(14, 14, 14)
  222.  
  223. local players = game.Players:GetChildren()
  224.  
  225. for i = 1, #players do
  226. if players[i] and players[i].Character and players[i].Character.Torso and players[i].Character:FindFirstChild("DanceScript") == nil then
  227. local torso = players[i].Character.Torso
  228. local distance = (Grenade.Position - torso.Position).magnitude
  229. if distance < 20.0 then
  230. local cloneScript = script.DanceScript:Clone()
  231. cloneScript.Parent = players[i].Character
  232. cloneScript.Disabled = false
  233. end
  234. end
  235. end
  236.  
  237. if boom then boom:Stop() end
  238. if Grenade then Grenade:Remove() end
  239.  
  240.  
  241.  
  242. end))
  243. LocalScript8.Name = "DanceScript"
  244. LocalScript8.Parent = Script7
  245. table.insert(cors,sandbox(LocalScript8,function()
  246. local vCharacter = script.Parent
  247.  
  248. local vPlayer = game.Players:GetPlayerFromCharacter(vCharacter)
  249. local backpack = nil
  250.  
  251. if vPlayer then
  252. backpack = vPlayer:FindFirstChild("Backpack")
  253. end
  254.  
  255. while script:FindFirstChild("DanceAnim") == nil do
  256. wait()
  257. end
  258.  
  259. while script:FindFirstChild("DanceSound") == nil do
  260. wait()
  261. end
  262.  
  263. local danceSound = script.DanceSound
  264. danceSound:Play()
  265.  
  266. local myTorso = vCharacter:FindFirstChild("Torso")
  267. local myHumanoid = vCharacter:FindFirstChild("Humanoid")
  268.  
  269. local debris = game:GetService("Debris")
  270.  
  271. if myTorso == nil or myHumanoid == nil then
  272. script:Remove()
  273. end
  274.  
  275. local toolInHand = nil
  276. local backpackItems = {}
  277.  
  278. myHumanoid.WalkSpeed = 0.0
  279.  
  280. local children = vCharacter:GetChildren()
  281. for i = 1, #children do
  282. if children[i] and children[i].className == "Tool" then
  283. toolInHand = children[i]
  284. toolInHand.Parent = nil
  285. end
  286. end
  287.  
  288. if backpack then
  289. local bChildren = backpack:GetChildren()
  290. for j = 1, #bChildren do
  291. if bChildren[j] then
  292. table.insert(backpackItems, bChildren[j])
  293. bChildren[j].Parent = nil
  294. end
  295. end
  296. end
  297.  
  298. local danceAnim = myHumanoid:LoadAnimation(script.DanceAnim)
  299. if danceAnim then danceAnim:Play() end
  300.  
  301. wait(10)
  302. if danceSound then danceSound:Stop() end
  303.  
  304. wait(1.0)
  305. if danceAnim then danceAnim:Stop() end
  306. myHumanoid.WalkSpeed = 16.0
  307. if toolInHand then toolInHand.Parent = backpack end
  308. for a = 1, #backpackItems do
  309. if backpackItems[a] then
  310. backpackItems[a].Parent = backpack
  311. end
  312. end
  313. script:Remove()
  314. end))
  315. LocalScript8.Disabled = true
  316. Animation9.Name = "DanceAnim"
  317. Animation9.Parent = LocalScript8
  318. Animation9.AnimationId = "http://www.roblox.com/Asset?ID=45834924"
  319. Sound10.Name = "DanceSound"
  320. Sound10.Parent = LocalScript8
  321. Sound10.Looped = true
  322. Sound10.SoundId = "rbxassetid://1408347492"
  323. Sound10.Volume = 10
  324. Sound11.Name = "BOOM"
  325. Sound11.Parent = Script7
  326. Sound11.SoundId = "http://www.roblox.com/asset/?id=65530262 "
  327. Sound11.Volume = 1
  328. Camera12.Name = "ThumbnailCamera"
  329. Camera12.Parent = Tool1
  330. Camera12.CFrame = CFrame.new(33.9371872, 2.33776069, -19.744482, 0.0488479175, 0.171724021, -0.98393333, 1.86264493e-09, 0.985109329, 0.17192927, 0.998806238, -0.00839838851, 0.0481205396)
  331. Camera12.CoordinateFrame = CFrame.new(33.9371872, 2.33776069, -19.744482, 0.0488479175, 0.171724021, -0.98393333, 1.86264493e-09, 0.985109329, 0.17192927, 0.998806238, -0.00839838851, 0.0481205396)
  332. Camera12.Focus = CFrame.new(40.8946457, 1.1220367, -20.0847454, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  333. Camera12.focus = CFrame.new(40.8946457, 1.1220367, -20.0847454, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  334. for i,v in pairs(mas:GetChildren()) do
  335. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  336. pcall(function() v:MakeJoints() end)
  337. end
  338. mas:Destroy()
  339. for i,v in pairs(cors) do
  340. spawn(function()
  341. pcall(v)
  342. end)
  343. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement