Filipono120

[Roblox] Extingusher Script

Oct 15th, 2020
1,712
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Extingusher script
  2. --Written by filipono120 studios
  3.  
  4. --Converted with ttyyuu12345's model to script plugin v4
  5. function sandbox(var,func)
  6.     local env = getfenv(func)
  7.     local newenv = setmetatable({},{
  8.         __index = function(self,k)
  9.             if k=="script" then
  10.                 return var
  11.             else
  12.                 return env[k]
  13.             end
  14.         end,
  15.     })
  16.     setfenv(func,newenv)
  17.     return func
  18. end
  19.  
  20. local plr = game.Players.LocalPlayer
  21. local mouse = plr:GetMouse()
  22. local backpack = plr.Backpack
  23. local char = plr.Character
  24.  
  25. local debris = game:GetService("Debris")
  26.  
  27. local equipped = nil;
  28. local click = nil;
  29.  
  30. cors = {}
  31. mas = Instance.new("Model",game:GetService("Lighting"))
  32. Tool0 = Instance.new("Tool")
  33. Part1 = Instance.new("Part")
  34. SpecialMesh2 = Instance.new("SpecialMesh")
  35. Tool0.Name = "Extinguisher"
  36. Tool0.Parent = mas
  37. Part1.Name = "Handle"
  38. Part1.Parent = Tool0
  39. Part1.CFrame = CFrame.new(0, 4.30000067, -0.0500000007, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  40. Part1.Position = Vector3.new(0, 4.30000067, -0.0500000007)
  41. Part1.Size = Vector3.new(0.495000005, 1.02800012, 0.55399996)
  42. Part1.BottomSurface = Enum.SurfaceType.Smooth
  43. Part1.TopSurface = Enum.SurfaceType.Smooth
  44. SpecialMesh2.Parent = Part1
  45. SpecialMesh2.MeshId = "rbxassetid://433101886"
  46. SpecialMesh2.Scale = Vector3.new(0.200000003, 0.167426735, 0.169418961)
  47. SpecialMesh2.TextureId = "rbxassetid://433101903"
  48. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  49. for i,v in pairs(mas:GetChildren()) do
  50.     v.Parent = game:GetService("Players").LocalPlayer.Backpack
  51.     pcall(function() v:MakeJoints() end)
  52. end
  53. mas:Destroy()
  54. for i,v in pairs(cors) do
  55.     spawn(function()
  56.         pcall(v)
  57.     end)
  58. end
  59.  
  60. Tool0.Equipped:Connect(function()
  61.     equipped = true;
  62. end)
  63.  
  64. Tool0.Unequipped:Connect(function()
  65.     equipped = false;
  66. end)
  67.  
  68. mouse.Button1Down:Connect(function()
  69.     if equipped == true then
  70.         click = true;
  71.         while click == true do
  72.             game:GetService("RunService").Heartbeat:Wait()
  73.             local randomSize = math.random(.5, 1.9)
  74.             local part = Instance.new("Part", workspace)
  75.             part.Shape = Enum.PartType.Ball
  76.             part.Size = Vector3.new(randomSize, randomSize, randomSize)
  77.             part.BrickColor = BrickColor.new("Institutional white")
  78.             part.Transparency = 0.661
  79.             part.TopSurface = Enum.SurfaceType.Smooth
  80.             part.BottomSurface = Enum.SurfaceType.Smooth
  81.             part.CFrame = CFrame.new(Part1.CFrame.X, Part1.CFrame.Y + .3, Part1.CFrame.Z)
  82.             local Body = Instance.new("BodyVelocity", part)
  83.             Body.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  84.             Body.P = 1000
  85.             Body.Velocity = Vector3.new(Part1.CFrame.LookVector.X * 100, Part1.CFrame.LookVector.Y, Part1.CFrame.LookVector.Z * 100)
  86.             debris:AddItem(Body, .223)
  87.             debris:AddItem(part, 2.5)
  88.         end
  89.     end
  90. end)
  91.  
  92. mouse.Button1Up:Connect(function()
  93.     if equipped == true then
  94.         click = false
  95.     end
  96. end)
RAW Paste Data