firebudgy

Untitled

May 1st, 2018
367
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.61 KB | None | 0 0
  1. --Converted with ttyyuu12345's model to script plugin v4
  2. function sandbox(var,func)
  3. local env = getfenv(func)
  4. local newenv = setmetatable({},{
  5. __index = function(self,k)
  6. if k=="script" then
  7. return var
  8. else
  9. return env[k]
  10. end
  11. end,
  12. })
  13. setfenv(func,newenv)
  14. return func
  15. end
  16. cors = {}
  17. mas = Instance.new("Model",game:GetService("Lighting"))
  18. Tool0 = Instance.new("Tool")
  19. Part1 = Instance.new("Part")
  20. SpotLight2 = Instance.new("SpotLight")
  21. PointLight3 = Instance.new("PointLight")
  22. SpecialMesh4 = Instance.new("SpecialMesh")
  23. LocalScript5 = Instance.new("LocalScript")
  24. NumberValue6 = Instance.new("NumberValue")
  25. StringValue7 = Instance.new("StringValue")
  26. BoolValue8 = Instance.new("BoolValue")
  27. ScreenGui9 = Instance.new("ScreenGui")
  28. TextButton10 = Instance.new("TextButton")
  29. TextButton11 = Instance.new("TextButton")
  30. Tool0.Name = "Multitool"
  31. Tool0.Parent = mas
  32. Tool0.GripForward = Vector3.new(-0, 0.99999994, -0)
  33. Tool0.GripPos = Vector3.new(0, -0.5, 0)
  34. Tool0.GripRight = Vector3.new(0, 0, 1)
  35. Tool0.GripUp = Vector3.new(-1, 0, 0)
  36. Part1.Name = "Handle"
  37. Part1.Parent = Tool0
  38. Part1.BrickColor = BrickColor.new("Gold")
  39. Part1.Rotation = Vector3.new(0, 0, -90)
  40. Part1.Size = Vector3.new(1, 1, 1)
  41. Part1.CFrame = CFrame.new(1.50000048, 0.499999762, -3.49999976, -9.2081666e-07, 1, 0, -1, -9.19381023e-07, -4.16625085e-07, -4.16830659e-07, -2.98023224e-08, 1)
  42. Part1.Color = Color3.new(0.937255, 0.721569, 0.219608)
  43. Part1.Position = Vector3.new(1.50000048, 0.499999762, -3.49999976)
  44. Part1.Orientation = Vector3.new(0, 0, -90)
  45. Part1.Color = Color3.new(0.937255, 0.721569, 0.219608)
  46. SpotLight2.Parent = Part1
  47. SpotLight2.Enabled = false
  48. SpotLight2.Brightness = 5
  49. SpotLight2.Range = 60
  50. SpotLight2.Angle = 120
  51. SpotLight2.Face = Enum.NormalId.Top
  52. PointLight3.Parent = Part1
  53. PointLight3.Enabled = false
  54. PointLight3.Brightness = 5
  55. PointLight3.Range = 12
  56. SpecialMesh4.Parent = Part1
  57. SpecialMesh4.MeshId = "rbxassetid://477898249"
  58. SpecialMesh4.Offset = Vector3.new(0, -1.79999995, 0)
  59. SpecialMesh4.Scale = Vector3.new(0.00200000009, 0.00150000001, 0.00499999989)
  60. SpecialMesh4.MeshType = Enum.MeshType.FileMesh
  61. SpecialMesh4.Scale = Vector3.new(0.00200000009, 0.00150000001, 0.00499999989)
  62. LocalScript5.Parent = Tool0
  63. table.insert(cors,sandbox(LocalScript5,function()
  64. local Player = game.Players.LocalPlayer
  65. local Mouse = Player:GetMouse()
  66. local Tool = script.Parent
  67. local Gui = script.Parent.MultiToolGui
  68. local Cooldown = 0
  69. local Active = 0
  70. local Equipped = 0
  71. local Dragger = Instance.new("Dragger")
  72.  
  73. Gui.ModeSwitch.MouseButton1Click:connect(function()
  74. if script.Parent.Mode.Value == "Mine" then
  75. script.Parent.Mode.Value = "Shield"
  76. Gui.ModeSwitch.Text = "MODE: SHIELD"
  77. elseif script.Parent.Mode.Value == "Shield" then
  78. script.Parent.Mode.Value = "Blade"
  79. Gui.ModeSwitch.Text = "MODE: BLADE"
  80. elseif script.Parent.Mode.Value == "Blade" then
  81. script.Parent.Mode.Value = "Move"
  82. Gui.ModeSwitch.Text = "MODE: MOVE"
  83. elseif script.Parent.Mode.Value == "Move" then
  84. script.Parent.Mode.Value = "Duplicate"
  85. Gui.ModeSwitch.Text = "MODE: CLONE"
  86. elseif script.Parent.Mode.Value == "Duplicate" then
  87. script.Parent.Mode.Value = "Delete"
  88. Gui.ModeSwitch.Text = "MODE: ERASE"
  89. elseif script.Parent.Mode.Value == "Delete" then
  90. script.Parent.Mode.Value = "Mine"
  91. Gui.ModeSwitch.Text = "MODE: MINE"
  92. end
  93. end)
  94.  
  95. Gui.FlashlightToggle.MouseButton1Click:connect(function()
  96. if Tool.Flashlight.Value == true then
  97. Tool.Flashlight.Value = false
  98. Tool.Handle.SpotLight.Enabled = false
  99. Tool.Handle.PointLight.Enabled = false
  100. Gui.FlashlightToggle.Text = "FLASHLIGHT: OFF"
  101. else
  102. Tool.Flashlight.Value = true
  103. Tool.Handle.SpotLight.Enabled = true
  104. Tool.Handle.PointLight.Enabled = true
  105. Gui.FlashlightToggle.Text = "FLASHLIGHT: ON"
  106. end
  107. end)
  108.  
  109. script.Parent.Equipped:connect(function()
  110. if Player.Character.Humanoid.Health > 0 then
  111. Gui.Parent = Player.PlayerGui
  112. Equipped = 1
  113. while Equipped == 1 do
  114. if Player.Character.Humanoid.Health <= 0 then
  115. Gui.Parent = script.Parent
  116. Equipped = 0
  117. Active = 0
  118. end
  119. wait()
  120. end
  121. end
  122. end)
  123.  
  124. script.Parent.Unequipped:connect(function()
  125. if Equipped == 1 then
  126. Gui.Parent = script.Parent
  127. Equipped = 0
  128. Active = 0
  129. end
  130. end)
  131.  
  132. script.Parent.Activated:connect(function()
  133. if Cooldown == 0 then
  134. Cooldown = 1
  135. Active = 1
  136. local selectednonlocked = 0
  137. if script.Parent.Mode.Value == "Move" then
  138. if Mouse.Target.Locked == false then
  139. selectednonlocked = 1
  140. Dragger:MouseDown(Mouse.Target,Mouse.Target.Position - Mouse.Hit.p,{Mouse.Target})
  141. end
  142. end
  143. while Active == 1 do
  144. local ray = Ray.new(Tool.Handle.CFrame.p, (Mouse.Hit.p - Tool.Handle.CFrame.p).unit * Tool.Range.Value)
  145. local part, endPoint = workspace:FindPartOnRay(ray, Tool.Parent)
  146. local beam = Instance.new("Part")
  147. beam.Parent = workspace
  148. beam.FormFactor = "Custom"
  149. beam.Material = "Neon"
  150. beam.Anchored = true
  151. beam.Locked = true
  152. if script.Parent.Mode.Value == "Mine" then
  153. beam.CanCollide = false
  154. beam.BrickColor = BrickColor.new("Teal")
  155. local distance = (Tool.Handle.CFrame.p - endPoint).magnitude
  156. beam.Size = Vector3.new(0.3, 0.3, distance)
  157. beam.CFrame = CFrame.new(Tool.Handle.CFrame.p, endPoint) * CFrame.new(0, 0, -distance / 2)
  158. workspace.Terrain:FillBall(Vector3.new(endPoint.X,endPoint.Y,endPoint.Z), 4 ,"Air")
  159. elseif script.Parent.Mode.Value == "Shield" then
  160. beam.CanCollide = true
  161. beam.BrickColor = BrickColor.new("Gold")
  162. local distance = (Tool.Handle.CFrame.p - endPoint).magnitude
  163. beam.Size = Vector3.new(5, 5, 0.2)
  164. beam.CFrame = CFrame.new(Tool.Handle.CFrame.p, endPoint) * CFrame.new(0, 0, -distance / 2)
  165. elseif script.Parent.Mode.Value == "Blade" then
  166. beam.CanCollide = false
  167. beam.BrickColor = BrickColor.new("Really red")
  168. beam.Size = Vector3.new(1, 3, 0.2)
  169. beam.CFrame = script.Parent.Handle.CFrame:toWorldSpace(CFrame.new(0,2,0))
  170. beam.Touched:connect(function(part)
  171. if part.Parent ~= Tool.Parent then
  172. if part.Parent:FindFirstChild("Humanoid") ~= nil then
  173. part.Parent.Humanoid:Destroy()
  174. end
  175. end
  176. end)
  177. elseif script.Parent.Mode.Value == "Move" then
  178. beam:Remove()
  179. if selectednonlocked == 1 then
  180. Dragger:MouseMove(Mouse.UnitRay)
  181. end
  182. elseif script.Parent.Mode.Value == "Duplicate" then
  183. beam:Remove()
  184. if Mouse.Target.Locked == false then
  185. local copy = Mouse.Target:Clone()
  186. copy.Parent = workspace
  187. copy.Position = Mouse.Target.Position+Vector3.new(0,copy.Size.Y,0)
  188. end
  189. Active = 0
  190. elseif script.Parent.Mode.Value == "Delete" then
  191. beam:Remove()
  192. if Mouse.Target.Locked == false then
  193. Mouse.Target:Remove()
  194. end
  195. Active = 0
  196. end
  197. wait()
  198. if beam ~= nil then
  199. beam:Remove()
  200. end
  201. end
  202. if selectednonlocked == 1 then
  203. Dragger:MouseUp()
  204. end
  205. wait()
  206. Cooldown = 0
  207. end
  208. end)
  209.  
  210. script.Parent.Deactivated:connect(function()
  211. Active = 0
  212. end)
  213.  
  214. Mouse.KeyDown:connect(function(Key)
  215. if Active == 1 and script.Parent.Mode.Value == "Move" then
  216. if Key == "r" then
  217. Dragger:AxisRotate("Z")
  218. elseif Key == "t" then
  219. Dragger:AxisRotate("X")
  220. elseif Key == "y" then
  221. Dragger:AxisRotate("Y")
  222. end
  223. end
  224. end)
  225.  
  226. end))
  227. NumberValue6.Name = "Range"
  228. NumberValue6.Parent = Tool0
  229. NumberValue6.Value = 10
  230. StringValue7.Name = "Mode"
  231. StringValue7.Parent = Tool0
  232. StringValue7.Value = "Mine"
  233. BoolValue8.Name = "Flashlight"
  234. BoolValue8.Parent = Tool0
  235. ScreenGui9.Name = "MultiToolGui"
  236. ScreenGui9.Parent = Tool0
  237. TextButton10.Name = "ModeSwitch"
  238. TextButton10.Parent = ScreenGui9
  239. TextButton10.Size = UDim2.new(0.200000003, 0, 0.0500000007, 0)
  240. TextButton10.Text = "MODE: MINING"
  241. TextButton10.Position = UDim2.new(0, 0, 0.600000024, 0)
  242. TextButton10.BackgroundColor3 = Color3.new(1, 1, 1)
  243. TextButton10.Font = Enum.Font.Arcade
  244. TextButton10.FontSize = Enum.FontSize.Size14
  245. TextButton10.TextScaled = true
  246. TextButton10.TextWrapped = true
  247. TextButton11.Name = "FlashlightToggle"
  248. TextButton11.Parent = ScreenGui9
  249. TextButton11.Size = UDim2.new(0.200000003, 0, 0.0500000007, 0)
  250. TextButton11.Text = "FLASHLIGHT: OFF"
  251. TextButton11.Position = UDim2.new(0, 0, 0.649999976, 0)
  252. TextButton11.BackgroundColor3 = Color3.new(1, 1, 1)
  253. TextButton11.Font = Enum.Font.Arcade
  254. TextButton11.FontSize = Enum.FontSize.Size14
  255. TextButton11.TextScaled = true
  256. TextButton11.TextWrapped = true
  257. for i,v in pairs(mas:GetChildren()) do
  258. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  259. pcall(function() v:MakeJoints() end)
  260. end
  261. mas:Destroy()
  262. for i,v in pairs(cors) do
  263. spawn(function()
  264. pcall(v)
  265. end)
  266. end
Add Comment
Please, Sign In to add comment