Advertisement
yougotoof

Omni

Dec 22nd, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.52 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. print("FE Compatibility code by Mokiros")
  7. local rp = RealPlayer
  8. script.Parent = rp.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,Functions={},Connect=function(self,f)table.insert(self.Functions,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(),Button2Up=fakeEvent(),Button2Down=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 then
  34. for _,f in pairs(t.Functions) do
  35. f(...)
  36. end
  37. end
  38. end
  39. m.TrigEvent = te
  40. UIS.TrigEvent = te
  41.  
  42. Event.OnServerEvent:Connect(function(plr,io)
  43. if plr~=rp then return end
  44. m.Target = io.Target
  45. m.Hit = io.Hit
  46. if not io.isMouse then
  47. local b = io.UserInputState == Enum.UserInputState.Begin
  48. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  49. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  50. end
  51. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  52. return m:TrigEvent(b and "Button2Down" or "Button2Up")
  53. end
  54. for _,t in pairs(CAS.Actions) do
  55. for _,k in pairs(t.Keys) do
  56. if k==io.KeyCode then
  57. t.Function(t.Name,io.UserInputState,io)
  58. end
  59. end
  60. end
  61. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  62. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  63. end
  64. end)
  65. Event.Parent = NLS([==[
  66. local Player = game:GetService("Players").LocalPlayer
  67. local Event = script:WaitForChild("UserInput_Event")
  68.  
  69. local Mouse = Player:GetMouse()
  70. local UIS = game:GetService("UserInputService")
  71. local input = function(io,a)
  72. if a then return end
  73. --Since InputObject is a client-side instance, we create and pass table instead
  74. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  75. end
  76. UIS.InputBegan:Connect(input)
  77. UIS.InputEnded:Connect(input)
  78.  
  79. local h,t
  80. --Give the server mouse data 30 times every second, but only if the values changed
  81. --If player is not moving their mouse, client won't fire events
  82. while wait(1/30) do
  83. if h~=Mouse.Hit or t~=Mouse.Target then
  84. h,t=Mouse.Hit,Mouse.Target
  85. Event:FireServer({isMouse=true,Target=t,Hit=h})
  86. end
  87. end]==],Player.Character)
  88.  
  89. ----Sandboxed game object that allows the usage of client-side methods and services
  90. --Real game object
  91. local _rg = game
  92.  
  93. --Metatable for fake service
  94. local fsmt = {
  95. __index = function(self,k)
  96. local s = rawget(self,"_RealService")
  97. if s then
  98. return typeof(s[k])=="function"
  99. and function(_,...)return s[k](s,...)end or s[k]
  100. end
  101. end,
  102. __newindex = function(self,k,v)
  103. local s = rawget(self,"_RealService")
  104. if s then s[k]=v end
  105. end
  106. }
  107. local function FakeService(t,RealService)
  108. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  109. return setmetatable(t,fsmt)
  110. end
  111.  
  112. --Fake game object
  113. local g = {
  114. GetService = function(self,s)
  115. return rawget(self,s) or _rg:GetService(s)
  116. end,
  117. Players = FakeService({
  118. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  119. },"Players"),
  120. UserInputService = FakeService(UIS,"UserInputService"),
  121. ContextActionService = FakeService(CAS,"ContextActionService"),
  122. RunService = FakeService({
  123. _btrs = {},
  124. RenderStepped = _rg:GetService("RunService").Heartbeat,
  125. BindToRenderStep = function(self,name,_,fun)
  126. self._btrs[name] = self.Heartbeat:Connect(fun)
  127. end,
  128. UnbindFromRenderStep = function(self,name)
  129. self._btrs[name]:Disconnect()
  130. end,
  131. },"RunService")
  132. }
  133. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  134. g.service = g.GetService
  135. FakeService(g,game)
  136. --Changing owner to fake player object to support owner:GetMouse()
  137. game,owner = g,g.Players.LocalPlayer
  138. end
  139.  
  140. local player=game:GetService("Players").LocalPlayer
  141. local char=player.Character
  142. local mouse=player:GetMouse()
  143.  
  144. local m = Instance.new("Model")
  145. m.Name = "Flamethrower"
  146. p1 = Instance.new("Part", m)
  147. p1.BrickColor = BrickColor.new("Really black")
  148. p1.FormFactor = Enum.FormFactor.Custom
  149. p1.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  150. p1.CFrame = CFrame.new(-4.31863213, 1.2999835, 26.8280258, 0.898792505, -0.438372105, 6.44474255e-007, 4.2475844e-007, -8.7068031e-007, 0.999996066, -0.438369185, -0.898793578, 7.74858847e-007)
  151. p1.CanCollide = false
  152. b1 = Instance.new("CylinderMesh", p1)
  153. b1.Name = "Mesh"
  154. b1.Scale = Vector3.new(0.699999988, 1, 1.39999998)
  155. p2 = Instance.new("Part", m)
  156. p2.BrickColor = BrickColor.new("Really black")
  157. p2.FormFactor = Enum.FormFactor.Custom
  158. p2.Size = Vector3.new(0.200000003, 0.799999952, 0.200000003)
  159. p2.CFrame = CFrame.new(-4.22384691, 1.29998171, 27.1336765, -0.945517242, 0.325569242, 6.44474255e-007, -5.4352688e-007, 9.19547631e-007, 0.999996066, 0.325566202, 0.945517898, 7.74858847e-007)
  160. p2.CanCollide = false
  161. b2 = Instance.new("CylinderMesh", p2)
  162. b2.Name = "Mesh"
  163. b2.Scale = Vector3.new(0.899999976, 1, 1.5)
  164. p3 = Instance.new("Part", m)
  165. p3.BrickColor = BrickColor.new("Black")
  166. p3.Material = Enum.Material.Grass
  167. p3.Name = "Handle2"
  168. p3.FormFactor = Enum.FormFactor.Custom
  169. p3.Size = Vector3.new(0.200000003, 0.400000006, 0.200000003)
  170. p3.CFrame = CFrame.new(-4.36384678, 1.48997498, 26.7136898, 0.998628676, -0.0523356572, 1.65257313e-006, 0.0505531132, 0.964598, 0.258818507, -0.0135439271, -0.258463174, 0.96592474)
  171. p3.CanCollide = false
  172. b3 = Instance.new("CylinderMesh", p3)
  173. b3.Name = "Mesh"
  174. b3.Scale = Vector3.new(0.699999988, 1, 1.39999998)
  175. p4 = Instance.new("Part", m)
  176. p4.BrickColor = BrickColor.new("Really black")
  177. p4.FormFactor = Enum.FormFactor.Custom
  178. p4.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  179. p4.CFrame = CFrame.new(-4.08384609, 1.29998279, 26.8336773, 6.66825997e-007, 1.56834642e-006, 0.999999166, 0.999996066, 6.85452505e-007, 7.1152931e-007, 8.0466117e-007, 0.999998689, 1.56834619e-006)
  180. p4.CanCollide = false
  181. b4 = Instance.new("CylinderMesh", p4)
  182. b4.Name = "Mesh"
  183. b4.Scale = Vector3.new(1.20000005, 0.5, 1.78999996)
  184. p5 = Instance.new("Part", m)
  185. p5.BrickColor = BrickColor.new("Really black")
  186. p5.FormFactor = Enum.FormFactor.Custom
  187. p5.Size = Vector3.new(0.200000003, 1.79999995, 0.200000003)
  188. p5.CFrame = CFrame.new(-4.08383894, 1.29998529, 27.6837158, 6.66825997e-007, 1.56834642e-006, 0.999999166, 0.999996066, 6.85452505e-007, 7.1152931e-007, 8.0466117e-007, 0.999998689, 1.56834619e-006)
  189. p5.CanCollide = false
  190. b5 = Instance.new("CylinderMesh", p5)
  191. b5.Name = "Mesh"
  192. b5.Scale = Vector3.new(1, 1, 1.70000005)
  193. p6 = Instance.new("Part", m)
  194. p6.BrickColor = BrickColor.new("Really black")
  195. p6.Size = Vector3.new(1, 1.20000005, 1)
  196. p6.CFrame = CFrame.new(-4.07870293, 1.24756896, 29.8614006, -0.0122325243, 0.00382106518, 0.999915302, 0.999817967, -0.0144664943, 0.0122870263, 0.0145196915, 0.999886394, -0.0036436012)
  197. p6.BottomSurface = Enum.SurfaceType.Smooth
  198. p6.TopSurface = Enum.SurfaceType.Smooth
  199. b6 = Instance.new("SpecialMesh", p6)
  200. b6.MeshType = Enum.MeshType.Brick
  201. b6.Name = "Mesh"
  202. b6.Scale = Vector3.new(0.461538464, 0.769230723, 0.461538464)
  203. b7 = Instance.new("CylinderMesh", p6)
  204. b7.Name = "Mesh"
  205. b7.Scale = Vector3.new(1, 0.899999976, 0.439999998)
  206. d1 = Instance.new("Decal", p6)
  207. d1.Texture = "http://www.roblox.com/asset/?id=85448092"
  208. d1.Face = Enum.NormalId.Top
  209. p7 = Instance.new("Part", m)
  210. p7.BrickColor = BrickColor.new("Institutional white")
  211. p7.Size = Vector3.new(1, 1.20000005, 1)
  212. p7.CFrame = CFrame.new(-4.08290291, 1.26348102, 28.7615242, -0.0122325243, 0.00382106518, 0.999915302, 0.999817967, -0.0144664943, 0.0122870263, 0.0145196915, 0.999886394, -0.0036436012)
  213. p7.BottomSurface = Enum.SurfaceType.Smooth
  214. p7.TopSurface = Enum.SurfaceType.Smooth
  215. b8 = Instance.new("SpecialMesh", p7)
  216. b8.MeshType = Enum.MeshType.Brick
  217. b8.Name = "Mesh"
  218. b8.Scale = Vector3.new(0.15384616, 1, 0.307692319)
  219. b9 = Instance.new("CylinderMesh", p7)
  220. b9.Name = "Mesh"
  221. b9.Scale = Vector3.new(1.70000005, 1.10000002, 0.300000012)
  222. p8 = Instance.new("Part", m)
  223. p8.BrickColor = BrickColor.new("Really black")
  224. p8.Name = "Barrel"
  225. p8.Size = Vector3.new(1, 1.20000005, 1)
  226. p8.CFrame = CFrame.new(-4.07320023, 1.24000597, 30.3669701, 0.999916196, 0.00121372147, 0.0126282591, 0.0122011788, 0.18082355, -0.983437181, -0.00347740925, 0.983514667, 0.180784032)
  227. p8.BottomSurface = Enum.SurfaceType.Smooth
  228. p8.TopSurface = Enum.SurfaceType.Smooth
  229. b10 = Instance.new("SpecialMesh", p8)
  230. b10.MeshId = "http://www.roblox.com/asset/?id=1091603"
  231. b10.TextureId = ""
  232. b10.MeshType = Enum.MeshType.FileMesh
  233. b10.Name = "Mesh"
  234. b10.Scale = Vector3.new(0.300000012, 0.300000012, 0.300000012)
  235. p9 = Instance.new("Part", m)
  236. p9.BrickColor = BrickColor.new("Really black")
  237. p9.FormFactor = Enum.FormFactor.Custom
  238. p9.Size = Vector3.new(0.288717359, 0.288717419, 0.288717419)
  239. p9.CFrame = CFrame.new(-4.12095404, 1.04495895, 29.1705666, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  240. p9.BottomSurface = Enum.SurfaceType.Smooth
  241. p9.TopSurface = Enum.SurfaceType.Smooth
  242. b11 = Instance.new("SpecialMesh", p9)
  243. b11.MeshType = Enum.MeshType.Brick
  244. b11.Name = "Mesh"
  245. b11.Scale = Vector3.new(1.37011397, 0.164413691, 1.50712562)
  246. p10 = Instance.new("Part", m)
  247. p10.BrickColor = BrickColor.new("Institutional white")
  248. p10.Size = Vector3.new(1, 1.20000005, 1)
  249. p10.CFrame = CFrame.new(-4.07969093, 1.060624, 28.9585953, -0.999915302, -0.0122325243, -0.00382106518, -0.0122870263, 0.999817967, 0.0144664943, 0.0036436012, 0.0145196915, -0.999886394)
  250. p10.BottomSurface = Enum.SurfaceType.Smooth
  251. p10.TopSurface = Enum.SurfaceType.Smooth
  252. b12 = Instance.new("SpecialMesh", p10)
  253. b12.MeshType = Enum.MeshType.Brick
  254. b12.Name = "Mesh"
  255. b12.Scale = Vector3.new(0.15384616, 0.153846145, 1)
  256. p11 = Instance.new("Part", m)
  257. p11.BrickColor = BrickColor.new("Institutional white")
  258. p11.Name = "Handle"
  259. p11.Size = Vector3.new(1, 1.20000005, 1)
  260. p11.CFrame = CFrame.new(-4.07311201, 0.707809985, 28.6968918, -0.999919653, 0.0111990925, 0.00594851235, -0.0121958125, -0.977798998, -0.209190041, 0.00347371167, -0.209245741, 0.977856994)
  261. p11.BottomSurface = Enum.SurfaceType.Smooth
  262. p11.TopSurface = Enum.SurfaceType.Smooth
  263. b13 = Instance.new("SpecialMesh", p11)
  264. b13.MeshType = Enum.MeshType.Brick
  265. b13.Name = "Mesh"
  266. b13.Scale = Vector3.new(0.15384616, 0.538461506, 0.307692319)
  267. p12 = Instance.new("Part", m)
  268. p12.BrickColor = BrickColor.new("Really black")
  269. p12.FormFactor = Enum.FormFactor.Custom
  270. p12.Size = Vector3.new(0.225199535, 0.22519955, 0.22519958)
  271. p12.CFrame = CFrame.new(-4.08139706, 0.981667995, 29.0914536, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  272. p12.BottomSurface = Enum.SurfaceType.Smooth
  273. p12.TopSurface = Enum.SurfaceType.Smooth
  274. b14 = Instance.new("SpecialMesh", p12)
  275. b14.MeshType = Enum.MeshType.Brick
  276. b14.Name = "Mesh"
  277. b14.Scale = Vector3.new(0.351311207, 0.351311326, 0.175655678)
  278. p13 = Instance.new("Part", m)
  279. p13.BrickColor = BrickColor.new("Really black")
  280. p13.FormFactor = Enum.FormFactor.Custom
  281. p13.Size = Vector3.new(0.225199535, 0.22519955, 0.22519958)
  282. p13.CFrame = CFrame.new(-4.08139706, 0.882772982, 29.1310101, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  283. p13.BottomSurface = Enum.SurfaceType.Smooth
  284. p13.TopSurface = Enum.SurfaceType.Smooth
  285. b15 = Instance.new("SpecialMesh", p13)
  286. b15.MeshType = Enum.MeshType.Wedge
  287. b15.Name = "Mesh"
  288. b15.Scale = Vector3.new(0.351311207, 0.175655663, 0.175655678)
  289. p14 = Instance.new("Part", m)
  290. p14.BrickColor = BrickColor.new("Really black")
  291. p14.FormFactor = Enum.FormFactor.Custom
  292. p14.Size = Vector3.new(0.225199535, 0.22519955, 0.22519958)
  293. p14.CFrame = CFrame.new(-4.08139706, 0.882772982, 29.2496853, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  294. p14.BottomSurface = Enum.SurfaceType.Smooth
  295. p14.TopSurface = Enum.SurfaceType.Smooth
  296. b16 = Instance.new("SpecialMesh", p14)
  297. b16.MeshType = Enum.MeshType.Wedge
  298. b16.Name = "Mesh"
  299. b16.Scale = Vector3.new(0.351311207, 0.175655663, 0.175655678)
  300. p15 = Instance.new("Part", m)
  301. p15.BrickColor = BrickColor.new("Really black")
  302. p15.FormFactor = Enum.FormFactor.Custom
  303. p15.Size = Vector3.new(0.225199535, 0.22519955, 0.22519958)
  304. p15.CFrame = CFrame.new(-4.08139706, 0.922330976, 29.0914536, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  305. p15.BottomSurface = Enum.SurfaceType.Smooth
  306. p15.TopSurface = Enum.SurfaceType.Smooth
  307. b17 = Instance.new("SpecialMesh", p15)
  308. b17.MeshType = Enum.MeshType.Brick
  309. b17.Name = "Mesh"
  310. b17.Scale = Vector3.new(0.351311207, 0.175655663, 0.175655678)
  311. p16 = Instance.new("Part", m)
  312. p16.BrickColor = BrickColor.new("Really black")
  313. p16.FormFactor = Enum.FormFactor.Custom
  314. p16.Size = Vector3.new(0.225199535, 0.22519955, 0.22519958)
  315. p16.CFrame = CFrame.new(-4.12095404, 0.831354022, 28.9332237, 1, 4.23044048e-006, -3.67623443e-006, 4.23044048e-006, 1, 1.40141863e-008, -3.67623443e-006, 1.40141863e-008, 1)
  316. p16.BottomSurface = Enum.SurfaceType.Smooth
  317. p16.TopSurface = Enum.SurfaceType.Smooth
  318. b18 = Instance.new("SpecialMesh", p16)
  319. b18.MeshType = Enum.MeshType.Wedge
  320. b18.Name = "Mesh"
  321. b18.Scale = Vector3.new(1.75655627, 1.68629432, 0.175655678)
  322. p17 = Instance.new("Part", m)
  323. p17.BrickColor = BrickColor.new("Really black")
  324. p17.FormFactor = Enum.FormFactor.Custom
  325. p17.Size = Vector3.new(0.225199535, 0.22519955, 0.22519958)
  326. p17.CFrame = CFrame.new(-4.12095404, 0.878817022, 28.9727783, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  327. p17.BottomSurface = Enum.SurfaceType.Smooth
  328. p17.TopSurface = Enum.SurfaceType.Smooth
  329. b19 = Instance.new("SpecialMesh", p17)
  330. b19.MeshType = Enum.MeshType.Brick
  331. b19.Name = "Mesh"
  332. b19.Scale = Vector3.new(1.75655627, 1.2647208, 0.175655678)
  333. p18 = Instance.new("Part", m)
  334. p18.BrickColor = BrickColor.new("Really black")
  335. p18.FormFactor = Enum.FormFactor.Custom
  336. p18.Size = Vector3.new(0.225199535, 0.22519955, 0.22519958)
  337. p18.CFrame = CFrame.new(-4.08139706, 0.882772982, 29.0914536, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  338. p18.BottomSurface = Enum.SurfaceType.Smooth
  339. p18.TopSurface = Enum.SurfaceType.Smooth
  340. b20 = Instance.new("SpecialMesh", p18)
  341. b20.MeshType = Enum.MeshType.Brick
  342. b20.Name = "Mesh"
  343. b20.Scale = Vector3.new(0.351311207, 0.175655663, 0.175655678)
  344. p19 = Instance.new("Part", m)
  345. p19.BrickColor = BrickColor.new("Really black")
  346. p19.FormFactor = Enum.FormFactor.Custom
  347. p19.Size = Vector3.new(0.799999356, 0.200000003, 0.399999857)
  348. p19.CFrame = CFrame.new(-4.08384228, 0.900013506, 26.983717, -9.93235176e-007, 0.999998927, 1.46056539e-006, -0.987684608, 6.33298328e-007, -0.156433105, -0.156434968, 1.56834574e-006, 0.987686932)
  349. p19.CanCollide = false
  350. b21 = Instance.new("BlockMesh", p19)
  351. b21.Name = "Mesh"
  352. b21.Scale = Vector3.new(1, 1, 0.699999988)
  353. p20 = Instance.new("Part", m)
  354. p20.BrickColor = BrickColor.new("Really black")
  355. p20.FormFactor = Enum.FormFactor.Custom
  356. p20.Size = Vector3.new(0.225199535, 0.22519955, 0.22519958)
  357. p20.CFrame = CFrame.new(-4.12095404, 0.700815022, 29.0321178, 1, -5.8353038e-008, -6.71499549e-008, 6.71499549e-008, 2.22569144e-010, -1, -5.8353038e-008, 1, -2.22569144e-010)
  358. p20.BottomSurface = Enum.SurfaceType.Smooth
  359. p20.TopSurface = Enum.SurfaceType.Smooth
  360. b22 = Instance.new("SpecialMesh", p20)
  361. b22.MeshType = Enum.MeshType.Wedge
  362. b22.Name = "Mesh"
  363. b22.Scale = Vector3.new(1.75655627, 0.702622652, 0.175655678)
  364. p21 = Instance.new("Part", m)
  365. p21.BrickColor = BrickColor.new("Really black")
  366. p21.FormFactor = Enum.FormFactor.Custom
  367. p21.Size = Vector3.new(0.225199535, 0.22519955, 0.22519958)
  368. p21.CFrame = CFrame.new(-4.12095404, 0.700815022, 29.3090191, -1, -0, -0, -0, -0, -1, -0, -1, -0)
  369. p21.BottomSurface = Enum.SurfaceType.Smooth
  370. p21.TopSurface = Enum.SurfaceType.Smooth
  371. b23 = Instance.new("SpecialMesh", p21)
  372. b23.MeshType = Enum.MeshType.Wedge
  373. b23.Name = "Mesh"
  374. b23.Scale = Vector3.new(1.75655627, 0.702622652, 0.175655678)
  375. p22 = Instance.new("Part", m)
  376. p22.BrickColor = BrickColor.new("Really black")
  377. p22.FormFactor = Enum.FormFactor.Custom
  378. p22.Size = Vector3.new(0.799999356, 0.200000003, 0.200000003)
  379. p22.CFrame = CFrame.new(-4.08384562, 0.887999296, 27.1074524, -9.93235176e-007, 0.999998927, 1.46056539e-006, -0.987684608, 6.33298328e-007, -0.156433105, -0.156434968, 1.56834574e-006, 0.987686932)
  380. p22.CanCollide = false
  381. b24 = Instance.new("BlockMesh", p22)
  382. b24.Name = "Mesh"
  383. b24.Scale = Vector3.new(1, 0.300000012, 0.899999976)
  384. p23 = Instance.new("Part", m)
  385. p23.BrickColor = BrickColor.new("Really black")
  386. p23.FormFactor = Enum.FormFactor.Custom
  387. p23.Size = Vector3.new(0.225199535, 0.22519955, 0.22519958)
  388. p23.CFrame = CFrame.new(-4.08139706, 0.843216002, 29.1705666, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  389. p23.BottomSurface = Enum.SurfaceType.Smooth
  390. p23.TopSurface = Enum.SurfaceType.Smooth
  391. b25 = Instance.new("SpecialMesh", p23)
  392. b25.MeshType = Enum.MeshType.Brick
  393. b25.Name = "Mesh"
  394. b25.Scale = Vector3.new(0.351311207, 0.175655663, 0.878278494)
  395. p24 = Instance.new("Part", m)
  396. p24.BrickColor = BrickColor.new("Really black")
  397. p24.FormFactor = Enum.FormFactor.Custom
  398. p24.Size = Vector3.new(0.474551886, 0.474551976, 0.474551976)
  399. p24.CFrame = CFrame.new(-4.14073181, 0.728498995, 28.9727783, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  400. p24.BottomSurface = Enum.SurfaceType.Smooth
  401. p24.TopSurface = Enum.SurfaceType.Smooth
  402. b26 = Instance.new("SpecialMesh", p24)
  403. b26.MeshType = Enum.MeshType.Brick
  404. b26.Name = "Mesh"
  405. b26.Scale = Vector3.new(0.750219524, 0.0333430953, 0.0833577439)
  406. p25 = Instance.new("Part", m)
  407. p25.BrickColor = BrickColor.new("Really black")
  408. p25.FormFactor = Enum.FormFactor.Custom
  409. p25.Size = Vector3.new(0.225199535, 0.22519955, 0.22519958)
  410. p25.CFrame = CFrame.new(-4.12095404, 0.661257982, 29.1705666, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  411. p25.BottomSurface = Enum.SurfaceType.Smooth
  412. p25.TopSurface = Enum.SurfaceType.Smooth
  413. b27 = Instance.new("SpecialMesh", p25)
  414. b27.MeshType = Enum.MeshType.Brick
  415. b27.Name = "Mesh"
  416. b27.Scale = Vector3.new(1.75655627, 0.175655663, 1.93221235)
  417. p26 = Instance.new("Part", m)
  418. p26.BrickColor = BrickColor.new("Really black")
  419. p26.FormFactor = Enum.FormFactor.Custom
  420. p26.Size = Vector3.new(0.474551886, 0.474551976, 0.474551976)
  421. p26.CFrame = CFrame.new(-4.12095404, 0.601921976, 29.1705666, 1, -0, 0, 0, -0, 1, 0, -1, 0)
  422. p26.BottomSurface = Enum.SurfaceType.Smooth
  423. p26.TopSurface = Enum.SurfaceType.Smooth
  424. b28 = Instance.new("SpecialMesh", p26)
  425. b28.MeshType = Enum.MeshType.Wedge
  426. b28.Name = "Mesh"
  427. b28.Scale = Vector3.new(0.833577335, 0.916935086, 0.166715518)
  428. p27 = Instance.new("Part", m)
  429. p27.BrickColor = BrickColor.new("Dark stone grey")
  430. p27.Transparency = 1
  431. p27.Name = "Handle3"
  432. p27.FormFactor = Enum.FormFactor.Custom
  433. p27.Size = Vector3.new(1, 1.4000001, 0.200000033)
  434. p27.CFrame = CFrame.new(-4.08382893, 0.999998987, 28.0838623, 0.999999404, -1.18091657e-006, 5.96045709e-007, 5.96045652e-007, -6.55650126e-007, 0.999996662, 1.18091657e-006, -0.999998808, 6.55650069e-007)
  435. p27.BottomSurface = Enum.SurfaceType.Smooth
  436. p27.TopSurface = Enum.SurfaceType.Smooth
  437. b29 = Instance.new("SpecialMesh", p27)
  438. b29.MeshType = Enum.MeshType.Wedge
  439. b29.Name = "Mesh"
  440. b29.Scale = Vector3.new(0.25, 0.25, 0.200000003)
  441. m.Parent = char
  442. m:MakeJoints()
  443.  
  444.  
  445. local m2 = Instance.new("Model")
  446. m2.Name = "Fueltank"
  447. p1 = Instance.new("Part", m2)
  448. p1.BrickColor = BrickColor.new("Black")
  449. p1.FormFactor = Enum.FormFactor.Custom
  450. p1.Size = Vector3.new(0.400000036, 0.200000003, 0.200000003)
  451. p1.CFrame = CFrame.new(-0.283439994, 0.479694009, -15.516386, 1.56834642e-006, -6.78001982e-007, 0.999999046, 5.96045879e-007, -0.999996066, 6.63100707e-007, 0.999998689, -8.64265758e-007, 1.59814817e-006)
  452. b1 = Instance.new("CylinderMesh", p1)
  453. b1.Name = "Mesh"
  454. b1.Scale = Vector3.new(2, 1.5, 1)
  455. p2 = Instance.new("Part", m2)
  456. p2.BrickColor = BrickColor.new("Institutional white")
  457. p2.Material = Enum.Material.Neon
  458. p2.Name = "ChangeColor"
  459. p2.FormFactor = Enum.FormFactor.Custom
  460. p2.Size = Vector3.new(0.400000036, 1.19999981, 1)
  461. p2.CFrame = CFrame.new(0.116168, 1.10000396, -15.0161295, 1.56834642e-006, -6.78001982e-007, 0.999999046, 5.96045879e-007, -0.999996066, 6.63100707e-007, 0.999998689, -8.64265758e-007, 1.59814817e-006)
  462. p2.CanCollide = false
  463. b2 = Instance.new("CylinderMesh", p2)
  464. b2.Name = "Mesh"
  465. b2.Scale = Vector3.new(2, 1, 1)
  466. p3 = Instance.new("Part", m2)
  467. p3.BrickColor = BrickColor.new("Mid gray")
  468. p3.Material = Enum.Material.Neon
  469. p3.Name = "FuelCenter"
  470. p3.FormFactor = Enum.FormFactor.Custom
  471. p3.Size = Vector3.new(0.400000036, 0.799999833, 1)
  472. p3.CFrame = CFrame.new(-0.283439994, 1.19967496, -15.5163736, 1.56834642e-006, -6.78001982e-007, 0.999999046, 5.96045879e-007, -0.999996066, 6.63100707e-007, 0.999998689, -8.64265758e-007, 1.59814817e-006)
  473. b3 = Instance.new("CylinderMesh", p3)
  474. b3.Name = "Mesh"
  475. b3.Scale = Vector3.new(1.39999998, 1, 1)
  476. p4 = Instance.new("Part", m2)
  477. p4.BrickColor = BrickColor.new("Really black")
  478. p4.FormFactor = Enum.FormFactor.Custom
  479. p4.Size = Vector3.new(0.799999356, 0.799999356, 0.799999356)
  480. p4.CFrame = CFrame.new(0.125933915, 0.449839592, -15.0262089, 0.000333837903, 0.000261210633, 0.999998927, -0.999996006, -5.68053565e-007, 0.000335178163, -7.72354667e-007, -0.999998629, 0.000264377333)
  481. p4.BottomSurface = Enum.SurfaceType.Smooth
  482. p4.TopSurface = Enum.SurfaceType.Smooth
  483. b4 = Instance.new("SpecialMesh", p4)
  484. b4.MeshType = Enum.MeshType.Sphere
  485. b4.Name = "Mesh"
  486. p5 = Instance.new("Part", m2)
  487. p5.BrickColor = BrickColor.new("Really black")
  488. p5.FormFactor = Enum.FormFactor.Custom
  489. p5.Size = Vector3.new(0.799999356, 0.799999356, 0.799999356)
  490. p5.CFrame = CFrame.new(-0.283836007, 1.60003495, -15.5161457, -6.74276521e-007, -1.59814874e-006, 0.999998927, -0.999996066, -5.96045879e-007, 6.44474198e-007, -7.74858904e-007, -0.999998748, 1.56834574e-006)
  491. p5.BottomSurface = Enum.SurfaceType.Smooth
  492. p5.TopSurface = Enum.SurfaceType.Smooth
  493. b5 = Instance.new("SpecialMesh", p5)
  494. b5.MeshType = Enum.MeshType.Sphere
  495. b5.Name = "Mesh"
  496. b5.Scale = Vector3.new(0.709999979, 0.709999979, 0.709999979)
  497. p6 = Instance.new("Part", m2)
  498. p6.BrickColor = BrickColor.new("Really black")
  499. p6.FormFactor = Enum.FormFactor.Custom
  500. p6.Size = Vector3.new(0.400000036, 0.200000003, 0.200000003)
  501. p6.CFrame = CFrame.new(0.116157003, 2.09999895, -15.0161324, 1.5385441e-006, -6.66825883e-007, 0.999999046, 6.85452505e-007, -0.999996066, 6.74276464e-007, 0.999998748, -7.15254316e-007, 1.53854353e-006)
  502. b6 = Instance.new("CylinderMesh", p6)
  503. b6.Name = "Mesh"
  504. b6.Scale = Vector3.new(2, 1, 1)
  505. p7 = Instance.new("Part", m2)
  506. p7.BrickColor = BrickColor.new("Really black")
  507. p7.FormFactor = Enum.FormFactor.Custom
  508. p7.Size = Vector3.new(0.799999356, 0.799999356, 0.799999356)
  509. p7.CFrame = CFrame.new(0.116163999, 1.70000398, -15.0161362, 1.56834642e-006, -6.78001982e-007, 0.999999046, 5.96045879e-007, -0.999996066, 6.63100707e-007, 0.999998689, -8.64265758e-007, 1.59814817e-006)
  510. p7.BottomSurface = Enum.SurfaceType.Smooth
  511. p7.TopSurface = Enum.SurfaceType.Smooth
  512. b7 = Instance.new("SpecialMesh", p7)
  513. b7.MeshType = Enum.MeshType.Sphere
  514. b7.Name = "Mesh"
  515. p8 = Instance.new("Part", m2)
  516. p8.BrickColor = BrickColor.new("Really black")
  517. p8.FormFactor = Enum.FormFactor.Custom
  518. p8.Size = Vector3.new(0.799999356, 0.799999356, 0.799999356)
  519. p8.CFrame = CFrame.new(-0.283437014, 0.779699028, -15.5163822, -6.74276521e-007, -1.59814874e-006, 0.999998927, -0.999996066, -5.96045879e-007, 6.44474198e-007, -7.74858904e-007, -0.999998748, 1.56834574e-006)
  520. p8.BottomSurface = Enum.SurfaceType.Smooth
  521. p8.TopSurface = Enum.SurfaceType.Smooth
  522. b8 = Instance.new("SpecialMesh", p8)
  523. b8.MeshType = Enum.MeshType.Sphere
  524. b8.Name = "Mesh"
  525. b8.Scale = Vector3.new(0.709999979, 0.709999979, 0.709999979)
  526. p9 = Instance.new("Part", m2)
  527. p9.BrickColor = BrickColor.new("Really black")
  528. p9.FormFactor = Enum.FormFactor.Custom
  529. p9.Size = Vector3.new(0.400000036, 0.200000003, 0.200000003)
  530. p9.CFrame = CFrame.new(-0.28343299, 0.279718012, -15.5163898, 7.71134239e-007, 0.999998987, -1.59814874e-006, 0.999996066, 6.18397394e-007, -5.96045879e-007, 9.23870459e-007, 1.59814817e-006, -0.999998748)
  531. b9 = Instance.new("CylinderMesh", p9)
  532. b9.Name = "Mesh"
  533. b9.Scale = Vector3.new(2, 1.5, 1)
  534. p10 = Instance.new("Part", m2)
  535. p10.BrickColor = BrickColor.new("Really black")
  536. p10.FormFactor = Enum.FormFactor.Custom
  537. p10.Size = Vector3.new(0.799999356, 0.799999356, 0.799999356)
  538. p10.CFrame = CFrame.new(-0.68383199, 1.701056, -15.012146, -5.82017606e-007, 0.000486697129, 0.999998808, -0.999639988, -0.026683826, 1.37168181e-005, 0.0266824923, -0.999642611, 0.000489670201)
  539. p10.BottomSurface = Enum.SurfaceType.Smooth
  540. p10.TopSurface = Enum.SurfaceType.Smooth
  541. b10 = Instance.new("SpecialMesh", p10)
  542. b10.MeshType = Enum.MeshType.Sphere
  543. b10.Name = "Mesh"
  544. p11 = Instance.new("Part", m2)
  545. p11.BrickColor = BrickColor.new("Institutional white")
  546. p11.Material = Enum.Material.Neon
  547. p11.Name = "ChangeColor2"
  548. p11.FormFactor = Enum.FormFactor.Custom
  549. p11.Size = Vector3.new(0.400000036, 1.19999981, 1)
  550. p11.CFrame = CFrame.new(-0.683839977, 1.100003, -15.0161276, 1.3895326e-006, -6.48199716e-007, 0.999999166, 5.66243557e-007, -0.999996305, 6.33298498e-007, 0.999998689, -8.34463606e-007, 1.4491369e-006)
  551. p11.CanCollide = false
  552. b11 = Instance.new("CylinderMesh", p11)
  553. b11.Name = "Mesh"
  554. b11.Scale = Vector3.new(2, 1, 1)
  555. p12 = Instance.new("Part", m2)
  556. p12.BrickColor = BrickColor.new("Really black")
  557. p12.FormFactor = Enum.FormFactor.Custom
  558. p12.Size = Vector3.new(0.400000036, 0.200000003, 0.200000003)
  559. p12.CFrame = CFrame.new(-0.683830023, 2.10087895, -15.0254364, -0.000486697129, -7.13852432e-006, 0.999998868, 0.0266838577, -0.999639928, 7.20503476e-006, 0.999642491, 0.0266825818, 0.00048978941)
  560. b12 = Instance.new("CylinderMesh", p12)
  561. b12.Name = "Mesh"
  562. b12.Scale = Vector3.new(2, 1, 1)
  563. p13 = Instance.new("Part", m2)
  564. p13.BrickColor = BrickColor.new("Really black")
  565. p13.FormFactor = Enum.FormFactor.Custom
  566. p13.Size = Vector3.new(0.799999356, 0.799999356, 0.799999356)
  567. p13.CFrame = CFrame.new(-0.683435977, 0.499675006, -15.0163736, -6.74276521e-007, -1.59814874e-006, 0.999998927, -0.999996066, -5.96045879e-007, 6.44474198e-007, -7.74858904e-007, -0.999998748, 1.56834574e-006)
  568. p13.BottomSurface = Enum.SurfaceType.Smooth
  569. p13.TopSurface = Enum.SurfaceType.Smooth
  570. b13 = Instance.new("SpecialMesh", p13)
  571. b13.MeshType = Enum.MeshType.Sphere
  572. b13.Name = "Mesh"
  573. m2.Parent = char
  574. m2:MakeJoints()
  575.  
  576. local prev
  577. local parts = char.Fueltank:GetChildren()
  578.  
  579. for i = 1,#parts do
  580. if (parts[i].className == "Part") or (parts[i].className == "WedgePart") or (parts[i].className == "Seat") or (parts[i].className == "VehicleSeat") or (parts[i].className == "CornerWedgePart") then
  581. if (prev ~= nil)then
  582. local weld = Instance.new("Weld")
  583. weld.Part0 = prev
  584. weld.Part1 = parts[i]
  585. weld.C0 = prev.CFrame:inverse()
  586. weld.C1 = parts[i].CFrame:inverse()
  587. weld.Parent = prev
  588. end
  589. prev = parts[i]
  590. end
  591. end
  592.  
  593. local prev
  594. local parts = char.Flamethrower:GetChildren()
  595.  
  596. for i = 1,#parts do
  597. if (parts[i].className == "Part") or (parts[i].className == "WedgePart") or (parts[i].className == "Seat") or (parts[i].className == "VehicleSeat") or (parts[i].className == "CornerWedgePart") then
  598. if (prev ~= nil)then
  599. local weld = Instance.new("Weld")
  600. weld.Part0 = prev
  601. weld.Part1 = parts[i]
  602. weld.C0 = prev.CFrame:inverse()
  603. weld.C1 = parts[i].CFrame:inverse()
  604. weld.Parent = prev
  605. end
  606. prev = parts[i]
  607. end
  608. end
  609.  
  610. char.Fueltank.FuelCenter.CFrame = CFrame.new(char.Torso.Position)
  611.  
  612. local arms = nil
  613. local torso = nil
  614. local welds = {}
  615.  
  616. arms = {char:FindFirstChild("Left Arm"), char:FindFirstChild("Right Arm")}
  617. torso = char:FindFirstChild("Torso")
  618. if arms ~= nil and torso ~= nil then
  619. local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
  620. if sh ~= nil then
  621. local yes = true
  622. if yes then
  623. yes = false
  624. sh[1].Part1 = nil
  625. sh[2].Part1 = nil
  626. local weld1 = Instance.new("Weld")
  627. weld1.Part0 = torso
  628. weld1.Parent = torso
  629. weld1.Part1 = arms[1]
  630. weld1.C1 = CFrame.new(-0.249, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  631. welds[1] = weld1
  632. local weld2 = Instance.new("Weld")
  633. weld2.Part0 = torso
  634. weld2.Parent = torso
  635. weld2.Part1 = arms[2]
  636. weld2.C1 = CFrame.new(-1, -0.2, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  637. welds[2] = weld2
  638. end
  639. end
  640. end
  641.  
  642. char.Flamethrower.Handle.CFrame = CFrame.new(char["Left Arm"].Position)
  643.  
  644. local SWeld = Instance.new("Weld",char.Fueltank.FuelCenter)
  645. SWeld.Name = "SWeld"
  646. SWeld.Part0 = char.Fueltank.FuelCenter
  647. SWeld.Part1 = char.Torso
  648. SWeld.C0 = CFrame.new(1.35,0,0)*CFrame.fromEulerAnglesXYZ(0,-7.9,59.68)
  649.  
  650. local SWeld2 = Instance.new("Weld",char.Flamethrower.Handle)
  651. SWeld2.Name = "SWeld2"
  652. SWeld2.Part0 = char.Flamethrower.Handle
  653. SWeld2.Part1 = char["Left Arm"]
  654. SWeld2.C0 = CFrame.new(-.70,0,-1)*CFrame.Angles(5,7.8,0)
  655.  
  656. local auto = 0
  657.  
  658.  
  659. local s1=Instance.new("Sound")
  660. s1.SoundId="http://www.roblox.com/asset/?id=260131404"
  661. s1.PlayOnRemove=false
  662. s1.Volume=100
  663. s1.Looped=false
  664. s1.Pitch = 1
  665. s1.Parent=char.Flamethrower.Handle
  666.  
  667. local s2=Instance.new("Sound")
  668. s2.SoundId="http://www.roblox.com/asset/?id=260131485"
  669. s2.PlayOnRemove=false
  670. s2.Volume=100
  671. s2.Looped=true
  672. s2.Pitch = 1
  673. s2.Parent=char.Flamethrower.Handle
  674.  
  675. local s3=Instance.new("Sound")
  676. s3.SoundId="http://www.roblox.com/asset/?id=260131519"
  677. s3.PlayOnRemove=false
  678. s3.Volume=100
  679. s3.Looped=false
  680. s3.Pitch = 1
  681. s3.Parent=char.Flamethrower.Handle
  682.  
  683. mouse.Button1Down:connect(function()
  684. if auto == 0 then
  685. s1:Stop()
  686. s2:Stop()
  687. end
  688. if auto == 1 then
  689. s1:Play()
  690. s1:Stop()
  691. s2:Play()
  692. end
  693. end)
  694.  
  695. mouse.Button1Up:connect(function()
  696. if auto == 0 then
  697. s1:Stop()
  698. s2:Stop()
  699. s3:Play()
  700. if auto == 1 then
  701. s1:Stop()
  702. s2:Stop()
  703. s3:Stop()
  704. end
  705. end
  706. end)
  707.  
  708. local burning = false
  709. local burning2 = false
  710.  
  711. mouse.Button1Down:connect(function()
  712. SWeld2.C0 = CFrame.new(-.70,0,-.80)*CFrame.Angles(5,7.8,0)
  713. char.Fueltank.ChangeColor.BrickColor = BrickColor.New("Really red")
  714. char.Fueltank.ChangeColor2.BrickColor = BrickColor.New("Really red")
  715. char.Fueltank.FuelCenter.BrickColor = BrickColor.New("Really red")
  716. end)
  717.  
  718. mouse.Button1Down:connect(function()
  719. auto = 1
  720. while auto == 1 do
  721. wait(.20)
  722. local smoke = Instance.new("Smoke",char.Flamethrower.Barrel)
  723. game.Debris:AddItem(smoke,1)
  724. local bullet = Instance.new("Part",workspace)
  725. game.Debris:AddItem(bullet,.90)
  726. bullet.Size = Vector3.new(2,2,2)
  727. bullet.Shape = "Ball"
  728. bullet.Transparency = 1
  729. bullet.CanCollide = false
  730. bullet.Name = "bullet"
  731. bullet.CFrame = char.Flamethrower.Barrel.CFrame*CFrame.new(0,3,0)
  732. local fire = Instance.new("Fire",bullet)
  733. local light = Instance.new("PointLight", bullet)
  734. light.Range = 5
  735. light.Brightness = 20
  736. light.Color = Color3.new(255, 85, 0)
  737. local bvelocity = Instance.new("BodyVelocity",bullet)
  738. bvelocity.maxForce = Vector3.new(math.huge,math.huge,850)
  739. bvelocity.velocity = mouse.Hit.lookVector*47
  740. bullet.Touched:connect(function(hit)
  741. if hit.Parent:FindFirstChild("Humanoid") then
  742. local fire1 = Instance.new("Fire",hit.Parent.Torso)
  743. game.Debris:AddItem(fire1,3)
  744. hit.Parent.Humanoid:TakeDamage(math.random(0.52,0.65))
  745. wait(.30)
  746. hit.Parent.Humanoid:TakeDamage(math.random(0.53,0.66))
  747. wait(.30)
  748. hit.Parent.Humanoid:TakeDamage(math.random(0.54,0.67))
  749. elseif hit.Parent:FindFirstChild("Humanoid") == nil and not hit.Name:lower():find("base") and not hit.Name:lower():find("Base") and not hit.Name:lower():find("Baseplate") then
  750. local fire2 = Instance.new("Fire",hit)
  751. wait(3)
  752. hit.Transparency = .25
  753. wait(1)
  754. hit.Transparency = .50
  755. hit.BrickColor = BrickColor.new("Really black")
  756. wait(2)
  757. hit.Transparency = .75
  758. wait(1)
  759. hit.Transparency = 1
  760. fire2:Destroy()
  761. wait(.01)
  762. hit:Destroy()
  763. end
  764. if hit.Parent:FindFirstChild("Humanoid") and hit.Parent.Torso:FindFirstChild("Fire") then
  765. burning = true
  766. if burning == true then
  767. while burning do
  768. wait(.80)
  769. hit.Parent.Humanoid:TakeDamage(.44)
  770. if hit.Parent.Torso:FindFirstChild("Fire")==nil then
  771. burning = false
  772. end
  773. end
  774. end
  775. end
  776. end)
  777. end
  778. end)
  779.  
  780. mouse.Button1Up:connect(function()
  781. SWeld2.C0 = CFrame.new(-.70,0,-1)*CFrame.Angles(5,7.8,0)
  782. auto = 0
  783. char.Fueltank.ChangeColor.BrickColor = BrickColor.New("Institutional white")
  784. char.Fueltank.ChangeColor2.BrickColor = BrickColor.New("Institutional white")
  785. char.Fueltank.FuelCenter.BrickColor = BrickColor.New("Institutional white")
  786. if char.Flamethrower.Barrel:FindFirstChild("Smoke") then
  787. char.Flamethrower.Barrel.Smoke:Remove()
  788. end
  789. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement