Advertisement
Createok

Untitled

Dec 30th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87. -- Gas
  88. -- By : jarredbcv
  89. -- Fire spread by : samfun123
  90.  
  91. lp = game.Players.hsdfsfsdfds
  92. pl = lp.Character
  93. tol = Instance.new("HopperBin",lp.Backpack)
  94. tol.Name = "Gas"
  95. burn = {}
  96. burning = {}
  97. colr={"Neon orange","Black","White","Bright yellow","Bright red","Bright blue","Bright green","Really black","Royal purple","Magenta","Pink"}
  98. col="Neon orange"
  99. Part = function(x,y,z,color,tr,cc,an,parent)
  100. local p = Instance.new('Part',parent or Weapon)
  101. p.formFactor = 'Custom'
  102. p.Size = Vector3.new(x,y,z)
  103. p.BrickColor = BrickColor.new(color)
  104. p.CanCollide = cc
  105. p.Transparency = tr
  106. p.Anchored = an
  107. p.TopSurface,p.BottomSurface = 0,0
  108. return p
  109. end
  110.  
  111. fir = function(parent)
  112. local fi = Instance.new('Fire',parent or Weapon)
  113. fi.Name = "Fire"
  114. table.insert(burning,parent)
  115. game.Debris:AddItem(parent,2)
  116. if parent.Name ~= "Match" then
  117. fi.Color=parent.BrickColor.Color
  118. function touch(hit)
  119. if hit.Parent:findFirstChild("Humanoid") ~= nil then
  120. if hit.Parent.Name==pl.Name then return end
  121. hit.Parent.Humanoid.Health=hit.Parent.Humanoid.Health - 10
  122. end
  123. end
  124. parent.Touched:connect(touch)
  125. end
  126. return fi
  127. end
  128.  
  129. Weld = function(p0,p1,x,y,z,rx,ry,rz,par)
  130. p0.Position = p1.Position
  131. local w = Instance.new('Motor',par or p0)
  132. w.Part0 = p0
  133. w.Part1 = p1
  134. w.C1 = CFrame.new(x,y,z)*CFrame.Angles(rx,ry,rz)
  135. return w
  136. end
  137.  
  138. Mesh = function(par,num,x,y,z)
  139. local msh = _
  140. if num == 1 then
  141. msh = Instance.new("CylinderMesh",par)
  142. elseif num == 2 then
  143. msh = Instance.new("SpecialMesh",par)
  144. msh.MeshType = 3
  145. elseif num == 3 then
  146. msh = Instance.new("BlockMesh",par)
  147. elseif type(num) == 'string' then
  148. msh = Instance.new("SpecialMesh",par)
  149. msh.MeshId = num
  150. end
  151. msh.Scale = Vector3.new(x,y,z)
  152. return msh
  153. end
  154.  
  155. mo=Instance.new("Model",pl)
  156. function throw()
  157. hot=false
  158. for i = 1,10 do
  159. wait()
  160. fakel2.C0=fakel2.C0* CFrame.Angles(0, 0, math.rad(-i))
  161. end
  162. mtch = Part(.2,.1,.2,'Black',0,true,false,mo)
  163. mtch:BreakJoints()
  164. mtch.Name = "Match"
  165. mtch.CFrame=pl["Left Arm"].CFrame + Vector3.new(.5,0,0)
  166. fir(mtch)
  167. game.Debris:AddItem(mtch,1)
  168. function touch(hit)
  169. if hit.Name=="veryhotfire" and hit:FindFirstChild("Fire") == nil then
  170. fir(hit)
  171. end
  172. end
  173. mtch.Touched:connect(touch)
  174. fakel2.C0=crnt
  175. end
  176.  
  177. function pour()
  178. brek=false
  179. while wait() do
  180. if brek==true then break end
  181. liq = Part(2,.1,2,col,.9,false,true,workspace)
  182. m = Mesh(liq,1,1,1,1)
  183. liq.CFrame = CFrame.new(por.CFrame.x,por.CFrame.y,por.CFrame.z)-Vector3.new(0,.4,0)
  184. liq.Name = "veryhotfire"
  185. end
  186. end
  187.  
  188. function depour()
  189. brek=true
  190. end
  191. num=0
  192. function onKeyDown(key)
  193. key = key:lower()
  194. if key == "e" then
  195. throw()
  196. elseif key == "q" then
  197. for i = 1,10 do
  198. wait()
  199. fakel2.C0=fakel2.C0* CFrame.Angles(0, 0, math.rad(-i))
  200. end
  201. box = Part(1,2,1,'Bright red',0,true,false,workspace)
  202. box.Material="CorrodedMetal"
  203. box:BreakJoints()
  204. m=Mesh(box,1,1,1,1)
  205. box.Name = "Crate"
  206. box.CFrame=pl["Left Arm"].CFrame + Vector3.new(1,0,0)*CFrame.Angles(0,0,math.pi/2)
  207. fakel2.C0=crnt
  208. elseif key == "r" then
  209. num=num+1
  210. col=colr[num]
  211. por.BrickColor=BrickColor.new(col)
  212. Spawn(function()
  213. tol.Name=col
  214. wait(1)
  215. tol.Name="Gas"
  216. end)
  217. if num==11 then num=0 end
  218. end
  219. end
  220. function onClicked(mouse)
  221. for i=1,10 do
  222. wait()
  223. mwl.C1 = CFrame.new(0,-1.5,0)*CFrame.Angles(-i/10,-math.pi/2,math.pi/2)
  224. end
  225. por.Transparency=0.4
  226. pour()
  227. end
  228. function deClicked(mouse)
  229. for i=1,10 do wait()
  230. mwl.C1 = CFrame.new(0,-1.5,0)*CFrame.Angles(-1+i/10,-math.pi/2,math.pi/2)
  231. por.Transparency=1
  232. depour()
  233. end
  234. end
  235.  
  236. mpa= Part(1.25,1.5,.6,'Really red',0,false,false,mo)
  237. mwl= Weld(mpa,pl.Torso,0,0,.8,0,0,0,mo)
  238. pa= Part(.6,1.5,.6,'Really red',0,false,false,mo)
  239. wl= Weld(pa,mpa,.61,0,0,0,0,0,mo)m=Mesh(pa,1,1,1,1)
  240. pa= Part(.6,1.5,.6,'Really red',0,false,false,mo)
  241. wl= Weld(pa,mpa,-.61,0,0,0,0,0,mo)m=Mesh(pa,1,1,1,1)
  242. pa= Part(.3,.3,.3,'Dark stone grey',0,false,false,mo)
  243. wl= Weld(pa,mpa,-.4,.75,0,0,0,0,mo)m=Mesh(pa,1,1,1,1)
  244. pa= Part(.2,.3,.2,'',0,false,false,mo)
  245. wl= Weld(pa,mpa,-.4,1,0,0,0,0,mo)m=Mesh(pa,1,1,1,1)
  246. noz= Part(.2,.7,.2,'',0,false,false,mo)
  247. wl= Weld(noz,mpa,-.625,1.335,0,0,0,math.pi/4,mo)m=Mesh(noz,1,1,1,1)
  248. por = Part(.15,3,.15,col,1,false,false,mo)
  249. wl= Weld(por,noz,-1.3,1.15,0,0,0,math.pi/3,mo)m=Mesh(por,1,1,1,1)
  250.  
  251. tol.Selected:connect(function(mouse)
  252. mouse.Button1Down:connect(function() onClicked(mouse) end)
  253. mouse.Button1Up:connect(function() deClicked(mouse) end)
  254. mouse.KeyDown:connect(onKeyDown)
  255.  
  256. wlds=Instance.new("Model",pl)
  257. mwl.Part1 = pl["Right Arm"]
  258. mwl.C1 = CFrame.new(0,-1.5,0)*CFrame.Angles(0,-math.pi/2,math.pi/2)
  259. bas = Part(1,1,1,'',1,false,false,wlds)
  260. bas2 = Part(1,1,1,'',1,false,false,wlds)
  261. bas:BreakJoints()
  262. bas2:BreakJoints()
  263. fakel = Instance.new("Weld",wlds)
  264. fakel.Part0 = pl.Torso
  265. fakel.Part1 = bas
  266. fakel2 = Instance.new("Weld",wlds)
  267. fakel2.Part0 = pl.Torso
  268. fakel2.Part1 = bas2
  269. coroutine.wrap(function()
  270. for angle = 0, 45, 5 do
  271. fakel.C0 = CFrame.new(1.5, 0.5, .15) * CFrame.Angles(math.rad(angle*1.5), math.rad(angle/2), math.rad(-angle/3))
  272. wait()
  273. end
  274. end)()
  275. coroutine.wrap(function()
  276. for angle = 0, 45, 5 do
  277. fakel2.C0 = CFrame.new(-.75, 0.5, -0.3) * CFrame.Angles(math.rad(angle*2), math.rad(0), math.rad(angle*1.25))
  278. wait()
  279. end
  280. crnt=fakel2.C0
  281. end)()
  282. welditbro = Instance.new("Weld", wlds)
  283. welditbro.C0 = CFrame.new(0, 0.5, 0)
  284. welditbro.Part0 = pl['Right Arm']
  285. welditbro.Part1 = bas
  286. welditbro2 = Instance.new("Weld", wlds)
  287. welditbro2.C0 = CFrame.new(0, 0.5, -0.3)
  288. welditbro2.Part0 = pl['Left Arm']
  289. welditbro2.Part1 = bas2
  290. end)
  291.  
  292. tol.Deselected:connect(function(mouse)
  293. wlds:remove()
  294. mwl.Part1 = pl.Torso
  295. mwl.C1 = CFrame.new(0,0,.8)
  296. end)
  297.  
  298. for _,check in pairs(workspace:GetChildren()) do
  299. if check.Name == "veryhotfire" or check.Name == "Crate" then
  300. table.insert(burn,check)
  301. end
  302. end
  303.  
  304. workspace.ChildAdded:connect(function(check)
  305. wait(0)
  306. if check.Name == "veryhotfire" or check.Name == "Crate" then
  307. table.insert(burn,check)
  308. end
  309. end)
  310.  
  311. while true do
  312. wait()
  313. for _,b in pairs(burning) do
  314. if b.Parent ~= nil then
  315. spread = false
  316. for _,g in pairs(burn) do
  317. if g.Parent ~= nil and g:FindFirstChild("Fire") == nil then
  318. dist = (b.Position - g.Position).magnitude
  319. if dist <= 3 then
  320. spread = true
  321. fir(g)
  322. if g.Name == "Crate" then
  323. delay(0,function()
  324. wait(1)
  325. b = Instance.new("Explosion",workspace)
  326. b.Position = g.Position
  327. g:Destroy()
  328. end)
  329. end
  330. end
  331. else
  332. table.remove(burn,_)
  333. end
  334. end
  335. else
  336. table.remove(burning,_)
  337. end
  338. if spread == true then
  339. wait()
  340. end
  341. end
  342. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement