Advertisement
DaOMEGAa32

fe mantis

Jun 11th, 2019
397
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 52.82 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 V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86.  
  87. local h,t
  88. --Give the server mouse data every second frame, but only if the values changed
  89. --If player is not moving their mouse, client won't fire events
  90. local HB = game:GetService("RunService").Heartbeat
  91. while true do
  92. if h~=Mouse.Hit or t~=Mouse.Target then
  93. h,t=Mouse.Hit,Mouse.Target
  94. Event:FireServer({isMouse=true,Target=t,Hit=h})
  95. end
  96. --Wait 2 frames
  97. for i=1,2 do
  98. HB:Wait()
  99. end
  100. end]==],script)
  101.  
  102. ----Sandboxed game object that allows the usage of client-side methods and services
  103. --Real game object
  104. local RealGame = game
  105.  
  106. --Metatable for fake service
  107. local FakeService_Metatable = {
  108. __index = function(self,k)
  109. local s = rawget(self,"_RealService")
  110. if s then
  111. return typeof(s[k])=="function"
  112. and function(_,...)return s[k](s,...)end or s[k]
  113. end
  114. end,
  115. __newindex = function(self,k,v)
  116. local s = rawget(self,"_RealService")
  117. if s then s[k]=v end
  118. end
  119. }
  120. local function FakeService(t,RealService)
  121. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  122. return setmetatable(t,FakeService_Metatable)
  123. end
  124.  
  125. --Fake game object
  126. local FakeGame = {
  127. GetService = function(self,s)
  128. return rawget(self,s) or RealGame:GetService(s)
  129. end,
  130. Players = FakeService({
  131. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  132. },"Players"),
  133. UserInputService = FakeService(UIS,"UserInputService"),
  134. ContextActionService = FakeService(CAS,"ContextActionService"),
  135. RunService = FakeService({
  136. _btrs = {},
  137. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  138. BindToRenderStep = function(self,name,_,fun)
  139. self._btrs[name] = self.Heartbeat:Connect(fun)
  140. end,
  141. UnbindFromRenderStep = function(self,name)
  142. self._btrs[name]:Disconnect()
  143. end,
  144. },"RunService")
  145. }
  146. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  147. FakeGame.service = FakeGame.GetService
  148. FakeService(FakeGame,game)
  149. --Changing owner to fake player object to support owner:GetMouse()
  150. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  151. end
  152.  
  153. print("wait 1 second")
  154. wait(1)
  155. _G.mantisReload = function()
  156.  
  157. local plr = game:service'Players'.LocalPlayer
  158. local pg = plr:WaitForChild("PlayerGui")
  159. local mouse = plr:GetMouse()
  160. local char = plr.Character
  161. local root = char:WaitForChild'HumanoidRootPart'
  162. local head = char:WaitForChild'Head'
  163. local tor = char:WaitForChild'Torso'
  164. local la,ra = char["Left Arm"],char["Right Arm"]
  165. local ll,rl = char["Left Leg"],char["Right Leg"]
  166. tor.CFrame = tor.CFrame + Vector3.new(0,5,0)
  167.  
  168. local hum = char.Humanoid
  169. local step = game:GetService("RunService").RenderStepped
  170.  
  171. pcall(function() workspace["vmodel"..plr.Name]:Destroy() end)
  172. pcall(function() pg.bgui:Destroy() end)
  173. if not script:IsA("ModuleScript") then
  174. pcall(function() script.Parent.vehicularScript:Destroy() end)
  175. script.Name = "vehicularScript"
  176. end
  177.  
  178. local sg = Instance.new("ScreenGui",pg)
  179. sg.Name = "bgui"
  180. local p = Instance.new("ImageLabel",sg)
  181. p.Size = UDim2.new(0,6,0,6)
  182. p.Position = UDim2.new(.5,-3,.5,-3)
  183. p.BackgroundColor3 = Color3.new(1,1,1)
  184. p.BackgroundTransparency = .6
  185. local p2 = p:Clone()
  186. p2.Parent = sg
  187. p2.Rotation = 45
  188. local m = Instance.new("Model",workspace)
  189. m.Name = "vmodel"..plr.Name
  190. Instance.new("Humanoid",m).Name = "Shadow"
  191. local hval = Instance.new("NumberValue",m)
  192. hval.Value = 100
  193. hval.Name = "hp"
  194.  
  195. function weld(a,b,c,d)
  196. local w = Instance.new("Motor6D",a)
  197. w.Part0,w.Part1,w.C0,w.C1 = a,b,c or CFrame.new(),d or CFrame.new()
  198. return w
  199. end
  200.  
  201. do
  202. local function QuaternionFromCFrame(cf)
  203. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  204. local trace = m00 + m11 + m22
  205. if trace > 0 then
  206. local s = math.sqrt(1 + trace)
  207. local recip = 0.5/s
  208. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  209. else
  210. local i = 0
  211. if m11 > m00 then
  212. i = 1
  213. end
  214. if m22 > (i == 0 and m00 or m11) then
  215. i = 2
  216. end
  217. if i == 0 then
  218. local s = math.sqrt(m00-m11-m22+1)
  219. local recip = 0.5/s
  220. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  221. elseif i == 1 then
  222. local s = math.sqrt(m11-m22-m00+1)
  223. local recip = 0.5/s
  224. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  225. elseif i == 2 then
  226. local s = math.sqrt(m22-m00-m11+1)
  227. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  228. end
  229. end
  230. end
  231. local function QuaternionToCFrame(px, py, pz, x, y, z, w)
  232. local xs, ys, zs = x + x, y + y, z + z
  233. local wx, wy, wz = w*xs, w*ys, w*zs
  234. local xx = x*xs
  235. local xy = x*ys
  236. local xz = x*zs
  237. local yy = y*ys
  238. local yz = y*zs
  239. local zz = z*zs
  240. return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
  241. end
  242. local function QuaternionSlerp(a, b, t)
  243. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  244. local startInterp, finishInterp;
  245. if cosTheta >= 0.0001 then
  246. if (1 - cosTheta) > 0.0001 then
  247. local theta = math.acos(cosTheta)
  248. local invSinTheta = 1/math.sin(theta)
  249. startInterp = math.sin((1-t)*theta)*invSinTheta
  250. finishInterp = math.sin(t*theta)*invSinTheta
  251. else
  252. startInterp = 1-t
  253. finishInterp = t
  254. end
  255. else
  256. if (1+cosTheta) > 0.0001 then
  257. local theta = math.acos(-cosTheta)
  258. local invSinTheta = 1/math.sin(theta)
  259. startInterp = math.sin((t-1)*theta)*invSinTheta
  260. finishInterp = math.sin(t*theta)*invSinTheta
  261. else
  262. startInterp = t-1
  263. finishInterp = t
  264. end
  265. end
  266. return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
  267. end
  268. function clerp(a,b,t)
  269. local qa = {QuaternionFromCFrame(a)}
  270. local qb = {QuaternionFromCFrame(b)}
  271. local ax, ay, az = a.x, a.y, a.z
  272. local bx, by, bz = b.x, b.y, b.z
  273. local _t = 1-t
  274. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  275. end
  276. end
  277.  
  278. function lerp(a,b,t)
  279. return a+(b-a)*t
  280. end
  281.  
  282. local cancollide = true
  283. local par = m
  284. function Part(Part0,C0,C1,Size,Color,Ref,Trans,Mesh,Material)
  285. local p = Instance.new("Part",par)
  286. p.FormFactor = "Custom"
  287. p.TopSurface,p.BottomSurface,p.BackSurface,p.FrontSurface,p.RightSurface,p.LeftSurface = 10,10,10,10,10,10
  288. p.Size = Size or Vector3.new()
  289. p.Material = "SmoothPlastic"
  290. p.CanCollide = cancollide
  291. p.Locked = true
  292. if p.Size ~= Size or Mesh then
  293. local bm = Mesh or Instance.new("BlockMesh")
  294. bm.Parent = p
  295. bm.Scale = Size/p.Size*bm.Scale
  296. bm.Parent = p
  297. end
  298. p.BrickColor = Color or BrickColor.new(1001)
  299. p.Reflectance = Ref or 0
  300. p.Transparency = Trans or 0
  301. p.Material = Material or p.Material
  302. local w;
  303. if Part0 then
  304. w = weld(Part0,p,C0,C1)
  305. end
  306. return p,w
  307. end
  308.  
  309. function Mesh(type,scale,arg1,arg2,arg3,arg4,arg5)
  310. local m = Instance.new(type)
  311. m.Scale = scale or Vector3.new(1,1,1)
  312. if type == "SpecialMesh" then
  313. m.MeshType = arg1
  314. if arg1=="FileMesh" then
  315. m.MeshId = arg2 or m.MeshId
  316. m.TextureId = arg3 or m.TextureId
  317. m.Offset = arg4 or m.Offset
  318. m.VertexColor = arg5 or m.VertexColor
  319. else
  320. m.VertexColor = arg3 or m.VertexColor
  321. m.Offset = arg2 or m.Offset
  322. end
  323. else
  324. m.Offset = arg1 or m.Offset
  325. m.VertexColor = arg2 or m.VertexColor
  326. end
  327. return m
  328. end
  329.  
  330. local b = BrickColor.new
  331. local cols = {b(21),b(23),b(141),b(104),b(106),b(24),b(9),b(5)}
  332. function gcol(plr)
  333. if teamColorsEnabled and pcall(function() assert(plr.AccountAge ~= nil) end) and not plr.Neutral then
  334. return plr.TeamColor.Color
  335. else
  336. local v=0;
  337. local n=tostring(plr);
  338. local a=#n;
  339. for i in n:gmatch(".") do
  340. v = v + ((a+(#n%2==1 and -1 or 0))%4 > 1 and -1 or 1)*i:byte()
  341. a = a - 1
  342. end
  343. return cols[(v%8)+1].Color
  344. end
  345. end
  346.  
  347.  
  348. local body = BrickColor.new("Sand green")
  349. local body2 = BrickColor.new("Institutional white")
  350. local body3 = BrickColor.new("Sand green")
  351. local bodyref = .2
  352. local body2ref = .2
  353. local body3ref = .5
  354.  
  355. local pipe = BrickColor.new("Dark stone grey")
  356. local pipe2 = body2--BrickColor.new("Institutional white")
  357. local pipe3 = body--BrickColor.new("Really black")
  358. local piperef = .25
  359. local pipe2ref = .2
  360. local pipe3ref = .25
  361.  
  362. hum.Sit = true
  363.  
  364.  
  365. local fc = Instance.new("Model",m)
  366. par = fc
  367. local tr = Part(tor,CFrame.new(),CFrame.new(),Vector3.new(),BrickColor.new(),0,1)
  368. tr.Name = "Torso"
  369. Part(tr,CFrame.new(),CFrame.new(),Vector3.new(),BrickColor.new(),0,1).Name = "Head"
  370. Part(ra,CFrame.new(),CFrame.new(),Vector3.new(),ra.BrickColor,0,0).Name = "Right Arm"
  371. Part(la,CFrame.new(),CFrame.new(),Vector3.new(),la.BrickColor,0,0).Name = "Left Arm"
  372. Part(rl,CFrame.new(),CFrame.new(),Vector3.new(),rl.BrickColor,0,0).Name = "Right Leg"
  373. Part(ll,CFrame.new(),CFrame.new(),Vector3.new(),ll.BrickColor,0,0).Name = "Left Leg"
  374. local hm = Instance.new("Humanoid",fc)
  375. hm.MaxHealth = math.huge
  376. hm.PlatformStand = true
  377. for i,v in pairs(char:GetChildren()) do
  378. if v:IsA("Clothing") or v:IsA("CharacterMesh") then
  379. v:Clone().Parent = fc
  380. if v:IsA("Shirt") then
  381. pcall(game.Destroy,tr:FindFirstChild("Mesh"))
  382. pcall(game.Destroy,fc["Right Arm"]:FindFirstChild("Mesh"))
  383. pcall(game.Destroy,fc["Left Arm"]:FindFirstChild("Mesh"))
  384. elseif v:IsA("Pants") then
  385. pcall(game.Destroy,tr:FindFirstChild("Mesh"))
  386. pcall(game.Destroy,fc["Right Leg"]:FindFirstChild("Mesh"))
  387. pcall(game.Destroy,fc["Left Leg"]:FindFirstChild("Mesh"))
  388. end
  389. end
  390. end
  391. local h = Instance.new("Hat",fc)
  392. par = h
  393. Part(tr,CFrame.new(),CFrame.new(),Vector3.new(),BrickColor.new(),0,1).Name = "Handle"
  394. par = m
  395.  
  396. local main,mainweld = Part(tor,CFrame.new(0,-2.25,0)*CFrame.Angles(0,0,0),CFrame.new(0,0,0),Vector3.new(3,1,2),body,bodyref,0)
  397. Part(main,CFrame.new(0,.5,-.4),CFrame.new(),Vector3.new(2.3,.2,1.3),body2,0,0)
  398. local p = Part(main,CFrame.new(0,-.5,1)*CFrame.Angles(-1.4,0,0)*CFrame.new(0,.5,1.25),CFrame.new(),Vector3.new(2.3,.75,2.5),body,bodyref)
  399. Part(p,CFrame.new(0,.375,0),CFrame.new(),Vector3.new(2.2,.2,1.4),body2,0,0)
  400. p = Part(p,CFrame.new(0,-.375,1.25)*CFrame.Angles(-.15,0,0)*CFrame.new(0,.375,.8),CFrame.new(),Vector3.new(2.3,.75,1.6),body,bodyref)
  401. p.CanCollide = false
  402. Part(p,CFrame.new(0,.375,0),CFrame.new(),Vector3.new(2.2,.2,1.2),body2,0,0).CanCollide = false
  403. local back = Part(main,CFrame.new(0,1.4,1)*CFrame.Angles(.15,math.pi,0),CFrame.new(),Vector3.new(2,2,3),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(3,3.8,6.5),"FileMesh","rbxassetid://9944765"))
  404. Part(main,CFrame.new(0,-.5,1.75)*CFrame.Angles(-1.1,0,0)*CFrame.new(0,.5,1.25),CFrame.new(),Vector3.new(1.75,1.5,2.25),body,bodyref)
  405. Part(main,CFrame.new(0,0,1.25),CFrame.new(),Vector3.new(1.75,1.1,1.5),body,bodyref)
  406. local p = Part(main,CFrame.new(0,.5,-1)*CFrame.Angles(-.2,0,0)*CFrame.new(0,-.375,-.5),CFrame.new(),Vector3.new(2.75,.75,1),body,bodyref)
  407. Part(p,CFrame.new(0,.375,.05),CFrame.new(),Vector3.new(2.3,.2,.95),body2,0,0)
  408. Part(p,CFrame.new(0,.8,-.45),CFrame.new(),Vector3.new(2.3,1,.3),body2,0,0)
  409. Part(p,CFrame.new(0,1.5,-.4)*CFrame.Angles(.2,0,0),CFrame.new(),Vector3.new(2.3,.5,.3),body2,0,0)
  410. local p = Part(main,CFrame.new(0,2.1,-2.9)*CFrame.Angles(.9,0,0),CFrame.new(),Vector3.new(1.5,2.5,1),body,bodyref,0)
  411. local p = Part(p,CFrame.new(0,1.25,.5)*CFrame.Angles(-.9,0,0)*CFrame.new(0,.5,-.7),CFrame.new(),Vector3.new(1.501,1,1.4),body,bodyref,0)
  412. local h = Part(p,CFrame.new(.4,-.2,.7)*CFrame.Angles(0,1.425,0)*CFrame.new(.175,0,.9),CFrame.new(),Vector3.new(.35,.35,1.8),body,bodyref,0)
  413. Part(h,CFrame.new(0,0,.225),CFrame.new(),Vector3.new(.4,.4,1.3),body2,body2ref,0)
  414. Part(h,CFrame.new(0,0,.9),CFrame.new(),Vector3.new(.45,.45,.1),body3,body3ref,0)
  415. Part(h,CFrame.new(0,0,-.45),CFrame.new(),Vector3.new(.425,.425,.1),body3,body3ref,0)
  416. Part(h,CFrame.new(0,0,.75),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  417. Part(h,CFrame.new(0,0,.6),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  418. Part(h,CFrame.new(0,0,.45),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  419. Part(h,CFrame.new(0,0,.3),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  420. Part(h,CFrame.new(0,0,.15),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  421. Part(h,CFrame.new(0,0,0),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  422. Part(h,CFrame.new(0,0,-.15),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  423. Part(h,CFrame.new(0,0,-.3),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  424. local h = Part(p,CFrame.new(-.4,-.2,.7)*CFrame.Angles(0,-1.425,0)*CFrame.new(-.175,0,.9),CFrame.new(),Vector3.new(.35,.35,1.8),body,bodyref,0)
  425. Part(h,CFrame.new(0,0,.225),CFrame.new(),Vector3.new(.4,.4,1.3),body2,body2ref,0)
  426. Part(h,CFrame.new(0,0,.9),CFrame.new(),Vector3.new(.45,.45,.1),body3,body3ref,0)
  427. Part(h,CFrame.new(0,0,-.45),CFrame.new(),Vector3.new(.425,.425,.1),body3,body3ref,0)
  428. Part(h,CFrame.new(0,0,.75),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  429. Part(h,CFrame.new(0,0,.6),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  430. Part(h,CFrame.new(0,0,.45),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  431. Part(h,CFrame.new(0,0,.3),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  432. Part(h,CFrame.new(0,0,.15),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  433. Part(h,CFrame.new(0,0,0),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  434. Part(h,CFrame.new(0,0,-.15),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  435. Part(h,CFrame.new(0,0,-.3),CFrame.new(),Vector3.new(.415,.415,.025),body3,body3ref,0)
  436.  
  437. local e = Part(main,CFrame.new(0,1,-4.6)*CFrame.Angles(-.2,-math.pi/2,0)*CFrame.new(0,-.2,0),CFrame.new(),Vector3.new(5,5,5),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  438. p = Part(e,CFrame.new(-2.25,2.25,0)*CFrame.Angles(0,-math.pi/2,0)*CFrame.Angles(-.05,0,0),CFrame.new(),Vector3.new(2,2,3),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(2,1.75,9.5),"FileMesh","rbxassetid://9944765"))
  439. p = Part(p,CFrame.new(0,-.2,.4)*CFrame.Angles(0,0,0)*CFrame.Angles(-.175,0,0),CFrame.new(),Vector3.new(1,1,1),body2,body2ref,0,Mesh("SpecialMesh",Vector3.new(2.3,2.3,2),"FileMesh","rbxassetid://9944765"))
  440.  
  441. p = Part(e,CFrame.new(2,.25,2)*CFrame.Angles(1.35,math.pi/2,0)*CFrame.Angles(0,0,0),CFrame.new(),Vector3.new(2,2,3),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(2.5,2.5,9.5),"FileMesh","rbxassetid://9944765"))
  442. p = Part(p,CFrame.new(0,.2,-4.55)*CFrame.Angles(0,math.pi,-.1),CFrame.new(),Vector3.new(1,1,1),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(1.6,1.1,9),"FileMesh","rbxassetid://9944765"))
  443.  
  444. p = Part(e,CFrame.new(2,.25,-2)*CFrame.Angles(-1.35,math.pi/2,0)*CFrame.Angles(0,0,0),CFrame.new(),Vector3.new(2,2,3),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(2.5,2.5,9.5),"FileMesh","rbxassetid://9944765"))
  445. p = Part(p,CFrame.new(0,.2,-4.55)*CFrame.Angles(0,math.pi,-.1),CFrame.new(),Vector3.new(1,1,1),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(1.6,1.1,9),"FileMesh","rbxassetid://9944765"))
  446.  
  447.  
  448.  
  449. local e2 = Part(e,CFrame.new(-2.5,0,0)*CFrame.Angles(0,math.pi/2,0),CFrame.new(),Vector3.new(5,5,1),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Sphere"))
  450. local et = Part(e2,CFrame.new(0,.05,-.6)*CFrame.Angles(-math.pi/2+.05,0,0),CFrame.new(),Vector3.new(5,5,1),body,bodyref,0,Mesh("SpecialMesh",Vector3.new(3.45,5,3.45),"FileMesh","rbxassetid://16659502"))
  451. local g1 = Part(et,CFrame.new(0,-.5,0)*CFrame.Angles(math.pi/2,0,0),CFrame.new(),Vector3.new(2.5,2.5,2.5),body2,body2ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Sphere"))
  452. local g2 = Part(g1,CFrame.new(0,0,-1)*CFrame.Angles(.15,math.pi/2,0),CFrame.new(),Vector3.new(.75,.6,.6),body2,body2ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  453. local t1 = Part(g2,CFrame.new(.9,.05,0)*CFrame.Angles(0,0,0),CFrame.new(),Vector3.new(1,.4,.4),body3,body3ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  454. local t1s = Instance.new("Sound",t1)
  455. t1s.SoundId = "rbxassetid://78498351"
  456. t1s.Volume = 0.5
  457. t1s.Pitch = 1.5
  458.  
  459. Part(t1,CFrame.Angles(.75,0,0)*CFrame.new(.3,.2,0)*CFrame.Angles(0,0,math.pi/2),CFrame.new(),Vector3.new(.025,.15,.15),BrickColor.new(1003),0,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  460. Part(t1,CFrame.Angles(.75,0,0)*CFrame.new(0,.2,0)*CFrame.Angles(0,0,math.pi/2),CFrame.new(),Vector3.new(.025,.15,.15),BrickColor.new(1003),0,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  461. Part(t1,CFrame.Angles(.75,0,0)*CFrame.new(-.3,.2,0)*CFrame.Angles(0,0,math.pi/2),CFrame.new(),Vector3.new(.025,.15,.15),BrickColor.new(1003),0,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  462. Part(t1,CFrame.Angles(-.75,0,0)*CFrame.new(.3,.2,0)*CFrame.Angles(0,0,math.pi/2),CFrame.new(),Vector3.new(.025,.15,.15),BrickColor.new(1003),0,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  463. Part(t1,CFrame.Angles(-.75,0,0)*CFrame.new(0,.2,0)*CFrame.Angles(0,0,math.pi/2),CFrame.new(),Vector3.new(.025,.15,.15),BrickColor.new(1003),0,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  464. Part(t1,CFrame.Angles(-.75,0,0)*CFrame.new(-.3,.2,0)*CFrame.Angles(0,0,math.pi/2),CFrame.new(),Vector3.new(.025,.15,.15),BrickColor.new(1003),0,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  465. Part(t1,CFrame.new(.5,0,0),CFrame.new(),Vector3.new(.01,.225,.225),BrickColor.new(1003),0,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  466.  
  467. local b = Part(main,CFrame.new(0,-.65,-2.9),CFrame.new(),Vector3.new(2.8,2,7.9),body,bodyref,0)
  468. local b2 = Part(b,CFrame.new(0,-.5,-2.5),CFrame.new(),Vector3.new(7,1,2),body,bodyref,0)
  469.  
  470. local w = Part(b2,CFrame.new(-3.5,0,0),CFrame.new(),Vector3.new(1.2,1.05,2),body,bodyref,0)
  471. local w = Part(w,CFrame.new(.6,0,-1)*CFrame.Angles(0,.5,0)*CFrame.new(-.6,0,-1),CFrame.new(),Vector3.new(1.2,1.049,2),body,bodyref,0)
  472. Part(w,CFrame.new(.6,0,0),CFrame.new(),Vector3.new(.5,1.1,2.07),body2,body2ref,0)
  473. local w = Part(w,CFrame.new(.6,0,-1)*CFrame.Angles(0,.5,0)*CFrame.new(-.6,0,-.95),CFrame.new(),Vector3.new(1.2,1.05,1.9),body,bodyref,0)
  474. Part(w,CFrame.new(.6,0,0),CFrame.new(),Vector3.new(.5,1.095,2.05),body2,body2ref,0)
  475. local w = Part(w,CFrame.new(.6,0,-.95)*CFrame.Angles(0,.57,0)*CFrame.new(-.65,0,-1.2),CFrame.new(),Vector3.new(1.3,1.049,2.4),body,bodyref,0)
  476. Part(w,CFrame.new(.65,0,.8),CFrame.new(),Vector3.new(.5,1.1,.95),body2,body2ref,0)
  477. local w = Part(w,CFrame.new(-.6,0,-1.2)*CFrame.Angles(0,-1.57,0)*CFrame.new(.8,0,-1.25),CFrame.new(),Vector3.new(1.6,1.05,2.5),body,bodyref,0)
  478. local w = Part(w,CFrame.new(-.8,0,-1.25)*CFrame.Angles(0,-.4,0)*CFrame.new(.7,0,1.25),CFrame.new(),Vector3.new(1.4,1.049,2.5),body,bodyref,0)
  479. local w = Part(w,CFrame.new(.7,0,1.25)*CFrame.Angles(0,-.45,0)*CFrame.new(-.7,0,1),CFrame.new(),Vector3.new(1.4,1.05,2),body,bodyref,0)
  480. local w = Part(w,CFrame.new(-.7,0,1)*CFrame.Angles(0,.6,0)*CFrame.new(.7,0,1),CFrame.new(),Vector3.new(1.4,1.049,2),body,bodyref,0)
  481. local w = Part(w,CFrame.new(-.7,0,1)*CFrame.Angles(0,.55,0)*CFrame.new(.7,0,1),CFrame.new(),Vector3.new(1.4,1.05,2),body,bodyref,0)
  482. local w = Part(w,CFrame.new(-.7,0,1)*CFrame.Angles(0,.5,0)*CFrame.new(.7,0,1),CFrame.new(),Vector3.new(1.4,1.049,2),body,bodyref,0)
  483. local w = Part(w,CFrame.new(-.7,0,1)*CFrame.Angles(0,.45,0)*CFrame.new(.6,0,.5),CFrame.new(),Vector3.new(1.5,1.05,1),body,bodyref,0)
  484. local w = Part(w,CFrame.new(-.75,0,.5)*CFrame.Angles(0,.325,0)*CFrame.new(.5,0,1.3),CFrame.new(),Vector3.new(1.6,1.049,2.6),body,bodyref,0)
  485. local w = Part(w,CFrame.new(-.2,0,1.3)*CFrame.Angles(0,.65,0)*CFrame.new(.5,0,.8),CFrame.new(),Vector3.new(1,1.05,1.6),body,bodyref,0)
  486. local w = Part(w,CFrame.new(-.5,0,.8)*CFrame.Angles(0,.45,0)*CFrame.new(.5,0,1),CFrame.new(),Vector3.new(1,1.05,2),body,bodyref,0)
  487.  
  488.  
  489. cancollide = false
  490. Part(b2,CFrame.new(-3.5-3,.125,0)*CFrame.Angles(-math.pi/2,0,0),CFrame.new(),Vector3.new(3,3,1),body2,body2ref,0,Mesh("SpecialMesh",Vector3.new(5,5,6),"FileMesh","rbxassetid://3270017"),"DiamondPlate")
  491. Part(b2,CFrame.new(-3.5-3,-.125,0)*CFrame.Angles(-math.pi/2,0,0),CFrame.new(),Vector3.new(3,3,1),body2,body2ref,0,Mesh("SpecialMesh",Vector3.new(5,5,6),"FileMesh","rbxassetid://3270017"))
  492. cancollide = true
  493.  
  494. local propl,proplw = Part(b2,CFrame.new(-6.5,0,0),CFrame.new(),Vector3.new(.4,.75,.4),body2,body2ref,0,Mesh("CylinderMesh",Vector3.new(1,1,1)),"DiamondPlate")
  495. Part(propl,CFrame.new(0,.35,0),CFrame.new(),Vector3.new(.6,.25,.6),body3,body3ref,0,Mesh("CylinderMesh",Vector3.new(1,1,1)),"DiamondPlate")
  496. Part(propl,CFrame.new(0,-.35,0),CFrame.new(),Vector3.new(.5,.15,.5),body3,body3ref,0,Mesh("CylinderMesh",Vector3.new(1,1,1)),"DiamondPlate")
  497. Part(propl,CFrame.Angles(0,0*math.pi*2/3,0)*CFrame.new(0,0,.3),CFrame.new(),Vector3.new(.15,.65,.3),body3,body3ref,0,nil,"DiamondPlate")
  498. Part(propl,CFrame.Angles(0,1*math.pi*2/3,0)*CFrame.new(0,0,.3),CFrame.new(),Vector3.new(.15,.65,.3),body3,body3ref,0,nil,"DiamondPlate")
  499. Part(propl,CFrame.Angles(0,2*math.pi*2/3,0)*CFrame.new(0,0,.3),CFrame.new(),Vector3.new(.15,.65,.3),body3,body3ref,0,nil,"DiamondPlate")
  500. propl.Name = "SoundPlayer1"
  501. local ps2 = Instance.new("Sound",propl)
  502. ps2.SoundId = "rbxassetid://134145308"
  503. ps2.Pitch = 2
  504. ps2.Volume = 1
  505. ps2.Looped = true
  506. ps2:Play()
  507.  
  508.  
  509. local p = Part(propl,CFrame.Angles(0,0*math.pi*2/3,0)*CFrame.new(0,0,.35+.8)*CFrame.Angles(0,0,-1.3),CFrame.new(),Vector3.new(.05,.5,1.7),body2,body2ref,0,nil,"Plastic")
  510. Part(p,CFrame.Angles(0,0,1.3)*CFrame.new(-.125,0,.85),CFrame.new(),Vector3.new(.7,.25,.05),body2,body2ref,0,nil,"Plastic")
  511. local p = Part(propl,CFrame.Angles(0,1*math.pi*2/3,0)*CFrame.new(0,0,.35+.8)*CFrame.Angles(0,0,-1.3),CFrame.new(),Vector3.new(.05,.5,1.7),body2,body2ref,0,nil,"Plastic")
  512. Part(p,CFrame.Angles(0,0,1.3)*CFrame.new(-.125,0,.85),CFrame.new(),Vector3.new(.7,.25,.05),body2,body2ref,0,nil,"Plastic")
  513. local p = Part(propl,CFrame.Angles(0,2*math.pi*2/3,0)*CFrame.new(0,0,.35+.8)*CFrame.Angles(0,0,-1.3),CFrame.new(),Vector3.new(.05,.5,1.7),body2,body2ref,0,nil,"Plastic")
  514. Part(p,CFrame.Angles(0,0,1.3)*CFrame.new(-.125,0,.85),CFrame.new(),Vector3.new(.7,.25,.05),body2,body2ref,0,nil,"Plastic")
  515.  
  516.  
  517. local w = Part(b2,CFrame.new(3.5,0,0),CFrame.new(),Vector3.new(1.2,1.05,2),body,bodyref,0)
  518. local w = Part(w,CFrame.new(-.6,0,-1)*CFrame.Angles(0,-.5,0)*CFrame.new(.6,0,-1),CFrame.new(),Vector3.new(1.2,1.049,2),body,bodyref,0)
  519. Part(w,CFrame.new(-.6,0,0),CFrame.new(),Vector3.new(.5,1.1,2.07),body2,body2ref,0)
  520. local w = Part(w,CFrame.new(-.6,0,-1)*CFrame.Angles(0,-.5,0)*CFrame.new(.6,0,-.95),CFrame.new(),Vector3.new(1.2,1.05,1.9),body,bodyref,0)
  521. Part(w,CFrame.new(-.6,0,0),CFrame.new(),Vector3.new(.5,1.095,2.05),body2,body2ref,0)
  522. local w = Part(w,CFrame.new(-.6,0,-.95)*CFrame.Angles(0,-.57,0)*CFrame.new(.65,0,-1.2),CFrame.new(),Vector3.new(1.3,1.049,2.4),body,bodyref,0)
  523. Part(w,CFrame.new(-.65,0,.8),CFrame.new(),Vector3.new(.5,1.1,.95),body2,body2ref,0)
  524. local w = Part(w,CFrame.new(.6,0,-1.2)*CFrame.Angles(0,1.57,0)*CFrame.new(-.8,0,-1.25),CFrame.new(),Vector3.new(1.6,1.05,2.5),body,bodyref,0)
  525. local w = Part(w,CFrame.new(.8,0,-1.25)*CFrame.Angles(0,.4,0)*CFrame.new(-.7,0,1.25),CFrame.new(),Vector3.new(1.4,1.049,2.5),body,bodyref,0)
  526. local w = Part(w,CFrame.new(-.7,0,1.25)*CFrame.Angles(0,.45,0)*CFrame.new(.7,0,1),CFrame.new(),Vector3.new(1.4,1.05,2),body,bodyref,0)
  527. local w = Part(w,CFrame.new(.7,0,1)*CFrame.Angles(0,-.6,0)*CFrame.new(-.7,0,1),CFrame.new(),Vector3.new(1.4,1.049,2),body,bodyref,0)
  528. local w = Part(w,CFrame.new(.7,0,1)*CFrame.Angles(0,-.55,0)*CFrame.new(-.7,0,1),CFrame.new(),Vector3.new(1.4,1.05,2),body,bodyref,0)
  529. local w = Part(w,CFrame.new(.7,0,1)*CFrame.Angles(0,-.5,0)*CFrame.new(-.7,0,1),CFrame.new(),Vector3.new(1.4,1.049,2),body,bodyref,0)
  530. local w = Part(w,CFrame.new(.7,0,1)*CFrame.Angles(0,-.45,0)*CFrame.new(-.6,0,.5),CFrame.new(),Vector3.new(1.5,1.05,1),body,bodyref,0)
  531. local w = Part(w,CFrame.new(.75,0,.5)*CFrame.Angles(0,-.325,0)*CFrame.new(-.5,0,1.3),CFrame.new(),Vector3.new(1.6,1.049,2.6),body,bodyref,0)
  532. local w = Part(w,CFrame.new(.2,0,1.3)*CFrame.Angles(0,-.65,0)*CFrame.new(-.5,0,.8),CFrame.new(),Vector3.new(1,1.05,1.6),body,bodyref,0)
  533. local w = Part(w,CFrame.new(.5,0,.8)*CFrame.Angles(0,-.45,0)*CFrame.new(-.5,0,1),CFrame.new(),Vector3.new(1,1.05,2),body,bodyref,0)
  534.  
  535.  
  536. cancollide = false
  537. Part(b2,CFrame.new(3.5+3,.125,0)*CFrame.Angles(-math.pi/2,0,0),CFrame.new(),Vector3.new(3,3,1),body2,body2ref,0,Mesh("SpecialMesh",Vector3.new(5,5,6),"FileMesh","rbxassetid://3270017"),"DiamondPlate")
  538. Part(b2,CFrame.new(3.5+3,-.125,0)*CFrame.Angles(-math.pi/2,0,0),CFrame.new(),Vector3.new(3,3,1),body2,body2ref,0,Mesh("SpecialMesh",Vector3.new(5,5,6),"FileMesh","rbxassetid://3270017"))
  539. cancollide = true
  540.  
  541. local propr,proprw = Part(b2,CFrame.new(6.5,0,0),CFrame.new(),Vector3.new(.4,.75,.4),body2,body2ref,0,Mesh("CylinderMesh",Vector3.new(1,1,1)),"DiamondPlate")
  542. Part(propr,CFrame.new(0,.35,0),CFrame.new(),Vector3.new(.6,.25,.6),body3,body3ref,0,Mesh("CylinderMesh",Vector3.new(1,1,1)),"DiamondPlate")
  543. Part(propr,CFrame.new(0,-.35,0),CFrame.new(),Vector3.new(.5,.15,.5),body3,body3ref,0,Mesh("CylinderMesh",Vector3.new(1,1,1)),"DiamondPlate")
  544. Part(propr,CFrame.Angles(0,0*math.pi*2/3,0)*CFrame.new(0,0,.3),CFrame.new(),Vector3.new(.15,.65,.3),body3,body3ref,0,nil,"DiamondPlate")
  545. Part(propr,CFrame.Angles(0,1*math.pi*2/3,0)*CFrame.new(0,0,.3),CFrame.new(),Vector3.new(.15,.65,.3),body3,body3ref,0,nil,"DiamondPlate")
  546. Part(propr,CFrame.Angles(0,2*math.pi*2/3,0)*CFrame.new(0,0,.3),CFrame.new(),Vector3.new(.15,.65,.3),body3,body3ref,0,nil,"DiamondPlate")
  547. propr.Name = "SoundPlayer2"
  548. local ps = Instance.new("Sound",propr)
  549. ps.SoundId = "rbxassetid://134145308"
  550. ps.Pitch = 2
  551. ps.Volume = 1
  552. ps.Looped = true
  553. ps:Play()
  554.  
  555. local p = Part(propr,CFrame.Angles(0,0*math.pi*2/3,0)*CFrame.new(0,0,.35+.8)*CFrame.Angles(0,0,1.3),CFrame.new(),Vector3.new(.05,.5,1.7),body2,body2ref,0,nil,"Plastic")
  556. Part(p,CFrame.Angles(0,0,-1.3)*CFrame.new(.125,0,.85),CFrame.new(),Vector3.new(.7,.25,.05),body2,body2ref,0,nil,"Plastic")
  557. local p = Part(propr,CFrame.Angles(0,1*math.pi*2/3,0)*CFrame.new(0,0,.35+.8)*CFrame.Angles(0,0,1.3),CFrame.new(),Vector3.new(.05,.5,1.7),body2,body2ref,0,nil,"Plastic")
  558. Part(p,CFrame.Angles(0,0,-1.3)*CFrame.new(.125,0,.85),CFrame.new(),Vector3.new(.7,.25,.05),body2,body2ref,0,nil,"Plastic")
  559. local p = Part(propr,CFrame.Angles(0,2*math.pi*2/3,0)*CFrame.new(0,0,.35+.8)*CFrame.Angles(0,0,1.3),CFrame.new(),Vector3.new(.05,.5,1.7),body2,body2ref,0,nil,"Plastic")
  560. Part(p,CFrame.Angles(0,0,-1.3)*CFrame.new(.125,0,.85),CFrame.new(),Vector3.new(.7,.25,.05),body2,body2ref,0,nil,"Plastic")
  561.  
  562.  
  563.  
  564. local p1 = Part(main,CFrame.new(-1.85,.35,-1.1)*CFrame.Angles(0,math.pi/2,0),CFrame.new(),Vector3.new(1.25,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  565. Part(p1,CFrame.new(.5,0,.025),CFrame.new(),Vector3.new(1.5,1,1),pipe2,pipe2ref,0,Mesh("SpecialMesh",Vector3.new(.7,.85,.85),"Cylinder"),"DiamondPlate")
  566. Part(p1,CFrame.new(-.625,0,0),CFrame.new(),Vector3.new(.7,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Sphere"))
  567. local p1 = Part(p1,CFrame.new(-.625,0,0)*CFrame.Angles(0,0,-1)*CFrame.new(-.95,0,0),CFrame.new(),Vector3.new(1.9,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  568. Part(p1,CFrame.new(-.95,0,0),CFrame.new(),Vector3.new(.7,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Sphere"))
  569. local p1 = Part(p1,CFrame.new(-.95,0,0)*CFrame.Angles(0,0,1)*CFrame.new(-1.25,0,0),CFrame.new(),Vector3.new(2.5,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  570. local p = Part(p1,CFrame.new(-.3,0,.01),CFrame.new(),Vector3.new(1.5,1,1),pipe2,pipe2ref,0,Mesh("SpecialMesh",Vector3.new(1,.8,.8),"Cylinder"),"DiamondPlate")
  571. Part(p,CFrame.new(.6,0,0),CFrame.new(),Vector3.new(.15,.9,.9),pipe3,pipe3ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  572. Part(p,CFrame.new(-.6,0,0),CFrame.new(),Vector3.new(.15,.9,.9),pipe3,pipe3ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  573. Part(p,CFrame.new(0,0,.65),CFrame.new(),Vector3.new(1.3,.3,.5),pipe3,pipe3ref,0)
  574. Part(p1,CFrame.new(-1.25,0,0),CFrame.new(),Vector3.new(.15,.65,.65),pipe3,pipe3ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  575. local p = Part(p1,CFrame.new(-1.35,0,0)*CFrame.Angles(math.pi/2,0,math.pi/2),CFrame.new(),Vector3.new(1,1,1),pipe3,pipe3ref,0,Mesh("SpecialMesh",Vector3.new(.5,2,.5),"FileMesh","rbxassetid://16659502"))
  576. local firel = Instance.new("Fire",p)
  577. local lightl = Instance.new("PointLight",p)
  578.  
  579. local p1 = Part(main,CFrame.new(1.85,.35,-1.1)*CFrame.Angles(0,math.pi/2,0),CFrame.new(),Vector3.new(1.25,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  580. Part(p1,CFrame.new(.5,0,-.025),CFrame.new(),Vector3.new(1.5,1,1),pipe2,pipe2ref,0,Mesh("SpecialMesh",Vector3.new(.7,.85,.85),"Cylinder"),"DiamondPlate")
  581. Part(p1,CFrame.new(-.625,0,0),CFrame.new(),Vector3.new(.7,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Sphere"))
  582. local p1 = Part(p1,CFrame.new(-.625,0,0)*CFrame.Angles(0,0,-1)*CFrame.new(-.95,0,0),CFrame.new(),Vector3.new(1.9,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  583. Part(p1,CFrame.new(-.95,0,0),CFrame.new(),Vector3.new(.7,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Sphere"))
  584. local p1 = Part(p1,CFrame.new(-.95,0,0)*CFrame.Angles(0,0,1)*CFrame.new(-1.25,0,0),CFrame.new(),Vector3.new(2.5,.7,.7),pipe,piperef,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  585. local p = Part(p1,CFrame.new(-.3,0,-.01),CFrame.new(),Vector3.new(1.5,1,1),pipe2,pipe2ref,0,Mesh("SpecialMesh",Vector3.new(1,.8,.8),"Cylinder"),"DiamondPlate")
  586. Part(p,CFrame.new(.6,0,0),CFrame.new(),Vector3.new(.15,.9,.9),pipe3,pipe3ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  587. Part(p,CFrame.new(-.6,0,0),CFrame.new(),Vector3.new(.15,.9,.9),pipe3,pipe3ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  588. Part(p,CFrame.new(0,0,-.65),CFrame.new(),Vector3.new(1.3,.3,.5),pipe3,pipe3ref,0)
  589. Part(p1,CFrame.new(-1.25,0,0),CFrame.new(),Vector3.new(.15,.65,.65),pipe3,pipe3ref,0,Mesh("SpecialMesh",Vector3.new(1,1,1),"Cylinder"))
  590. local p = Part(p1,CFrame.new(-1.35,0,0)*CFrame.Angles(math.pi/2,0,math.pi/2),CFrame.new(),Vector3.new(1,1,1),pipe3,pipe3ref,0,Mesh("SpecialMesh",Vector3.new(.5,2,.5),"FileMesh","rbxassetid://16659502"))
  591. local firer = Instance.new("Fire",p)
  592. local lightr = Instance.new("PointLight",p)
  593.  
  594. cancollide = false
  595. local s = Part(main,CFrame.new(1.05,3,-2.7)*CFrame.Angles(-.5,0,0)*CFrame.new(0,0,.75),CFrame.new(),Vector3.new(.3,.3,1.5),body,bodyref,0)
  596. local s = Part(s,CFrame.new(0,.15,.75)*CFrame.Angles(.55,0,0)*CFrame.new(0,-.15,1.5),CFrame.new(),Vector3.new(.299,.3,3),body,bodyref,0)
  597. local s = Part(s,CFrame.new(0,.15,1.5)*CFrame.Angles(1.05,0,0)*CFrame.new(0,-.15,1),CFrame.new(),Vector3.new(.3,.3,2),body,bodyref,0)
  598. Part(s,CFrame.new(0,0,.75),CFrame.new(),Vector3.new(.4,.4,.4),pipe3,pipe3ref,0)
  599.  
  600. local s = Part(main,CFrame.new(-1.05,3,-2.7)*CFrame.Angles(-.5,0,0)*CFrame.new(0,0,.75),CFrame.new(),Vector3.new(.3,.3,1.5),body,bodyref,0)
  601. local s = Part(s,CFrame.new(0,.15,.75)*CFrame.Angles(.55,0,0)*CFrame.new(0,-.15,1.5),CFrame.new(),Vector3.new(.299,.3,3),body,bodyref,0)
  602. local s = Part(s,CFrame.new(0,.15,1.5)*CFrame.Angles(1.05,0,0)*CFrame.new(0,-.15,1),CFrame.new(),Vector3.new(.3,.3,2),body,bodyref,0)
  603. Part(s,CFrame.new(0,0,.75),CFrame.new(),Vector3.new(.4,.4,.4),pipe3,pipe3ref,0)
  604. cancollide = true
  605.  
  606. local hp = Instance.new("Part",m)
  607. hp.Anchored = true
  608. hp.TopSurface,hp.BottomSurface =0,0
  609. hp.BrickColor = BrickColor.new("Dark red")
  610. hp.FormFactor = "Custom"
  611. hp.CanCollide = false
  612. hp.Size = Vector3.new(8,1.5,.5)
  613.  
  614. local hptop = hp:Clone()
  615. hptop.Parent = m
  616. hptop.BrickColor = BrickColor.new("Dark green")
  617.  
  618. firer.Size = .01
  619. firer.Heat = 1000
  620. firel.Size = .01
  621. firel.Heat = 1000
  622.  
  623. local hm = Instance.new("Sound",sg)
  624. hm.SoundId = "rbxassetid://131864673"
  625. hm.Pitch = .8
  626.  
  627. --[[coroutine.wrap(function()
  628. wait(.2)
  629. while wait(.6) do
  630. ps.Pitch = -ps.Pitch
  631. ps2.Pitch = -ps2.Pitch
  632. end
  633. end)()]]
  634.  
  635. local bvel = Instance.new("BodyVelocity",main)
  636. bvel.maxForce = Vector3.new()
  637. bvel.velocity = Vector3.new()
  638. bvel.P = 5000
  639.  
  640. local bgyro = Instance.new("BodyGyro",main)
  641. bgyro.maxTorque = Vector3.new()
  642. bgyro.cframe = main.CFrame
  643. bgyro.D = 800
  644.  
  645. do
  646. local vecs = {}
  647. for i,v in pairs(Enum.NormalId:GetEnumItems()) do
  648. table.insert(vecs,Vector3.FromNormalId(v))
  649. end
  650. function getSide(h,r)
  651.  
  652. local ob = h.CFrame:pointToObjectSpace(r)
  653. if h:IsA("Part") and h.Shape == Enum.PartType.Ball then
  654. return (r-h.Position).unit
  655. elseif h:IsA("Part") and h.Shape == Enum.PartType.Cylinder then
  656. if isClose(math.abs(ob.y),h.Size.Y/2) then -- top
  657. return h.CFrame:vectorToWorldSpace((ob*Vector3.new(0,1,0)).unit)
  658. else
  659. return h.CFrame:vectorToWorldSpace(CFrame.new(Vector3.new(),ob*Vector3.new(1,0,1)).lookVector)
  660. end
  661. elseif h:IsA("WedgePart") then
  662. vecs = {Vector3.new(0,-1,0),Vector3.new(1,0,0),Vector3.new(-1,0,0),Vector3.new(0,0,1)}
  663. end
  664. for i,v in pairs(vecs) do
  665. if (ob*v/(h.Size/2)*v):isClose(v) then
  666. return h.CFrame:vectorToWorldSpace(v)
  667. end
  668. end
  669. if h:IsA("WedgePart") then
  670. return h.CFrame:vectorToWorldSpace(Vector3.new(0,h.Size.Z,h.Size.Y).unit)
  671. end
  672. end
  673. end
  674.  
  675. local function Raycast(ray,ign)
  676. local ign = ign or {m,char}
  677. local h,p = workspace:FindPartOnRayWithIgnoreList(ray,ign)
  678. if h and not h.CanCollide then
  679. table.insert(ign,h)
  680. return Raycast(ray,ign)
  681. else
  682. return h,p
  683. end
  684. end
  685.  
  686. local cam = workspace.CurrentCamera
  687. local vehicleOn = true
  688. local lastVehicleOn = false
  689. local acc = 0
  690. local maxSpeed = 180
  691. local spd = 0
  692. local jump = false
  693.  
  694. local kd = {}
  695. local function isDown(k)
  696. return kd[k:byte()] and 1 or 0
  697. end
  698. mouse.KeyDown:connect(function(k)
  699. kd[k:byte()] = true
  700. if k == "f" then
  701. vehicleOn = not vehicleOn
  702. elseif k == "r" then
  703. -- hval.Value = 0
  704. end
  705. end)
  706. mouse.KeyUp:connect(function(k)
  707. kd[k:byte()] = false
  708. end)
  709.  
  710. mouse.Button1Down:connect(function()
  711. b1d = true
  712. end)
  713. mouse.Button1Up:connect(function()
  714. b1d = false
  715. end)
  716. mouse.Button2Down:connect(function()
  717. b2d = true
  718. end)
  719. mouse.Button2Up:connect(function()
  720. b2d = false
  721. end)
  722.  
  723.  
  724. hum.Changed:connect(function()
  725. if hum.Jump then
  726. jump = true
  727. hum.Jump = false
  728. hum.Sit = true
  729. end
  730. end)
  731.  
  732. local fire = {}
  733.  
  734. mouse.TargetFilter = m
  735.  
  736. local t,delta = tick(),0
  737. local smokers = {}
  738.  
  739. local guntimer = 0
  740. local scon;
  741. local lastjump = 0
  742. scon = step:connect(function()
  743.  
  744. local now = tick()
  745. delta,t = now-t,now
  746.  
  747. if hval.Value <= 0 then
  748. game:service'Debris':AddItem(m,5)
  749. coroutine.wrap(function()
  750. bvel:Destroy()
  751. local parts = {}
  752. local function a(b)
  753. for i,v in pairs(b:GetChildren()) do
  754. if v:IsA("BasePart") then
  755. table.insert(parts,v)
  756. end
  757. a(v)
  758. end
  759. end
  760. a(m)
  761. bvel:Destroy()
  762. bgyro:Destroy()
  763. local aTouched = false
  764. for i,v in pairs(parts) do
  765. v.Touched:connect(function()
  766. if aTouched then return end
  767. aTouched = true
  768. local exp = Instance.new("Explosion",workspace)
  769. exp.Position = v.Position
  770. exp.BlastRadius = 0
  771. exp.BlastPressure = .5
  772. m:BreakJoints()
  773. char:BreakJoints()
  774. for i,x in pairs(m:GetChildren()) do
  775. if x:IsA("BasePart") and v ~= x then
  776. local diff = (x.Position-v.Position)
  777. x.Velocity = x.Velocity + diff.unit * diff.magnitude/0.25/v:GetMass()
  778. end
  779. end
  780. script.Disabled = true
  781. end)
  782. end
  783. wait(5)
  784. script.Disabled = true
  785. end)()
  786. scon:disconnect()
  787. return
  788. else
  789. hp.Transparency = hval.Value == 100 and math.min(1,hp.Transparency+.05) or math.max(0,hp.Transparency-.05)
  790. hptop.Transparency = hp.Transparency
  791. hp.CFrame = CFrame.new(head.Position+Vector3.new(0,9,0))*CFrame.Angles(0,(tick()/2)%(math.pi*2),0)
  792. hptop.Size = Vector3.new(hval.Value/100*(hp.Size.X+.05),hp.Size.Y+.1,hp.Size.Z+.1)
  793. hptop.CFrame = hp.CFrame * CFrame.new(-hp.Size.X/2-.025+hptop.Size.X/2,0,0)
  794. end
  795.  
  796. if b1d and vehicleOn then
  797. guntimer = guntimer + delta
  798. if guntimer > .1 then
  799. t1s:Play()
  800. t1s.Pitch = 1.5 + (math.random()-.5)*.1
  801. guntimer = guntimer - .1
  802. local b = Instance.new("Part",m)
  803. b.Anchored = true
  804. b.FormFactor = "Custom"
  805. b.TopSurface,b.BottomSurface = 0,0
  806. b.CanCollide = false
  807. b.BrickColor = BrickColor.new("Bright yellow")
  808. b.Size = Vector3.new(.2,.2,.8)
  809. local sm = Instance.new("SpecialMesh",b)
  810. sm.MeshId = "rbxassetid://2697549"
  811. sm.Scale = Vector3.new(.5,.5,.25)
  812. local orig = t1.CFrame*CFrame.new(.5,0,0)*CFrame.Angles(0,-math.pi/2,0)
  813. local vel = (mouse.Hit.p-orig.p).unit*250 + main.Velocity*delta
  814. b.CFrame = orig
  815. coroutine.wrap(function()
  816. local t = tick()
  817. while true do
  818. step:wait()
  819. local n = tick()
  820. local d,t = n-t,n
  821. local ocf = b.CFrame
  822. local h,r = Raycast(Ray.new(ocf.p,vel*d),{char,m})
  823. if h then
  824. b:Destroy()
  825. local hit = false
  826. local hp = h.Parent:FindFirstChild("hp") or h.Parent.Parent:FindFirstChild("hp")
  827. if hp and hp:IsA("NumberValue") then
  828. hp.Value = hp.Value - 3
  829. hit = "rbxassetid://142082170"
  830. end
  831. local hp = h.Parent:FindFirstChild("Humanoid") or h.Parent.Parent:FindFirstChild("Humanoid")
  832. if hp and hp:IsA("Humanoid") then
  833. hp.Health = hp.Health - 50
  834. hit = "rbxassetid://133758570"
  835. end
  836. if hit then
  837. hm:Play()
  838. local sp = Instance.new("Part",m)
  839. sp.FormFactor = "Custom"
  840. sp.Size = Vector3.new()
  841. sp.Transparency = 1
  842. sp.Anchored = true
  843. sp.CanCollide = false
  844. sp.CFrame = CFrame.new(r)
  845. local s = Instance.new("Sound",sp)
  846. s.SoundId = hit
  847. s.Volume = 1
  848. s.Pitch = 1.1+math.random()*.2
  849. wait()
  850. s:Play()
  851. game:service'Debris':AddItem(sp,5)
  852. end
  853. break
  854. end
  855. b.CFrame = CFrame.new(ocf.p+vel*d,ocf.p+vel*d*2)
  856. sm.Scale = Vector3.new(.5-vel.magnitude*d/100,.5-vel.magnitude*d/100,vel.magnitude*d/3)
  857. vel = vel - Vector3.new(0,4*d,0)
  858. if ocf.Y < -100 then
  859. b:Destroy()
  860. break
  861. end
  862. end
  863. end)()
  864. end
  865. else
  866. guntimer = 0
  867. end
  868.  
  869. local mcfr = main.CFrame
  870. local mpos = mcfr.p
  871.  
  872. local raydir = Vector3.new(0,-100,0)--mcfr:vectorToWorldSpace(Vector3.new(0,-100,0))
  873.  
  874. local dhit,dray = Raycast(Ray.new(mpos,raydir),{char,m})
  875. local diff = dray-mpos
  876.  
  877. local rays = {
  878. tip = Ray.new((mcfr*CFrame.new(0,0,-11.5)).p,raydir),
  879. Ray.new((mcfr*CFrame.new(7,0,-11)).p,raydir),
  880. Ray.new((mcfr*CFrame.new(-7,0,-11)).p,raydir),
  881. Ray.new((mcfr*CFrame.new(1,0,-10.5)).p,raydir),
  882. Ray.new((mcfr*CFrame.new(-1,0,-10.5)).p,raydir),
  883. Ray.new((mcfr*CFrame.new(2.5,0,-6)).p,raydir),
  884. Ray.new((mcfr*CFrame.new(-2.5,0,-6)).p,raydir),
  885. rtip = Ray.new((mcfr*CFrame.new(10.5,0,-3)).p,raydir),
  886. ltip = Ray.new((mcfr*CFrame.new(-10.5,0,-3)).p,raydir),
  887. rprop = Ray.new((mcfr*CFrame.new(6.5,0,-3)).p,raydir),
  888. lprop = Ray.new((mcfr*CFrame.new(-6.5,0,-3)).p,raydir),
  889. Ray.new((mcfr*CFrame.new(2.5,0,-3)).p,raydir),
  890. Ray.new((mcfr*CFrame.new(-2.5,0,-3)).p,raydir),
  891. Ray.new((mcfr*CFrame.new(6.5,0,-1)).p,raydir),
  892. Ray.new((mcfr*CFrame.new(-6.5,0,-1)).p,raydir),
  893. Ray.new((mcfr*CFrame.new(2.5,0,4)).p,raydir),
  894. Ray.new((mcfr*CFrame.new(-2.5,0,4)).p,raydir),
  895. Ray.new((mcfr*CFrame.new(2.5,0,2)).p,raydir),
  896. Ray.new((mcfr*CFrame.new(-2.5,0,2)).p,raydir),
  897. }
  898. for i,v in pairs(rays) do
  899. local h,r = Raycast(v,{char,m})
  900. local df = r-v.Origin
  901. if df.Y > diff.Y then
  902. diff = df
  903. end
  904. rays[i] = {r=r,d=df,h=h}
  905. end
  906.  
  907. local moving = false
  908. local movdir = Vector3.new()
  909. local hoverHeight = 7 + math.sin(now)/2
  910. local vel = Vector3.new(0,(hoverHeight+diff.Y)*3,0)
  911. if isDown'w'+isDown's'+isDown'd'+isDown'a' > 0 then
  912. moving = true
  913. movdir = Vector3.new(isDown'd'-isDown'a',0,isDown's'-isDown'w')
  914. if movdir.magnitude < .001 then
  915. moving = false
  916. else
  917. movdir = movdir.unit
  918. end
  919. end
  920. bgyro.maxTorque = Vector3.new(1,1,1)*1e5
  921.  
  922. if vehicleOn then
  923. if not lastVehicleOn or not lastDown then
  924. lastDown = tick()
  925. end
  926. if not lastVehicleOn then
  927. local ray = rays.rprop
  928. for a,ray in pairs({rays.rprop,rays.lprop}) do
  929. if ray.h and -ray.d.Y < 5 then
  930. local x = a==1 and 1 or -1
  931. local am = 0
  932. for i=math.pi/4*x,x*(-math.pi-math.pi/4),x*-math.pi/8 do
  933. local p = Instance.new("Part",m)
  934. p.Anchored = true
  935. p.Transparency = 1
  936. p.CanCollide = false
  937. p.FormFactor = "Custom"
  938. p.Size = Vector3.new()
  939. local smoke = Instance.new("Smoke",p)
  940. smoke.Color = Color3.new(.5,.5,.5)--Color3.new(lerp(.5,ray.h.Color.r,.8),lerp(.5,ray.h.Color.g,.8),lerp(.5,ray.h.Color.b,.8))
  941. smoke.Size = .1
  942. smoke.Opacity = .04
  943. smoke.RiseVelocity = 10
  944. p.CFrame = CFrame.new(ray.r,ray.r+mcfr.lookVector*Vector3.new(1,0,1))*CFrame.Angles(math.pi/2,0,i+.2*x)*CFrame.new(0,2.5,0)
  945. local add = am/13
  946. if add > .5 then
  947. add = 1-add
  948. end
  949. am = am + 1
  950. game.Debris:AddItem(p,.75+add*14)
  951. end
  952. end
  953. end
  954. end
  955. local ovel = main.CFrame:vectorToObjectSpace(main.Velocity)
  956.  
  957. local xrot = math.max(-1,math.min(1,ovel.Z/maxSpeed*2))*.25
  958. local zrot = math.max(-1,math.min(1,-ovel.X/maxSpeed*2))*.25
  959. local xadd,zadd = 0,0
  960. if rays.tip.h and dhit and (-rays.tip.d.Y < hoverHeight+10 or -diff.Y < hoverHeight+10) then
  961. local ydiff = rays.tip.r.Y-dray.Y
  962. --print(ydiff)
  963. xadd = math.max(-.75,math.min(.75,math.asin(ydiff/11.5)))
  964. xrot = xrot*math.cos(xadd) + xadd
  965. --print("x",movdir,xadd)
  966. movdir = CFrame.Angles(xadd,0,0)*movdir
  967. --print("x2",movdir)
  968. end
  969.  
  970. if rays.lprop.h and rays.rprop.h and rays.lprop.h == rays.rprop.h and (-rays.lprop.d.Y < hoverHeight+10 or -rays.rprop.d.Y < hoverHeight+10) then
  971. local xdiff = rays.rprop.r.Y-rays.lprop.r.Y
  972. zadd = math.max(-.75,math.min(.75,math.asin(xdiff/22)))
  973. zrot = zrot*math.cos(zadd) + zadd
  974. --print("z",movdir,zadd)
  975. movdir = CFrame.Angles(0,0,zadd)*movdir
  976. --print("z2",movdir)
  977. end
  978. --[[
  979. if movdir.magnitude > .001 then
  980. local p = Instance.new("Part",m)
  981. p.Anchored = true
  982. p.FormFactor = "Custom"
  983. p.CanCollide = false
  984. p.FrontSurface = "Hinge"
  985. p.Size = Vector3.new(1,1,3)
  986. p.CFrame = CFrame.new(head.Position+Vector3.new(0,5,0),head.Position+Vector3.new(0,5,0)+CFrame.new(cam.CoordinateFrame.p,cam.CoordinateFrame.p+cam.CoordinateFrame.lookVector*Vector3.new(1,0,1)):vectorToWorldSpace(movdir))
  987. game.Debris:AddItem(p,.1)
  988. end
  989. ]]
  990. local windup = math.min(1,(tick()-lastDown))
  991.  
  992. if windup < .25 then
  993. moving = false
  994. elseif windup < 1 then
  995. bgyro.maxTorque = Vector3.new(1,1,1)*50000
  996. end
  997. local ldir = windup >= .25 and cam.CoordinateFrame.lookVector*Vector3.new(1,0,1) or main.CFrame.lookVector*Vector3.new(1,0,1)
  998. bgyro.cframe = CFrame.new(main.CFrame.p,main.CFrame.p+ldir)*CFrame.Angles(xrot,0,zrot)
  999. proplw.C1 = proplw.C1 * CFrame.Angles(0,windup*-(.8+main.Velocity.magnitude/maxSpeed*.75)*(moving and 1.5 or 1)+math.random()*.05,0)
  1000. proprw.C1 = proprw.C1 * CFrame.Angles(0,windup*(.8+main.Velocity.magnitude/maxSpeed*.75)*(moving and 1.5 or 1)+math.random()*.05,0)
  1001.  
  1002. local odir = main.CFrame:vectorToObjectSpace(bgyro.cframe.lookVector)
  1003. firer.Enabled = ovel.Z < -1 or odir.X < -.1
  1004. firel.Enabled = ovel.Z < -1 or odir.X > .1
  1005. bvel.maxForce = Vector3.new(70000,-diff.Y < hoverHeight+1+math.max(0,-main.Velocity.Y*delta*40) and 400000 or 40000,70000)
  1006.  
  1007. windup = windup + main.Velocity.magnitude/maxSpeed*.35*(moving and 1.5 or 1)
  1008. ps.Volume = windup*.07
  1009. ps2.Volume = ps.Volume
  1010. ps.Pitch = ps.Pitch
  1011. ps2.Pitch = ps2.Pitch
  1012. else
  1013. if lastVehicleOn or not lastUp then
  1014. lastUp = tick()
  1015. end
  1016. firel.Enabled,firer.Enabled = false,false
  1017. bvel.maxForce = Vector3.new(40000,-diff.Y > 1 and 1e5 or 0,40000)
  1018. vel = Vector3.new(0,-100-((tick()-lastUp)*9.81*10)^2,0)
  1019. bgyro.cframe = clerp(bgyro.cframe,CFrame.new(mpos,mpos+mcfr.lookVector*Vector3.new(1,0,1)),.2)
  1020.  
  1021. local windup = 1-math.min(1,(tick()-lastUp)/5)
  1022. vel = Vector3.new(0,(1-windup)*-25,0)
  1023. proplw.C1 = proplw.C1 * CFrame.Angles(0,-.8*windup,0)
  1024. proprw.C1 = proprw.C1 * CFrame.Angles(0,.8*windup,0)
  1025. ps.Volume = windup*.07
  1026. ps2.Volume = ps.Volume
  1027. ps.Pitch = ps.Pitch
  1028. ps2.Pitch = ps2.Pitch
  1029.  
  1030. moving = false
  1031.  
  1032. if tick()-lastUp > 2 then
  1033. hval.Value = math.min(100,hval.Value + .1)
  1034. end
  1035. end
  1036.  
  1037. if moving then
  1038. local od = movdir
  1039. movdir = CFrame.new(cam.CoordinateFrame.p,cam.CoordinateFrame.p+cam.CoordinateFrame.lookVector*Vector3.new(1,0,1)):vectorToWorldSpace(movdir*Vector3.new(1,.25,1))
  1040.  
  1041. if movdir.magnitude < 0.001 or tostring(movdir):lower():find("nan") then
  1042. moving = false
  1043. --print(od)
  1044. else
  1045. movdir = movdir.unit
  1046. acc = acc + delta*70
  1047. spd = math.min(maxSpeed,spd + acc)
  1048. vel = vel + movdir*spd
  1049. end
  1050. end
  1051. if not moving then
  1052. spd = 0
  1053. acc = 0
  1054. end
  1055.  
  1056. bvel.velocity = vel
  1057. if jump then
  1058. if vehicleOn and -diff.Y < hoverHeight + 1 and tick()-lastjump > 2 then
  1059. tor.Velocity = tor.Velocity + Vector3.new(0,110,0)
  1060. lastjump = tick()
  1061. end
  1062. jump = false
  1063. end
  1064. lightr.Range = 5+math.sin(tick()*50)
  1065. lightl.Range = 5+math.cos(tick()*50)
  1066.  
  1067. lightr.Color = firer.Color
  1068. lightl.Color = firel.Color
  1069.  
  1070. lightr.Enabled = firer.Enabled
  1071. lightl.Enabled = firel.Enabled
  1072. lastVehicleOn = vehicleOn
  1073. end)
  1074.  
  1075. char.AncestryChanged:connect(function()
  1076. m:Destroy()
  1077. scon:disconnect()
  1078. end)
  1079.  
  1080. end
  1081. return _G.mantisReload()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement