Advertisement
lafur

Untitled

Apr 20th, 2019
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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 print("FE Compatibility code V2 by Mokiros")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end --Created by PenguinAnonymous with PenguinAnonymous's model to script converter
  6. wait()
  7. local bombs = 3
  8. local ammo = 300
  9. local firing = false
  10. local mouse = game:GetService("Players").LocalPlayer:GetMouse()
  11. mas = Instance.new("Model",game:GetService("Lighting"))
  12. mas.Name = "CompiledModel"
  13. o1 = Instance.new("Model")
  14. o2 = Instance.new("Seat")
  15. o3 = Instance.new("BodyPosition")
  16. o4 = Instance.new("BodyGyro")
  17. o5 = Instance.new("Seat")
  18. o6 = Instance.new("Seat")
  19. o7 = Instance.new("Seat")
  20. o8 = Instance.new("Seat")
  21. o9 = Instance.new("Seat")
  22. o10 = Instance.new("Seat")
  23. o11 = Instance.new("Part")
  24. o12 = Instance.new("Part")
  25. o13 = Instance.new("Part")
  26. o14 = Instance.new("Decal")
  27. o15 = Instance.new("Part")
  28. o16 = Instance.new("Decal")
  29. o17 = Instance.new("Part")
  30. o18 = Instance.new("Decal")
  31. o19 = Instance.new("Part")
  32. o20 = Instance.new("Decal")
  33. o21 = Instance.new("Part")
  34. o22 = Instance.new("Decal")
  35. o23 = Instance.new("Part")
  36. o24 = Instance.new("Part")
  37. o25 = Instance.new("Part")
  38. o26 = Instance.new("Part")
  39. o27 = Instance.new("Part")
  40. o1.Parent = mas
  41. o2.Name = "Heli"
  42. o2.Parent = o1
  43. o2.BrickColor = BrickColor.new("Black")
  44. o2.Position = Vector3.new(-2, 1.5, 1)
  45. o2.Size = Vector3.new(2, 1, 2)
  46. o2.CFrame = CFrame.new(-2, 1.5, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  47. o2.Color = Color3.new(0.105882, 0.164706, 0.207843)
  48. o2.Position = Vector3.new(-2, 1.5, 1)
  49. o3.Parent = o2
  50. o3.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  51. o4.Parent = o2
  52. o4.maxTorque = Vector3.new(400000, 400000, 400000)
  53. o4.MaxTorque = Vector3.new(400000, 400000, 400000)
  54. o5.Parent = o1
  55. o5.BrickColor = BrickColor.new("Black")
  56. o5.Position = Vector3.new(-6, 1.5, 21)
  57. o5.Size = Vector3.new(2, 1, 2)
  58. o5.CFrame = CFrame.new(-6, 1.5, 21, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  59. o5.Color = Color3.new(0.105882, 0.164706, 0.207843)
  60. o5.Position = Vector3.new(-6, 1.5, 21)
  61. o6.Parent = o1
  62. o6.BrickColor = BrickColor.new("Black")
  63. o6.Position = Vector3.new(-2, 1.5, 21)
  64. o6.Size = Vector3.new(2, 1, 2)
  65. o6.CFrame = CFrame.new(-2, 1.5, 21, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  66. o6.Color = Color3.new(0.105882, 0.164706, 0.207843)
  67. o6.Position = Vector3.new(-2, 1.5, 21)
  68. o7.Parent = o1
  69. o7.BrickColor = BrickColor.new("Black")
  70. o7.Position = Vector3.new(2, 1.5, 21)
  71. o7.Size = Vector3.new(2, 1, 2)
  72. o7.CFrame = CFrame.new(2, 1.5, 21, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  73. o7.Color = Color3.new(0.105882, 0.164706, 0.207843)
  74. o7.Position = Vector3.new(2, 1.5, 21)
  75. o8.Parent = o1
  76. o8.BrickColor = BrickColor.new("Black")
  77. o8.Position = Vector3.new(-6, 1.5, 17)
  78. o8.Size = Vector3.new(2, 1, 2)
  79. o8.CFrame = CFrame.new(-6, 1.5, 17, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  80. o8.Color = Color3.new(0.105882, 0.164706, 0.207843)
  81. o8.Position = Vector3.new(-6, 1.5, 17)
  82. o9.Parent = o1
  83. o9.BrickColor = BrickColor.new("Black")
  84. o9.Position = Vector3.new(-2, 1.5, 17)
  85. o9.Size = Vector3.new(2, 1, 2)
  86. o9.CFrame = CFrame.new(-2, 1.5, 17, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  87. o9.Color = Color3.new(0.105882, 0.164706, 0.207843)
  88. o9.Position = Vector3.new(-2, 1.5, 17)
  89. o10.Parent = o1
  90. o10.BrickColor = BrickColor.new("Black")
  91. o10.Position = Vector3.new(2, 1.5, 17)
  92. o10.Size = Vector3.new(2, 1, 2)
  93. o10.CFrame = CFrame.new(2, 1.5, 17, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  94. o10.Color = Color3.new(0.105882, 0.164706, 0.207843)
  95. o10.Position = Vector3.new(2, 1.5, 17)
  96. o11.Parent = o1
  97. o11.Position = Vector3.new(5.5, 9, 12)
  98. o11.Rotation = Vector3.new(-180, 0, -180)
  99. o11.Size = Vector3.new(1, 4, 30)
  100. o11.CFrame = CFrame.new(5.5, 9, 12, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  101. o11.Position = Vector3.new(5.5, 9, 12)
  102. o12.Parent = o1
  103. o12.Position = Vector3.new(-9.5, 9, 12)
  104. o12.Rotation = Vector3.new(-0, 90, 0)
  105. o12.Size = Vector3.new(30, 4, 1)
  106. o12.CFrame = CFrame.new(-9.5, 9, 12, -0, 0, 1, -0, 1, 0, -1, 0, 0)
  107. o12.Position = Vector3.new(-9.5, 9, 12)
  108. o13.Parent = o1
  109. o13.Position = Vector3.new(5.5, 4, 20.5)
  110. o13.Rotation = Vector3.new(0, 90, 0)
  111. o13.Size = Vector3.new(13, 6, 1)
  112. o13.CFrame = CFrame.new(5.5, 4, 20.5, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  113. o13.Position = Vector3.new(5.5, 4, 20.5)
  114. o14.Parent = o13
  115. o14.Texture = "http://www.roblox.com/asset/?id=250437645"
  116. o14.Face = Enum.NormalId.Back
  117. o15.Parent = o1
  118. o15.Position = Vector3.new(5.5, 4, 2.5)
  119. o15.Rotation = Vector3.new(0, 90, 0)
  120. o15.Size = Vector3.new(11, 6, 1)
  121. o15.CFrame = CFrame.new(5.5, 4, 2.5, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  122. o15.Position = Vector3.new(5.5, 4, 2.5)
  123. o16.Parent = o15
  124. o16.Texture = "http://www.roblox.com/asset/?id=236149250"
  125. o16.Face = Enum.NormalId.Back
  126. o17.Parent = o1
  127. o17.Position = Vector3.new(-2.00000048, 6, 26.5)
  128. o17.Rotation = Vector3.new(-180, 0, -180)
  129. o17.Size = Vector3.new(14, 10, 1)
  130. o17.CFrame = CFrame.new(-2.00000048, 6, 26.5, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  131. o17.Position = Vector3.new(-2.00000048, 6, 26.5)
  132. o18.Parent = o17
  133. o18.Texture = "http://www.roblox.com/asset/?id=117528164"
  134. o19.Parent = o1
  135. o19.Position = Vector3.new(-9.5, 4, 20.5)
  136. o19.Rotation = Vector3.new(0, 90, 0)
  137. o19.Size = Vector3.new(13, 6, 1)
  138. o19.CFrame = CFrame.new(-9.5, 4, 20.5, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  139. o19.Position = Vector3.new(-9.5, 4, 20.5)
  140. o20.Parent = o19
  141. o20.Texture = "http://www.roblox.com/asset/?id=250437645"
  142. o21.Parent = o1
  143. o21.Position = Vector3.new(-9.5, 4, 2.5)
  144. o21.Rotation = Vector3.new(0, 90, 0)
  145. o21.Size = Vector3.new(11, 6, 1)
  146. o21.CFrame = CFrame.new(-9.5, 4, 2.5, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  147. o21.Position = Vector3.new(-9.5, 4, 2.5)
  148. o22.Parent = o21
  149. o22.Texture = "http://www.roblox.com/asset/?id=236149250"
  150. o23.Parent = o1
  151. o23.Position = Vector3.new(-2, 11.5, 12)
  152. o23.CanCollide = false
  153. o23.Size = Vector3.new(16, 1, 30)
  154. o23.CFrame = CFrame.new(-2, 11.5, 12, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  155. o23.Position = Vector3.new(-2, 11.5, 12)
  156. o24.Parent = o1
  157. o24.Position = Vector3.new(-2, 10.0000143, -2.5)
  158. o24.Size = Vector3.new(14, 2, 1)
  159. o24.CFrame = CFrame.new(-2, 10.0000143, -2.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  160. o24.Position = Vector3.new(-2, 10.0000143, -2.5)
  161. o25.Parent = o1
  162. o25.Transparency = 0.5
  163. o25.Position = Vector3.new(-2, 6.00000381, -2.5)
  164. o25.Size = Vector3.new(14, 6, 1)
  165. o25.CFrame = CFrame.new(-2, 6.00000381, -2.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  166. o25.Position = Vector3.new(-2, 6.00000381, -2.5)
  167. o26.Parent = o1
  168. o26.Position = Vector3.new(-2, 2, -2.5)
  169. o26.Size = Vector3.new(14, 2, 1)
  170. o26.CFrame = CFrame.new(-2, 2, -2.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  171. o26.Position = Vector3.new(-2, 2, -2.5)
  172. o27.Parent = o1
  173. o27.Position = Vector3.new(-2, 0.5, 12)
  174. o27.Size = Vector3.new(16, 1, 30)
  175. o27.CFrame = CFrame.new(-2, 0.5, 12, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  176. o27.BottomSurface = Enum.SurfaceType.Smooth
  177. o27.Position = Vector3.new(-2, 0.5, 12)
  178. mas.Parent = game:GetService("Players").LocalPlayer.Character
  179. mas:MakeJoints()
  180. bp = o3
  181. vs = o2
  182. bg = o4
  183. o1 = Instance.new("ScreenGui")
  184. o2 = Instance.new("Frame")
  185. o3 = Instance.new("TextLabel")
  186. o4 = Instance.new("TextLabel")
  187. o1.Parent = game:GetService("Players").LocalPlayer.PlayerGui
  188. o2.Parent = o1
  189. o2.Position = UDim2.new(1,-205,1,-200)
  190. o2.Size = UDim2.new(0,200,0,100)
  191. o2.Position = UDim2.new(1,-205,1,-200)
  192. o2.BackgroundColor3 = Color3.new(0.0235294, 0.0235294, 0.0235294)
  193. o2.BackgroundTransparency = 0.5
  194. o3.Parent = o2
  195. o3.Size = UDim2.new(1,0,0.25,0)
  196. o3.Text = "BomberBus"
  197. o3.BackgroundColor3 = Color3.new(1, 1, 1)
  198. o3.BackgroundTransparency = 1
  199. o3.Font = Enum.Font.SourceSans
  200. o3.FontSize = Enum.FontSize.Size14
  201. o3.TextColor3 = Color3.new(1, 0, 0)
  202. o4.Name = "BombDetail"
  203. o4.Parent = o2
  204. o4.Position = UDim2.new(0,0,0.25,0)
  205. o4.Size = UDim2.new(1,0,0.25,0)
  206. o4.Text = "Bombs Left:"
  207. o4.Position = UDim2.new(0,0,0.25,0)
  208. o4.BackgroundColor3 = Color3.new(1, 1, 1)
  209. o4.BackgroundTransparency = 1
  210. o4.Font = Enum.Font.SourceSans
  211. o4.FontSize = Enum.FontSize.Size24
  212. o4.TextColor3 = Color3.new(1, 0, 0)
  213. o4.TextXAlignment = Enum.TextXAlignment.Left
  214. o5 = o4:Clone()
  215. o5.Parent = o2
  216. o5.Position = UDim2.new(0,0,0.5,0)
  217. o5.Text = "Ammo Left: "
  218. bombDetail = o4
  219. ammoDetail = o5
  220. bombFrame = o2
  221. rot = 180
  222. rotAdd = 0
  223. velx = 0
  224. vely = 0
  225. velz = 0
  226. bp.position = Vector3.new(0,4,0)
  227. local char = game:GetService("Players").LocalPlayer
  228. if char~=nil then
  229. local tor = char:findFirstChild("HumanoidRootPart")
  230. if tor~=nil then
  231. char:MoveTo(Vector3.new(vs.Position.X,vs.Position.Y+4,vs.Position.Z))
  232. end
  233. end
  234. game:GetService("RunService").RenderStepped:connect(function()
  235. if (vs~=nil)and(bp~=nil) then
  236. bombDetail.Text = "Bombs Left: " .. bombs
  237. ammoDetail.Text = "Ammo Left: " .. ammo
  238. local sw = vs:findFirstChild("SeatWeld")
  239. if sw~=nil then
  240. if game:GetService("Players"):GetPlayerFromCharacter(sw.Part1.Parent)==game:GetService("Players").LocalPlayer then
  241. bombFrame.Visible = true
  242. rot = rot + rotAdd/60
  243. bp.position = Vector3.new(bp.position.X+(velz*math.sin(rot)),bp.position.Y+vely,bp.position.Z+(velz*math.cos(rot)))
  244. bg.CFrame = CFrame.new(bp.position) * CFrame.Angles(0,rot,0)
  245. else
  246. sw:Destroy()
  247. end
  248. else
  249. bombFrame.Visible = false
  250. end
  251. if firing and sw~=nil and ammo>0 then
  252. local targ = mouse.Target
  253. local hit = mouse.Hit
  254. if hit~=nil then
  255. ammo = ammo - 1
  256. local startPos = vs.Position
  257. local hitPos = hit.p
  258. local size = Vector3.new(0.2,0.2,(startPos - hitPos).magnitude)
  259. local CFram = CFrame.new((startPos + hitPos)/2,startPos)
  260. local p = Instance.new("Part",workspace)
  261. p.Anchored = true
  262. p.CanCollide = false
  263. p.Size = size
  264. p.CFrame = CFram;
  265. p.BrickColor = BrickColor.Yellow()
  266. if targ~=nil then
  267. local hum = targ.Parent:findFirstChild("Humanoid") or targ.Parent.Parent:findFirstChild("Humanoid")
  268. if hum~=nil then
  269. hum.Health = hum.Health - (hum.MaxHealth/5)
  270. else
  271. pcall(function()
  272. targ:BreakJoints()
  273. if string.lower(targ.Name)~="base" and string.lower(targ.Name)~="baseplate" then
  274. targ.Anchored = false
  275. end
  276. end)
  277. end
  278. end
  279. game:GetService("Debris"):AddItem(p,0.1)
  280. end
  281. end
  282. end
  283. end)
  284. coroutine.resume(coroutine.create(function()
  285. while wait(20) do
  286. if bombs<3 then
  287. bombs = bombs + 1
  288. end
  289. if ammo<300 then
  290. if ammo>200 then
  291. ammo = 300
  292. else
  293. ammo = ammo + 100
  294. end
  295. end
  296. end
  297. end))
  298. mouse.Button1Down:connect(function()
  299. firing = true
  300. end)
  301. mouse.Button1Up:connect(function()
  302. firing = false
  303. end)
  304. function DropBomb()
  305. if bombs>0 then
  306. bombs = bombs - 1
  307. local p = Instance.new("Part",workspace)
  308. local pos = Vector3.new(vs.position.x,vs.position.Y-8,vs.position.Z)
  309. p.Shape = Enum.PartType.Ball
  310. p.Size = Vector3.new(1,1,1)
  311. p.Position = pos
  312. p.Touched:connect(function(hit)
  313. local ex = Instance.new("Explosion",workspace)
  314. ex.Position = p.Position
  315. ex.BlastRadius = 24
  316. ex.BlastPressure = 120000
  317. p:Destroy()
  318. end)
  319. end
  320. end
  321. uib = game:GetService("UserInputService").InputBegan:connect(function(input,gameProcessed)
  322. if input.UserInputType == Enum.UserInputType.Keyboard then
  323. if vs:findFirstChild("SeatWeld") then
  324. local keyPressed = input.KeyCode
  325. if keyPressed==Enum.KeyCode.E then
  326. vely = 20/60
  327. end
  328. if keyPressed==Enum.KeyCode.Q then
  329. vely = -20/60
  330. end
  331. if keyPressed==Enum.KeyCode.W then
  332. velz = -120/60
  333. end
  334. if keyPressed == Enum.KeyCode.S then
  335. velz = 120/60
  336. end
  337. if keyPressed == Enum.KeyCode.A then
  338. rotAdd = 3
  339. end
  340. if keyPressed == Enum.KeyCode.D then
  341. rotAdd = -3
  342. end
  343. if keyPressed == Enum.KeyCode.F then
  344. DropBomb()
  345. end
  346. end
  347. end
  348. end)
  349. uie = game:GetService("UserInputService").InputEnded:connect(function(input,gameProcessed)
  350. if input.UserInputType == Enum.UserInputType.Keyboard then
  351. local keyPressed = input.KeyCode
  352. --print(keyPressed)
  353. if keyPressed==Enum.KeyCode.E then
  354. vely = 0
  355. end
  356. if keyPressed==Enum.KeyCode.Q then
  357. vely = 0
  358. end
  359. if keyPressed==Enum.KeyCode.W then
  360. velz = 0
  361. velx = 0
  362. end
  363. if keyPressed == Enum.KeyCode.S then
  364. velz = 0
  365. end
  366. if keyPressed == Enum.KeyCode.A then
  367. rotAdd = 0
  368. end
  369. if keyPressed == Enum.KeyCode.D then
  370. rotAdd = 0
  371. end
  372. end
  373. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement