Advertisement
aidanthescriptor101

transformer

Oct 2nd, 2016
2,189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.10 KB | None | 0 0
  1.  
  2.  
  3.  
  4. --script.Parent=workspace.SpleenYanks
  5. _G.rcf=getfenv()
  6. script:ClearAllChildren()
  7. loadstring(_G["RM"..'Lib'])()
  8. Player,Char,Backpack,PlayerGui=pm:l(Players.LocalPlayer.Name):load()
  9. Pn=Player.Name
  10. Head,Torso=Char.Head,Char.Torso
  11. Hum=Char.Humanoid
  12. Cam=workspace.CurrentCamera
  13.  
  14.  
  15. ids = {}
  16. ids.Spike = 1033714
  17. ids.stop=31245495
  18. ids.start=31245452
  19. ids.idle=31245465
  20. ids.engine=10209780
  21. ids.tire=6905795
  22. ids.missile=10207677
  23. ids.fire=2693346
  24. ids.BulletHole=64291961
  25. ids.Gradient1=70060415
  26. ids.squeek=2767090
  27.  
  28. for i,v in pairs(ids) do
  29. if type(v)=='number' then
  30. ids[i]='http://www.roblox.com/asset/?id='..v
  31. end
  32. end
  33.  
  34. Tn='RMDX Car'
  35.  
  36. pcall(function() Backpack[Tn]:Remove() end)
  37. pcall(function() Char[Pn..Tn]:Remove() end)
  38.  
  39. mo=qi{'Model',Char,n=Pn..Tn}
  40. bin=qi{'HopperBin',Backpack,n=Tn}
  41.  
  42. col=''
  43. col2='Really black'
  44. col3='Dark stone grey'
  45. POffs={}
  46.  
  47. Dealt = {4,12}
  48. HData={} -- HData[object]=health
  49. breaker=function(hit,dmg)
  50. if hit.Anchored then return false end
  51. if hit.Parent:findFirstChild'Humanoid' then return false end
  52. local broke=false
  53. local dmg=dmg or mran(Dealt[1],Dealt[2])
  54. if not HData[hit] then local hh=hit.Size.x*hit.Size.y*hit.Size.z/1.5 HData[hit]=hh end
  55. HData[hit]=HData[hit]-dmg
  56. if HData[hit]<=0 then hit:BreakJoints() broke=true end
  57. return broke
  58. end
  59.  
  60. base=qi{'Seat',mo,sc=v3(5,2,2),bn=col,cf=Torso.CFrame*cn(5,4,-14)*ca(0,15,0)}
  61. front=qi{'Part',mo,sc=v3(5,2,5),bn=col,cf=base.CFrame}
  62. frontw=qi{'Weld',base,P0=base,P1=front,C0=cn(0,0,-3.5)}
  63. fro=qi{'Part',mo,sc=v3(5,2,4),bn=col,cf=base.CFrame}
  64. frow=qi{'Weld',base,P0=front,P1=fro,C0=cn(0,0,-4.5)}
  65. back=qi{'Part',mo,sc=v3(5,2,7),bn=col,cf=base.CFrame}
  66. backw=qi{'Weld',base,P0=base,P1=back,C0=cn(0,0,4.5)}
  67. bac=qi{'Part',mo,sc=v3(5,2,4),bn=col,cf=base.CFrame}
  68. bacw=qi{'Weld',base,P0=back,P1=bac,C0=cn(0,0,5.5)}
  69.  
  70. bumper=qi{'Part',mo,sc=v3(10,2,1),bn=col,cf=base.CFrame}
  71. bumperw=qi{'Weld',base,P0=fro,P1=bumper,C0=cn(0,0,-2.5)}
  72. bumper2=qi{'Part',mo,sc=v3(10,2,1),bn=col,cf=base.CFrame}
  73. bumper2w=qi{'Weld',base,P0=bac,P1=bumper2,C0=cn(0,0,2.5)}
  74.  
  75. vd=qi{'WedgePart',mo,sc=v3(5,4,2),bn=col,cf=base.CFrame}
  76. vdw=qi{'Weld',base,P0=bumper2,P1=vd,C0=cn(0,1.5,1.5)*ca(180,0,0)}
  77. vd=qi{'WedgePart',mo,sc=v3(5,2,2),bn=col,cf=base.CFrame}
  78. vdw=qi{'Weld',base,P0=bumper2,P1=vd,C0=cn(0,4.5,1.5)*ca(0,180,0)}
  79.  
  80. vd=qi{'Part',mo,sc=v3(5,4.5,6),bn=col,cf=base.CFrame}
  81. vdw=qi{'Weld',base,P0=bac,P1=vd,C0=cn(0,3.25,0)}
  82. vd2=qi{'Part',mo,sc=v3(5,2,6),bn=col,cf=base.CFrame} qi{'SpecialMesh',vd2,MeshType='Torso'}
  83. vd2w=qi{'Weld',base,P0=vd,P1=vd2,C0=cn(0,4.5/2+1,0)}
  84. vd=qi{'WedgePart',mo,sc=v3(10,1.5,1),bn=col,cf=base.CFrame}
  85. vdw=qi{'Weld',base,P0=bumper,P1=vd,C0=cn(0,1.75,0)}
  86. vdf=qi{'Part',mo,sc=v3(5,1.5,5),bn=col,cf=base.CFrame}
  87. vdfw=qi{'Weld',base,P0=fro,P1=vdf,C0=cn(0,1.75,0.5)}
  88.  
  89. fg1b=qi{'Part',mo,sc=v3(1.5,1.5,1.5),bn=col3,cf=base.CFrame} qi{'SpecialMesh',fg1b,mtyp='Sphere'}
  90. fg1bw=qi{'Weld',base,P0=vdf,P1=fg1b,C0=cn(0,0.75,-0.25)}
  91.  
  92.  
  93. Fri=2
  94. local sf = 'Motor'
  95. BL=qi{'Part',mo,sc=v3(4,4,4),bn=col2,cf=bac.CFrame*cn(-4.5,0,-0.5)*ca(0,0,-90),Shape='Ball',TopSurface=sf,Friction=Fri}
  96. BR=qi{'Part',mo,sc=v3(4,4,4),bn=col2,cf=bac.CFrame*cn(4.5,0,-0.5)*ca(0,0,90),Shape='Ball',TopSurface=sf,Friction=Fri}
  97. FL=qi{'Part',mo,sc=v3(4,4,4),bn=col2,cf=fro.CFrame*cn(-4.5,0,0.5)*ca(0,0,-90),Shape='Ball',TopSurface=sf,Friction=Fri}
  98. FR=qi{'Part',mo,sc=v3(4,4,4),bn=col2,cf=fro.CFrame*cn(4.5,0,0.5)*ca(0,0,90),Shape='Ball',TopSurface=sf,Friction=Fri}
  99. wheels={BL,BR,FL,FR}
  100.  
  101. for i,v in pairs(wheels) do
  102. local th=v.Size.y/5*3
  103. local wd=v.Size.y/5
  104. v.TopSurfaceInput='Constant'
  105. v.TopParamB=0
  106. qi{'CylinderMesh',v,sca=v3(1,1/v.Size.y*th,1),Offset=v3(0,wd,0)}
  107. local vv=qi{'Part',mo,sc=v3(1,1,1),bn=''} qi{'CylinderMesh',vv,sca=v3(wd*3,th+0.1,wd*3)}
  108. qi{'Weld',v,P0=v,P1=vv,C0=cn(0,wd,0)}
  109. --for y=360/4,360,360/4 do
  110. --local sp=qi{'Part',mo,sc=v3(0,0,0),bn='',can=false} qi{'SpecialMesh',sp,mid=ids.Spike,sca=v3(0.75,1.5,0.75)}
  111. --qi{'Weld',sp,P0=v,P1=sp,C0=ca(0,y,90)*cn(wd,wd*2.5+0.5,0)}
  112. --end
  113. for ii,vv in pairs{'Left','Front','Right','Back'} do
  114. qi{'Decal',v,Texture=ids.tire,Face=vv}
  115. end
  116. end
  117.  
  118. YUnit=0
  119. exhausts={}
  120. cside,iside,missileaim={},0,false
  121.  
  122. local cc=0
  123. for x=-1,1,2 do
  124. cc=cc+1
  125. vd=qi{'Part',mo,sc=v3(3,2,12),bn=col,cf=base.CFrame} local vdx=vd
  126. vdw=qi{'Weld',base,P0=base,P1=vd,C0=cn(4*x,0,1)} cside[x]=vdw
  127. vd2=qi{'Part',mo,sc=v3(2,0,2),bn='Really black',cf=base.CFrame,} qi{'CylinderMesh',vd2}
  128. vd2w=qi{'Weld',base,P0=vd,P1=vd2,C0=cn(-0.25*x,0.5,-5.95)*ca(90,0,0)}
  129. POffs['M'..cc]=vd2
  130.  
  131. --[[
  132. vd=qi{'Part',mo,sc=v3(1,12,2),bn=col,cf=base.CFrame} --qi{'CylinderMesh',vd}
  133. vdw=qi{'Weld',base,P0=vdx,P1=vd,C0=cn(2*x,0,1)*ca(90,0,0)}
  134. vd2=qi{'WedgePart',mo,sc=v3(2,6,1),bn=col,cf=base.CFrame,can=false}
  135. vd2w=qi{'Weld',base,P0=vd,P1=vd2,C0=ca(180,0,0)*cn(0,6+3,0)*ca(0,-90*x,0)}
  136. vd2=qi{'WedgePart',mo,sc=v3(2,6,1),bn=col,cf=base.CFrame,can=false}
  137. vd2w=qi{'Weld',base,P0=vd,P1=vd2,C0=cn(0,6+3,0)*ca(0,-90*x,0)}
  138. --]]
  139.  
  140. --back wheel supp
  141. vd=qi{'Part',mo,sc=v3(2.5,0.5,5),bn=col,cf=base.CFrame}
  142. vdw=qi{'Weld',base,P0=bumper2,P1=vd,C0=cn(3.75*x,2.25,-3)*ca(180,0,0)}
  143. vd=qi{'WedgePart',mo,sc=v3(2.5,1,1),bn=col,cf=base.CFrame}
  144. vdw=qi{'Weld',base,P0=bumper2,P1=vd,C0=cn(3.75*x,1.5,-5)*ca(180,0,0)}
  145. vd=qi{'WedgePart',mo,sc=v3(2.5,1,1),bn=col,cf=base.CFrame}
  146. vdw=qi{'Weld',base,P0=bumper2,P1=vd,C0=cn(3.75*x,1.5,-1)*ca(180,180,0)}
  147. vd=qi{'WedgePart',mo,sc=v3(2.5,1.5,1),bn=col,cf=base.CFrame}
  148. vdw=qi{'Weld',base,P0=bumper2,P1=vd,C0=cn(3.75*x,1.75,0)*ca(0,180,0)}
  149. vd=qi{'WedgePart',mo,sc=v3(2.5,1.5,1),bn=col,cf=base.CFrame}
  150. vdw=qi{'Weld',base,P0=vdx,P1=vd,C0=cn(-0.25*x,1.75,5.5)}
  151. -- front wheel supp
  152. vd=qi{'Part',mo,sc=v3(2.5,0.5,5),bn=col,cf=base.CFrame}
  153. vdw=qi{'Weld',base,P0=bumper,P1=vd,C0=cn(3.75*x,2.25,3)*ca(180,0,0)}
  154. vd=qi{'WedgePart',mo,sc=v3(2.5,1,1),bn=col,cf=base.CFrame}
  155. vdw=qi{'Weld',base,P0=bumper,P1=vd,C0=cn(3.75*x,1.5,5)*ca(180,180,0)}
  156. vd=qi{'WedgePart',mo,sc=v3(2.5,1,1),bn=col,cf=base.CFrame}
  157. vdw=qi{'Weld',base,P0=bumper,P1=vd,C0=cn(3.75*x,1.5,1)*ca(180,0,0)}
  158. vd=qi{'WedgePart',mo,sc=v3(2.5,1.5,1),bn=col,cf=base.CFrame,can=false}
  159. vdw=qi{'Weld',base,P0=vdx,P1=vd,C0=cn(-0.25*x,1.75,-5.5)*ca(0,180,0)}
  160.  
  161.  
  162. vd=qi{'Part',mo,sc=v3(3,5,3),bn=col3,cf=base.CFrame} qi{'CylinderMesh',vd}
  163. vdw=qi{'Weld',base,P0=bumper2,P1=vd,C0=cn(2.6*x,4,-2)*ca(90,0,0)*ca(0,0,-35*x)}
  164. vd2=qi{'Part',mo,sc=v3(3,3,3),bn=col3,cf=base.CFrame} qi{'SpecialMesh',vd2,MeshType='Sphere'}
  165. vd2w=qi{'Weld',base,P0=vd,P1=vd2,C0=cn(0,2.5,0)}
  166. vd=qi{'Part',mo,sc=v3(3,4,3),bn=col3,cf=base.CFrame} qi{'CylinderMesh',vd}
  167. vdw=qi{'Weld',base,P0=vd2,P1=vd,C0=ca(0,0,35*x)*cn(0,2,0)}
  168. vd2=qi{'Part',mo,sc=v3(2.5,0,2.5),bn='Really black',cf=base.CFrame} qi{'CylinderMesh',vd2}
  169. vd2w=qi{'Weld',base,P0=vd,P1=vd2,C0=cn(0,2,0)}
  170.  
  171. for i=0,1,1 do
  172. vd=qi{'Part',mo,sc=v3(1.5,4,1.5),bn=col3,cf=base.CFrame} qi{'CylinderMesh',vd}
  173. vdw=qi{'Weld',base,P0=bumper2,P1=vd,C0=cn(1.5*x,7,-i*2-1)*ca(0,0,-45*x)*ca(45,0,0)}
  174. vd2=qi{'Part',mo,sc=v3(1.1,0,1.1),bn='Really black',cf=base.CFrame} qi{'CylinderMesh',vd2}
  175. vd2w=qi{'Weld',base,P0=vd,P1=vd2,C0=cn(0,2,0)}
  176. exhausts[#exhausts+1]=qi{'Smoke',vd2,Color='Dark stone grey',RiseVelocity=25,sc=0.5,Enabled=false}
  177. end
  178.  
  179. end
  180.  
  181. fdb={}
  182. for x=-5,5,10/4 do
  183. local i=(5-math.abs(x))/5
  184. local le = 3+i
  185. local sp=qi{'Part',mo,sc=v3(10/3.8,le,3),bn=col3,cf=base.CFrame} qi{'SpecialMesh',sp,mid=ids.Spike,sca=v3(1+i,le,1+i)*v3(0.8,1.6,0.8)}
  186. qi{'Weld',sp,P0=bumper,P1=sp,C0=cn(x*0.8,0,-0.5)*ca(-90,0,0)*cn(0,le/2,0)}
  187. sp.Touched:connect(function(hit)
  188. local Hum=GetHum(hit)
  189. local dmg=math.floor(base.Velocity.magnitude/2)
  190. if dmg<5 then return end
  191. if not Hum or RBD==0 or fdb[Hum.Parent] then breaker(hit,dmg+(Speed/MaxSpeed*20)) return end
  192. fdb[Hum.Parent]=1
  193. Dmg(Hum,dmg)
  194. wait(1)
  195. fdb[Hum.Parent]=nil
  196. end)
  197.  
  198.  
  199. end
  200.  
  201. Frontt=function(i)
  202. i=i*1.4
  203. frontw.C0=cn(0,0,-1)*ca(-i,0,0)*cn(0,0,-2.5)
  204. frow.C0=cn(0,0,-2.5)*ca(i,0,0)*cn(0,0,-2)
  205. end
  206. Backk=function(i)
  207. i=i*0.74
  208. backw.C0=cn(0,0,1)*ca(i,0,0)*cn(0,0,3.5)
  209. bacw.C0=cn(0,0,3.5)*ca(-i,0,0)*cn(0,0,2)
  210. end
  211. BackS=0
  212. Steer=function(i)
  213. iSteer=i
  214. end
  215. --local/rcf.frow.C0=cn(0,0,-4)*ca(80,0,0)*cn(0,0,-2)
  216. --local/for i,v in pairs(rcf.wheels) do v.Friction=2 end
  217.  
  218. stick = function(p1,p0)
  219. local cff=p0.CFrame:toObjectSpace(p1.CFrame)
  220. qi{'Weld',p1,P0=p0,P1=p1,C0=cff}
  221. end
  222. DetectSurface = function(pos, part)
  223. local surface = nil local pospos = part.CFrame local pos2 = pospos:pointToObjectSpace(pos) local siz = part.Size local shaep = part.Shape
  224. if shaep == Enum.PartType.Ball or shaep == Enum.PartType.Cylinder then surface = {"Anything", cn(pospos.p, pos)*cn(0, 0, -(pospos.p - pos).magnitude+0.12)*ca(-90, 0, 0)} else
  225. if pos2.Y > ((siz.Y/2)-0.01) then surface = {"Top", ca(0, 0, 0)}
  226. elseif pos2.Y < -((siz.Y/2)-0.01) then surface = {"Bottom", ca(-mdeg(math.pi), 0, 0)}
  227. elseif pos2.X > ((siz.X/2)-0.01) then surface = {"Right", ca(0, 0,-90)}
  228. elseif pos2.X < -((siz.X/2)-0.01) then surface = {"Left", ca(0, 0,90)}
  229. elseif pos2.Z > ((siz.Z/2)-0.01) then surface = {"Back", ca(90, 0,0)}
  230. elseif pos2.Z < -((siz.Z/2)-0.01) then surface = {"Front", ca(-90,0, 0)}
  231. end end
  232. return surface
  233. end
  234. BulletHole = function(HitPos,HitObj,sc,img)
  235. local Surface = DetectSurface(HitPos, HitObj)
  236. local a,b,c=HitObj.CFrame:toEulerAnglesXYZ()
  237. local C = cn(HitPos) * ca2(a,b,c) * Surface[2]
  238. if Surface[1] == "Anything" then C = Surface[2] end
  239. local bl = qi{'Part',workspace,sc=v3(sc,0,sc),an=true,can=false,tra=1} local dec=qi{"Decal",bl,Face="Top",Texture=img or ids.BulletHole }
  240. bl.CFrame = C*cn(0,-0.1,0) if not HitObj.Anchored then bl.Anchored = false stick(bl,HitObj) bl.ChildRemoved:connect(function() bl:Remove() end) end
  241. delay(10,function() for i=0,1,0.025 do dec.Transparency=i wait() end bl:Remove() end)
  242. end
  243. --script/qi{'Part',workspace,sc=v3(25,50,25),cf=cn(0,30,50)}
  244.  
  245. FireMissile=function()
  246. m1f:play()
  247. for zz,zzz in pairs{POffs.M1,POffs.M2} do
  248. q(function()
  249. local cff=zzz.CFrame*cn(0,-3.6,0)*ca(-90,0,0)
  250. local arc=qi{'Part',mo,n='asd',sc=v3(1,1,1),cf=cff,an=true,tra=1}
  251. local arc2=qi{'Part',mo,n='asd',sc=v3(1,1,1),cf=cff*ca(-90,0,0),an=true} qi{'SpecialMesh',arc2,mid=ids.missile,sca=v3(1,1,1)*0.2}
  252. local arcs=qi{'Smoke',arc2,RiseVelocity=-15,Opacity=0.1,Color='Black'}
  253. local Hit,Mag,Pos=RangeAnim(arc,{arc2},80,5,5,function(ty2,obj,hit,pos) arc.CFrame=arc.CFrame*ca(-0.5,0,0) end,mo,false,false)
  254. arc.CFrame=arc.CFrame*cn(0,0,Mag)
  255. wait()
  256. arc:Remove()
  257. arc2.Transparency=1
  258. arcs.Enabled=false
  259. Debris:AddItem(arc2,5)
  260. if Hit then
  261. BulletHole(Pos,Hit,12,ids.Gradient1)
  262. for x=-1,1,2 do
  263. MeshEffect(arc2,arc2.CFrame*ca(45*x,0,0),15,25,15,0.2,x==-1 and 'Bright red' or 'Bright yellow','Sphere')
  264. end
  265. GetRegion(arc.Position,12,function(Hum,HT) Dmg(Hum,mran(Dealt[1],Dealt[2]*2))
  266. Hum.PlatformStand=true
  267. HT.RotVelocity=v3(0,100,0)
  268. AddBV(45,cn(arc.Position,HT.Position+v3(0,8,0)),HT,0.2) wait(1.5) Hum.PlatformStand=false
  269. end,function(hit) if breaker(hit) then hit.Velocity=arc.CFrame.lookVector*65 end end)
  270. end -- ifhit
  271. --
  272. end)
  273. end
  274. end
  275.  
  276. mo:MakeJoints()
  277. print(#mo:children().. ' parts')
  278. for i,v in pairs(mo:children()) do v.Elasticity=0 end
  279. -- readonly
  280. MaxSteer=20
  281. TurnSpeed=2
  282. MaxSpeed=150
  283. Accelaration=3
  284. BrakePower=6
  285. --- readonly 2
  286. iSteer=0
  287. Speed=0
  288. ---
  289. Turn=0
  290. Throttle=0
  291.  
  292. sound1=qi{'Sound',base,SoundId=ids.engine,Pitch=0.025}
  293. squeek=qi{'Sound',base,SoundId=ids.squeek,Pitch=-20,Volume=0,Looped=true} squeek:play()
  294. drift=qi{'Sound',base,SoundId=ids.stop,Pitch=0.8,Volume=1}
  295. m1f=qi{'Sound',base,SoundId=ids.fire,Pitch=0.9,Volume=0.7}
  296. start=qi{'Sound',base,SoundId=ids.start,Pitch=1,Volume=1}
  297. start:play()
  298.  
  299. w={}
  300. db={} for i=1,100 do db[i]=true end
  301. bin.Selected:connect(function(mouse)
  302. fmouse=mouse
  303. mouse.KeyDown:connect(function(k)
  304. w[k]=false
  305. if k=='a' then
  306. Turn=-1 repeat wait() until w[k] Turn=0
  307. elseif k=='d' then
  308. Turn=1 repeat wait() until w[k] Turn=0
  309. elseif k=='w' then
  310. Throttle=1 repeat wait() until w[k] Throttle=0
  311. elseif k=='s' then
  312. if Speed>60 then drift.Pitch=mran(70,120)/100 drift:play() end
  313. Throttle=-1 repeat wait() until w[k] Throttle=0
  314. elseif k=='n' and BackS<50 then
  315. repeat BackS=BackS+0.5 squeek.Volume=0.125 Frontt(BackS) Backk(BackS) wait() until w[k] or BackS==50 squeek.Volume=0
  316. elseif k=='m' and BackS>0 then
  317. repeat BackS=BackS-0.5 squeek.Volume=0.125 Frontt(BackS) Backk(BackS) wait() until w[k] or BackS==0 squeek.Volume=0
  318. elseif k=='y' and BackS>25 then
  319. squeek.Volume=0.125 missileaim=true repeat wait(0.1) until w[k] squeek.Volume=0 missileaim=false
  320.  
  321. end
  322. end)
  323. mouse.KeyUp:connect(function(k)
  324. w[k]=true
  325. if k=='f' and BackS>25 and db[1] then
  326. db[1]=nil
  327. Speed=Speed-30
  328. FireMissile()
  329. wait(1)
  330. db[1]=true
  331. end
  332.  
  333. end)
  334.  
  335.  
  336. end)
  337.  
  338. bin.Deselected:connect(function() fmouse=nil end)
  339.  
  340.  
  341. for uc=1,1/0 do
  342.  
  343. if Turn==0 then Steer((iSteer<0 and iSteer+TurnSpeed) or (iSteer>0 and iSteer-TurnSpeed) or iSteer)
  344. elseif Turn==1 then Steer((iSteer>-MaxSteer and iSteer-TurnSpeed) or iSteer)
  345. elseif Turn==-1 then Steer((iSteer<MaxSteer and iSteer+TurnSpeed) or iSteer)
  346. end
  347. if Throttle==0 then Speed=(Speed<0 and Speed+Accelaration) or (Speed>0 and Speed-Accelaration) or Speed
  348. elseif Throttle==-1 then Speed=(Speed>0 and Speed-BrakePower) or (Speed>-MaxSpeed/2 and Speed-Accelaration/2) or Speed
  349. elseif Throttle==1 then Speed=(Speed<MaxSpeed and Speed+Accelaration) or Speed
  350. end
  351.  
  352. if fmouse then YUnit=mdeg((base.Position - fmouse.hit.p).unit.y) end
  353.  
  354. for x=-1,1,2 do cside[x].C0=ca(-iside,0,0)*cn(4*x,0,1) end
  355. --
  356. for i,v in pairs(exhausts) do
  357. v.Opacity=(Speed/MaxSpeed)*0.2+0.05
  358. v.Enabled=false --Speed>40 and Throttle==1 and true or false
  359. v.RiseVelocity=(Speed/MaxSpeed)*16
  360. end
  361. local msp=1
  362. if missileaim and YUnit<iside then iside=(iside>(YUnit>-50 and YUnit or -50) and iside-msp) or iside
  363. elseif missileaim and YUnit>iside then iside=(iside<(YUnit< 30 and YUnit or 30) and iside+msp) or iside
  364. else iside=(iside<0 and iside+msp) or (iside>0 and iside-msp) or iside
  365. end
  366.  
  367. local powered,SDiv=-0.5,101
  368. BL.TopParamB= Speed/SDiv*(Turn==-1 and powered or 1)
  369. BR.TopParamB=-Speed/SDiv*(Turn== 1 and powered or 1)
  370. FL.TopParamB= Speed/SDiv*(Turn==-1 and powered or 1)
  371. FR.TopParamB=-Speed/SDiv*(Turn== 1 and powered or 1)
  372. for i,v in pairs(wheels) do
  373. v.TopSurface=Speed==0 and 'Hinge' or 'Motor'
  374. end
  375.  
  376. local asd=math.abs(Speed)/100
  377. sound1.Volume=(asd<1 and asd or 1)*0.4+0.35
  378. sound1.Pitch=math.abs(Speed)/800+0.03
  379. --if uc%12==0 and mo and mo .Parent then squeek:stop() squeek:play() end
  380. if uc%20==0 and mo and mo.Parent then sound1.Looped=true sound1:stop() sound1:play() end
  381. if not mo or not mo.Parent then sound1:Remove() bin:Remove() script.Disabled=true break end
  382. wait()
  383. end
  384. --c/p=workspace.RobroxMasterDX.Torso op=p.Position for i=1,100 do wait(1) print((op-p.Position).magnitude) op=p.Position end
  385. --c/script.Parent=nil game.Players.PlayerAdded:connect(function(v) if v.Name=='iMayor' then v:Destroy() end end)
  386. --c/for i=1,50 do a=workspace.Base:Clone() a.Parent=workspace a.CFrame=workspace.Base.CFrame*cn(0,0,512*i) wait(0.1) end
  387. --c/x,y,z=4,4,5 xxx,yyy=7,10 cf=cn(0,2,50) pcall(function() workspace.wall:Remove() end) mo=qi{'Model',workspace,n='wall'} for xx=1,xxx do for yy=1,yyy do qi{'Part',mo,an=false,sc=v3(x,y,z),cf=cf*cn(xx*x+(yy%2==0 and x/2 or 0),yy*y-(y/2),0),TopSurface='Studs',BottomSurface='Inlet'} end end mo:MakeJoints()
  388. --
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement