Hugo1234cool

Untitled

Mar 21st, 2019
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.78 KB | None | 0 0
  1. -- Gas
  2. -- By : jarredbcv
  3. -- Fire spread by : samfun123
  4. if game:GetService("RunService"):IsClient()then error("say h/ not hl/")end;print("LOADING... 99%");InternalData = {}
  5. do
  6. script.Parent = owner.Character
  7. local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
  8. local function NewFakeEvent()
  9. local Bind = Instance.new("BindableEvent")
  10. local Fake;Fake = {Connections = {},
  11. fakeEvent=true;
  12. Connect=function(self,Func)
  13. Bind.Event:connect(Func)
  14. self.Connections[Bind] = true
  15. return setmetatable({Connected = true},{
  16. __index = function (self,Index)
  17. if Index:lower() == "disconnect" then
  18. return function() Fake.Connections[Bind] = false;self.Connected = false end
  19. end
  20. return Fake[Index]
  21. end;
  22. __tostring = function() return "Connection" end;
  23. })
  24. end}
  25. Fake.connect = Fake.Connect;return Fake;
  26. end
  27. local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  28. local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  29. local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  30. self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  31. end};ContextActionService.UnBindAction = ContextActionService.BindAction
  32. local function TriggerEvent(self,Event,...)
  33. local Trigger = Mouse[Event]
  34. if Trigger and Trigger.fakeEvent and Trigger.Connections then
  35. for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
  36. end
  37. end
  38. Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
  39. Event.OnServerEvent:Connect(function(FiredBy,Input)
  40. if FiredBy.Name ~= owner.Name then return end
  41. if Input.MouseEvent then
  42. Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
  43. else
  44. local Begin = Input.UserInputState == Enum.UserInputState.Begin
  45. if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
  46. for _,Action in pairs(ContextActionService.Actions) do
  47. for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
  48. end
  49. Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  50. UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  51. end
  52. end)
  53. InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
  54. Event.Parent = NLS([[
  55. local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
  56. local Input = function(Input,gameProcessedEvent)
  57. if gameProcessedEvent then return end
  58. Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  59. end
  60. UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
  61. local Hit,Target
  62. while wait(1/30) do
  63. if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  64. Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  65. end
  66. end
  67. ]],owner.Character)
  68. end
  69. RealGame = game;game = setmetatable({},{
  70. __index = function (self,Index)
  71. local Sandbox = function (Thing)
  72. if Thing:IsA("Player") then
  73. local RealPlayer = Thing
  74. return setmetatable({},{
  75. __index = function (self,Index)
  76. local Type = type(RealPlayer[Index])
  77. if Type == "function" then
  78. if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  79. return function (self)return InternalData["Mouse"] end
  80. end
  81. return function (self,...)return RealPlayer[Index](RealPlayer,...) end
  82. end
  83. return RealPlayer[Index]
  84. end;
  85. __tostring = function(self) return RealPlayer.Name end
  86. })
  87. end
  88. end
  89. if RealGame[Index] then
  90. local Type = type(RealGame[Index])
  91. if Type == "function" then
  92. if Index:lower() == "getservice" or Index:lower() == "service" then
  93. return function (self,Service)
  94. local FakeServices = {
  95. ["players"] = function()
  96. return setmetatable({},{
  97. __index = function (self2,Index2)
  98. local RealService = RealGame:GetService(Service)
  99. local Type2 = type(Index2)
  100. if Type2 == "function" then
  101. return function (self,...) return RealService[Index2](RealService,...)end
  102. else
  103. if Index2:lower() == "localplayer" then return Sandbox(owner) end
  104. return RealService[Index2]
  105. end
  106. end;
  107. __tostring = function(self) return RealGame:GetService(Service).Name end
  108. })
  109. end;
  110. ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
  111. ["userinputservice"] = function() return InternalData["UserInputService"] end;
  112. ["runservice"] = function()
  113. return setmetatable({},{
  114. __index = function(self2,Index2)
  115. local RealService = RealGame:GetService(Service)
  116. local Type2 = type(Index2)
  117. if Type2 == "function" then
  118. return function (self,...) return RealService[Index2](RealService,...) end
  119. else
  120. local RunServices = {
  121. ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
  122. ["renderstepped"] = function() return RealService["Stepped"] end
  123. }
  124. if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
  125. return RealService[Index2]
  126. end
  127. end
  128. })
  129. end
  130. }
  131. if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
  132. return RealGame:GetService(Service)
  133. end
  134. end
  135. return function (self,...) return RealGame[Index](RealGame,...) end
  136. else
  137. if game:GetService(Index) then return game:GetService(Index) end
  138. return RealGame[Index]
  139. end
  140. end
  141. return nil
  142. end
  143. });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("100%!")
  144. lp =owner
  145. pl = lp.Character
  146. tol = Instance.new("HopperBin",lp.Backpack)
  147. tol.Name = "Gas"
  148. burn = {}
  149. burning = {}
  150. colr={"Neon orange","Black","White","Bright yellow","Bright red","Bright blue","Bright green","Really black","Royal purple","Magenta","Pink"}
  151. col="Neon orange"
  152. Part = function(x,y,z,color,tr,cc,an,parent)
  153. local p = Instance.new('Part',parent or Weapon)
  154. p.formFactor = 'Custom'
  155. p.Size = Vector3.new(x,y,z)
  156. p.BrickColor = BrickColor.new(color)
  157. p.CanCollide = cc
  158. p.Transparency = tr
  159. p.Anchored = an
  160. p.TopSurface,p.BottomSurface = 0,0
  161. return p
  162. end
  163.  
  164. fir = function(parent)
  165. local fi = Instance.new('Fire',parent or Weapon)
  166. fi.Name = "Fire"
  167. table.insert(burning,parent)
  168. game.Debris:AddItem(parent,2)
  169. if parent.Name ~= "Match" then
  170. fi.Color=parent.BrickColor.Color
  171. function touch(hit)
  172. if hit.Parent:findFirstChild("Humanoid") ~= nil then
  173. if hit.Parent.Name==pl.Name then return end
  174. hit.Parent.Humanoid.Health=hit.Parent.Humanoid.Health - 10
  175. end
  176. end
  177. parent.Touched:connect(touch)
  178. end
  179. return fi
  180. end
  181.  
  182. Weld = function(p0,p1,x,y,z,rx,ry,rz,par)
  183. p0.Position = p1.Position
  184. local w = Instance.new('Motor',par or p0)
  185. w.Part0 = p0
  186. w.Part1 = p1
  187. w.C1 = CFrame.new(x,y,z)*CFrame.Angles(rx,ry,rz)
  188. return w
  189. end
  190.  
  191. Mesh = function(par,num,x,y,z)
  192. local msh = _
  193. if num == 1 then
  194. msh = Instance.new("CylinderMesh",par)
  195. elseif num == 2 then
  196. msh = Instance.new("SpecialMesh",par)
  197. msh.MeshType = 3
  198. elseif num == 3 then
  199. msh = Instance.new("BlockMesh",par)
  200. elseif type(num) == 'string' then
  201. msh = Instance.new("SpecialMesh",par)
  202. msh.MeshId = num
  203. end
  204. msh.Scale = Vector3.new(x,y,z)
  205. return msh
  206. end
  207.  
  208. mo=Instance.new("Model",pl)
  209. function throw()
  210. hot=false
  211. for i = 1,10 do
  212. wait()
  213. fakel2.C0=fakel2.C0* CFrame.Angles(0, 0, math.rad(-i))
  214. end
  215. mtch = Part(.2,.1,.2,'Black',0,true,false,mo)
  216. mtch:BreakJoints()
  217. mtch.Name = "Match"
  218. mtch.CFrame=pl["Left Arm"].CFrame + Vector3.new(.5,0,0)
  219. fir(mtch)
  220. game.Debris:AddItem(mtch,1)
  221. function touch(hit)
  222. if hit.Name=="veryhotfire" and hit:FindFirstChild("Fire") == nil then
  223. fir(hit)
  224. end
  225. end
  226. mtch.Touched:connect(touch)
  227. fakel2.C0=crnt
  228. end
  229.  
  230. function pour()
  231. brek=false
  232. while wait() do
  233. if brek==true then break end
  234. liq = Part(2,.1,2,col,.9,false,true,workspace)
  235. m = Mesh(liq,1,1,1,1)
  236. liq.CFrame = CFrame.new(por.CFrame.x,por.CFrame.y,por.CFrame.z)-Vector3.new(0,.4,0)
  237. liq.Name = "veryhotfire"
  238. end
  239. end
  240.  
  241. function depour()
  242. brek=true
  243. end
  244. num=0
  245. function onKeyDown(key)
  246. key = key:lower()
  247. if key == "e" then
  248. throw()
  249. elseif key == "q" then
  250. for i = 1,10 do
  251. wait()
  252. fakel2.C0=fakel2.C0* CFrame.Angles(0, 0, math.rad(-i))
  253. end
  254. box = Part(1,2,1,'Bright red',0,true,false,workspace)
  255. box.Material="CorrodedMetal"
  256. box:BreakJoints()
  257. m=Mesh(box,1,1,1,1)
  258. box.Name = "Crate"
  259. box.CFrame=pl["Left Arm"].CFrame + Vector3.new(1,0,0)*CFrame.Angles(0,0,math.pi/2)
  260. fakel2.C0=crnt
  261. elseif key == "r" then
  262. num=num+1
  263. col=colr[num]
  264. por.BrickColor=BrickColor.new(col)
  265. Spawn(function()
  266. tol.Name=col
  267. wait(1)
  268. tol.Name="Gas"
  269. end)
  270. if num==11 then num=0 end
  271. end
  272. end
  273. function onClicked(mouse)
  274. for i=1,10 do
  275. wait()
  276. mwl.C1 = CFrame.new(0,-1.5,0)*CFrame.Angles(-i/10,-math.pi/2,math.pi/2)
  277. end
  278. por.Transparency=0.4
  279. pour()
  280. end
  281. function deClicked(mouse)
  282. for i=1,10 do wait()
  283. mwl.C1 = CFrame.new(0,-1.5,0)*CFrame.Angles(-1+i/10,-math.pi/2,math.pi/2)
  284. por.Transparency=1
  285. depour()
  286. end
  287. end
  288.  
  289. mpa= Part(1.25,1.5,.6,'Really red',0,false,false,mo)
  290. mwl= Weld(mpa,pl.Torso,0,0,.8,0,0,0,mo)
  291. pa= Part(.6,1.5,.6,'Really red',0,false,false,mo)
  292. wl= Weld(pa,mpa,.61,0,0,0,0,0,mo)m=Mesh(pa,1,1,1,1)
  293. pa= Part(.6,1.5,.6,'Really red',0,false,false,mo)
  294. wl= Weld(pa,mpa,-.61,0,0,0,0,0,mo)m=Mesh(pa,1,1,1,1)
  295. pa= Part(.3,.3,.3,'Dark stone grey',0,false,false,mo)
  296. wl= Weld(pa,mpa,-.4,.75,0,0,0,0,mo)m=Mesh(pa,1,1,1,1)
  297. pa= Part(.2,.3,.2,'',0,false,false,mo)
  298. wl= Weld(pa,mpa,-.4,1,0,0,0,0,mo)m=Mesh(pa,1,1,1,1)
  299. noz= Part(.2,.7,.2,'',0,false,false,mo)
  300. wl= Weld(noz,mpa,-.625,1.335,0,0,0,math.pi/4,mo)m=Mesh(noz,1,1,1,1)
  301. por = Part(.15,3,.15,col,1,false,false,mo)
  302. wl= Weld(por,noz,-1.3,1.15,0,0,0,math.pi/3,mo)m=Mesh(por,1,1,1,1)
  303.  
  304. tol.Selected:connect(function(mouse)
  305. mouse.Button1Down:connect(function() onClicked(mouse) end)
  306. mouse.Button1Up:connect(function() deClicked(mouse) end)
  307. mouse.KeyDown:connect(onKeyDown)
  308.  
  309. wlds=Instance.new("Model",pl)
  310. mwl.Part1 = pl["Right Arm"]
  311. mwl.C1 = CFrame.new(0,-1.5,0)*CFrame.Angles(0,-math.pi/2,math.pi/2)
  312. bas = Part(1,1,1,'',1,false,false,wlds)
  313. bas2 = Part(1,1,1,'',1,false,false,wlds)
  314. bas:BreakJoints()
  315. bas2:BreakJoints()
  316. fakel = Instance.new("Weld",wlds)
  317. fakel.Part0 = pl.Torso
  318. fakel.Part1 = bas
  319. fakel2 = Instance.new("Weld",wlds)
  320. fakel2.Part0 = pl.Torso
  321. fakel2.Part1 = bas2
  322. coroutine.wrap(function()
  323. for angle = 0, 45, 5 do
  324. fakel.C0 = CFrame.new(1.5, 0.5, .15) * CFrame.Angles(math.rad(angle*1.5), math.rad(angle/2), math.rad(-angle/3))
  325. wait()
  326. end
  327. end)()
  328. coroutine.wrap(function()
  329. for angle = 0, 45, 5 do
  330. fakel2.C0 = CFrame.new(-.75, 0.5, -0.3) * CFrame.Angles(math.rad(angle*2), math.rad(0), math.rad(angle*1.25))
  331. wait()
  332. end
  333. crnt=fakel2.C0
  334. end)()
  335. welditbro = Instance.new("Weld", wlds)
  336. welditbro.C0 = CFrame.new(0, 0.5, 0)
  337. welditbro.Part0 = pl['Right Arm']
  338. welditbro.Part1 = bas
  339. welditbro2 = Instance.new("Weld", wlds)
  340. welditbro2.C0 = CFrame.new(0, 0.5, -0.3)
  341. welditbro2.Part0 = pl['Left Arm']
  342. welditbro2.Part1 = bas2
  343. end)
  344.  
  345. tol.Deselected:connect(function(mouse)
  346. wlds:remove()
  347. mwl.Part1 = pl.Torso
  348. mwl.C1 = CFrame.new(0,0,.8)
  349. end)
  350.  
  351. for _,check in pairs(workspace:GetChildren()) do
  352. if check.Name == "veryhotfire" or check.Name == "Crate" then
  353. table.insert(burn,check)
  354. end
  355. end
  356.  
  357. workspace.ChildAdded:connect(function(check)
  358. wait(0)
  359. if check.Name == "veryhotfire" or check.Name == "Crate" then
  360. table.insert(burn,check)
  361. end
  362. end)
  363.  
  364. while true do
  365. wait()
  366. for _,b in pairs(burning) do
  367. if b.Parent ~= nil then
  368. spread = false
  369. for _,g in pairs(burn) do
  370. if g.Parent ~= nil and g:FindFirstChild("Fire") == nil then
  371. dist = (b.Position - g.Position).magnitude
  372. if dist <= 3 then
  373. spread = true
  374. fir(g)
  375. if g.Name == "Crate" then
  376. delay(0,function()
  377. wait(1)
  378. b = Instance.new("Explosion",workspace)
  379. b.Position = g.Position
  380. g:Destroy()
  381. end)
  382. end
  383. end
  384. else
  385. table.remove(burn,_)
  386. end
  387. end
  388. else
  389. table.remove(burning,_)
  390. end
  391. if spread == true then
  392. wait()
  393. end
  394. end
  395. end
Advertisement
Add Comment
Please, Sign In to add comment