Advertisement
iPxter

Untitled

Jul 31st, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 80.29 KB | None | 0 0
  1. Players = game:service'Players'
  2. Debris = game:service'Debris'
  3. Effects = { }
  4. CF = CFrame.new
  5. CFa = CFrame.Angles
  6. CFA = function(x,y,z) return CFa(MR(x),MR(y),MR(z)) end
  7. V3 = Vector3.new
  8. MR = math.rad
  9. MD = math.deg
  10. MRND = math.random
  11. CFN=CF(0,0,0)
  12. V3N=V3(0,0,0)
  13. V3M=V3(1/0,1/0,1/0)
  14. RbxUtility=LoadLibrary("RbxUtility")
  15. Create=RbxUtility.Create
  16. function RemoveOutlines(part)
  17. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  18. end
  19. newI = function(tab)
  20. local p = Instance.new(tab[1],tab[2])
  21. for i,v in pairs(tab) do
  22. if i=="Debris" then
  23. Debris:AddItem(p,v)
  24. elseif (i~=1 and i~=2) then
  25. p[i] = v
  26. end
  27. end
  28. return p
  29. end
  30.  
  31. ------------Assets
  32. assets = {}
  33. --Meshes
  34. assets.Ring = "3270017"
  35. assets.Bullet1 = "10207677"
  36. assets.MuzzleFlash = "25212400"
  37. --MeshTexture
  38.  
  39. --Decals
  40.  
  41. --Gui Decals
  42.  
  43. --Sounds
  44. assets.Minigun1 = "2766581"
  45. assets.Fire1 = "2760979"
  46. --
  47. assetprefix = "http://www.roblox.com/asset/?id="
  48. for i,v in pairs(assets) do
  49. if v:sub(1,3)~="htt" and v:sub(1,3)~="rbx" then
  50. assets[i]=assetprefix..v
  51. end
  52. end
  53. function CreateSound(id, par, vol, pit)
  54. coroutine.resume(coroutine.create(function()
  55. local sou = Instance.new("Sound", par or workspace)
  56. sou.Volume = vol
  57. sou.Pitch = pit or 1
  58. sou.SoundId = id
  59. swait()
  60. sou:play()
  61. game:GetService("Debris"):AddItem(sou, 6)
  62. end))
  63. end
  64. ----------------------------
  65. PlaySound=function(soundId,Parent,Pit,Vol)
  66. local v=newI{"Sound",Parent,SoundId=soundId,Volume=Vol,Pitch=Pit,Looped=false,Debris=5}
  67. v:Play()
  68. end
  69. function CreatePart(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  70. local Part = Create("Part"){
  71. Parent = Parent,
  72. Reflectance = Reflectance,
  73. Transparency = Transparency,
  74. CanCollide = false,
  75. Locked = true,
  76. BrickColor = BrickColor.new(tostring(BColor)),
  77. Name = Name,
  78. Size = Size,
  79. Material = Material,
  80. }
  81. return Part
  82. end
  83.  
  84. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  85. local Msh = Create(Mesh){
  86. Parent = Part,
  87. Offset = OffSet,
  88. Scale = Scale,
  89. }
  90. if Mesh == "SpecialMesh" then
  91. Msh.MeshType = MeshType
  92. Msh.MeshId = MeshId
  93. end
  94. return Msh
  95. end
  96.  
  97. --[[Credits to SazErenos for his Artificial Heartbeat]]--
  98. ArtificialHB = Instance.new("BindableEvent", script)
  99. ArtificialHB.Name = "Heartbeat"
  100.  
  101. script:WaitForChild("Heartbeat")
  102.  
  103. frame = 1 / 30
  104. tf = 0
  105. allowframeloss = false
  106. tossremainder = false
  107. lastframe = tick()
  108. script.Heartbeat:Fire()
  109.  
  110. game:GetService("RunService").Heartbeat:connect(function(s, p)
  111. tf = tf + s
  112. if tf >= frame then
  113. if allowframeloss then
  114. script.Heartbeat:Fire()
  115. lastframe = tick()
  116. else
  117. for i = 1, math.floor(tf / frame) do
  118. script.Heartbeat:Fire()
  119. end
  120. lastframe = tick()
  121. end
  122. if tossremainder then
  123. tf = 0
  124. else
  125. tf = tf - frame * math.floor(tf / frame)
  126. end
  127. end
  128. end)
  129.  
  130. function swait(num)
  131. if num == 0 or num == nil then
  132. ArtificialHB.Event:wait()
  133. else
  134. for i = 0, num do
  135. ArtificialHB.Event:wait()
  136. end
  137. end
  138. end
  139. newPart = function(sizea,sizeb,sizec,parent,cframe,aa,bb,cc,dd,ee,ff)
  140. local Materials = {}
  141. for i,v in pairs{
  142. "Plastic","SmoothPlastic","Wood", "WoodPlanks",
  143. "Marble", "Slate","Concrete", "Granite",
  144. "Brick","Pebble", "Cobblestone","CorrodedMetal",
  145. "DiamondPlate", "Foil", "Metal","Grass",
  146. "Sand","Fabric","Ice","Neon"} do
  147. Materials[v]=v
  148. end
  149. local mat,col
  150. local part = Instance.new("Part",parent or Model)
  151. for i,v in pairs{aa,bb,cc,dd,ee,ff} do
  152. if Materials[v] then mat=v end
  153. if BrickColor.new(v).Name==v then col=v end
  154. if v=="CylinderMesh" or v=="BlockMesh" then local m = Instance.new(v,part) m.Name="Mesh" end
  155. if v=="Torso" then newI{"SpecialMesh",part,MeshType="Torso"} end
  156. if v=="Sphere" then newI{"SpecialMesh",part,MeshType="Sphere"} end
  157. if v=="Wedge" then part:Destroy() part=Instance.new("WedgePart",parent or Model) end
  158. if v=="Corner" then part:Destroy() part=Instance.new("CornerWedgePart",parent or Model) end
  159. if v=="Ring" then newI{"SpecialMesh",part,MeshType="FileMesh",MeshId=assets.Ring} end
  160. if v=="nonCollide" then part.CanCollide=false end
  161. if v=="Transparent" then part.Transparency=1 end
  162. if v=="Anchored" then part.Anchored=true end
  163. if v=="S0.5" then sizea=sizea/2 sizeb=sizeb/2 sizec=sizec/2 part.Mesh.Scale=part.Mesh.Scale*2 end
  164. end
  165. if part.className~="CornerWedgePart" then part.formFactor="Custom" end
  166. for i,v in pairs{"Top","Bottom","Left","Right","Front","Back"} do
  167. part[v.."Surface"]="SmoothNoOutlines"
  168. end
  169. part.Size=V3(sizea,sizeb,sizec) or V3(1,1,1)
  170. part.CFrame=cframe or CF(0,-50,0)
  171. part.BrickColor=BrickColor.new(col or '')
  172. part.Material = mat or 'SmoothPlastic'
  173. part:BreakJoints()
  174. part.Elasticity = 0
  175. part.Name="z"
  176. part.CustomPhysicalProperties = PhysicalProperties.new(2,2,0,2,0)
  177. return part,cframe
  178. end
  179.  
  180. newMesh=function(parent,dtype,sx,sy,sz)
  181. local filemesh
  182. local mesh
  183. if dtype=="Block" or dtype=="Cylinder" then
  184. mesh=INEW(types.."Mesh",parent)
  185. elseif dtype:sub(1,4)=="http" or dtype:sub(1,3)=="rbx" then
  186. mesh=INEW("SpecialMesh",parent)
  187. mesh.MeshType="FileMesh"
  188. mesh.MeshId=dtype
  189. filemesh=true
  190. else
  191. mesh=INEW("SpecialMesh",parent)
  192. mesh.MeshType=dtype
  193. end
  194. if parent.Size.x<=0.2 then parent.CanCollide=false end
  195. local yes=parent.Size.x<0.2001 and 5 or 1
  196. if filemesh then yes=1 end
  197. mesh.Scale=V3(sx or 1,sy or 1,sz or 1)*yes
  198. return mesh
  199. end
  200.  
  201. newWeld = function(parent,P0,P1,C0,C1)
  202. local weld=Instance.new("Weld",parent or P0)
  203. weld.Part0=P0
  204. weld.Part1=P1
  205. weld.C0=C0 or weld.C0
  206. weld.C1=C1 or weld.C1
  207. return weld
  208. end
  209. newWeld6D = function(parent,P0,P1,C0,C1)
  210. local weld=Instance.new("Motor6D",parent or P0)
  211. weld.Part0=P0
  212. weld.Part1=P1
  213. weld.C0=C0 or weld.C0
  214. weld.C1=C1 or weld.C1
  215. return weld
  216. end
  217.  
  218. ray = function(Origin,Direction,tab,length) -- ray cast
  219. return workspace:FindPartOnRay(Ray.new(Origin,Direction.unit *(length or 999)),tab)
  220. end
  221. addProjectile = function(Origin,Destination,Speed,onHit,extra,noHit)
  222. local current = CF(Origin,Destination.p)
  223. local co = 0
  224. doIn(4,function(i,wkey,step)
  225. co=co+1
  226. if co%2==0 then
  227. local Speed2 = Speed*step
  228. local Hit,Pos = ray(current.p,Destination.p-Origin,mech,Speed2)
  229. if Hit then
  230. current=current*CF(0,0,-(current.p-Pos).magnitude)
  231. doInT[wkey] = nil
  232. onHit(Hit)
  233. else
  234. current=current*CF(0,0,-Speed2)
  235. end
  236. extra(current,i*4)
  237. end
  238. end,function()
  239. if noHit and noHit~=0 then
  240. noHit()
  241. end
  242. end)
  243. end
  244.  
  245. checkCF = function(weld)
  246. local x,y,z = weld.C0:toEulerAnglesXYZ()
  247. print(weld.Name ..".C0 ",weld.C0.x,weld.C0.y,weld.C0.z," ",MD(x),MD(y),MD(z))
  248. local x,y,z = weld.C1:toEulerAnglesXYZ()
  249. print(weld.Name ..".C1 ",weld.C1.x,weld.C1.y,weld.C1.z," ",MD(x),MD(y),MD(z))
  250. end
  251.  
  252. GetX = function(Part,Point)
  253. local x,y,z=Part.CFrame:toObjectSpace(CFrame.new(Part.Position,Point)):toEulerAnglesXYZ()
  254. return math.deg(x)
  255. end
  256. GetY = function(Part,Point)
  257. local x,y,z=Part.CFrame:toObjectSpace(CFrame.new(Part.Position,Point)):toEulerAnglesXYZ()
  258. return math.deg(y)
  259. end
  260.  
  261. getTriangleValues = function(Points)
  262. local G, V = 0
  263. for S = 1, 3 do
  264. local L = (Points[1+(S+1)%3]-Points[1+S%3]).magnitude
  265. G, V = L > G and L or G, L > G and {Points[1+(S-1)%3], Points[1+(S)%3], Points[1+(S+1)%3]} or V
  266. end
  267. local D = V[2]+(V[3]-V[2]).unit*((V[3]-V[2]).unit:Dot(V[1]-V[2]))
  268. local C, B = (D-V[1]).unit, (V[2]-V[3]).unit
  269. local A = B:Cross(C)
  270. S1 = V3(0.2, (V[2]-D).magnitude, (V[1]-D).magnitude)/1 --0.2
  271. S2 = V3(0.2, (V[3]-D).magnitude, (V[1]-D).magnitude)/1 --0.2
  272. C1 = CF(0,0,0,A.X,B.X,C.X,A.Y,B.Y,C.Y,A.Z,B.Z,C.Z)+(V[1]+V[2])/2
  273. C2 = CF(0,0,0,-A.X,-B.X,C.X,-A.Y,-B.Y,C.Y,-A.Z,-B.Z,C.Z)+(V[1]+V[3])/2
  274. return C1, C2, S1, S2
  275. end
  276.  
  277. fillTriangle = function(...)
  278. local C1,C2,S1,S2 = getTriangleValues(...)
  279. local tri1 = newPart(S1.x,S1.y,S1.z,mech,C1,"Wedge")
  280. local tri2 = newPart(S2.x,S2.y,S2.z,mech,C2,"Wedge")
  281. --for i=1,3 do
  282. --newPart(0.4,0.4,0.4,mech,CF((...)[i]),"nonCollide","Really black","Anchored")
  283. --end
  284. return tri1,tri2
  285. end
  286.  
  287.  
  288.  
  289. n = ""
  290.  
  291. ThighAngle = -40
  292. LegAngle = 135
  293. FootAngle = -40
  294. ToeAngle = -LegAngle-ThighAngle-FootAngle
  295.  
  296. ThighAngle = -25
  297. LegAngle = 75
  298. FootAngle = 10
  299. ToeAngle = -LegAngle-ThighAngle-FootAngle
  300.  
  301. --SCROP SCROP SCROP SCROP SCROP SCROP SCROP SCROP SCROP SCROP SCROP
  302. pcall(function() workspace["RM Mech 2"]:Remove() end)
  303. mech = newI{"Model",workspace,Name="RM Mech 2"}
  304.  
  305. Base = newPart(10,10,8,mech,CF(0,50,0),"nonCollide")
  306. Base.Transparency=1
  307. Torso = newPart(4,4,4,mech,Base.CFrame,"nonCollide","Transparent")
  308. BaseW = newWeld6D(Base,Base,Torso,CF(0,0,0)*CFA(0,0,0))
  309. Torso1 = newPart(4,4,4,mech,Base.CFrame,"nonCollide","Transparent") --for X Turn
  310. Torso1W = newWeld6D(Torso,Torso,Torso1,CF(0,0,0)*CFA(0,0,0))
  311. Torso2 = newPart(4,4,4,mech,Base.CFrame,"nonCollide","Transparent") --for Y Turning Torso
  312. Torso2W = newWeld6D(Torso1,Torso1,Torso2,CF(0,0,0)*CFA(0,0,0))
  313.  
  314.  
  315. --[[
  316. Stand = newPart(2,2,2,mech,Base.CFrame,"Transparent") --Stand (motor6d never used)
  317. Stand.Name = "Left Leg"
  318. StandW = newWeld6D(Base,Base,Stand,CF(-4.5,-7-0.172-6,0))
  319. Stand = newPart(2,2,2,mech,Base.CFrame,"Transparent")
  320. Stand.Name = "Right Leg"
  321. StandW = newWeld6D(Base,Base,Stand,CF( 4.5,-7-0.172-6,0)) --]]
  322.  
  323. ------------------
  324. fillTriangle1Mech = function(...)
  325. local t1,t2 = fillTriangle(...)
  326. newWeld(Torso,Torso2,t1,Torso2.CFrame:toObjectSpace(t1.CFrame))
  327. newWeld(Torso,Torso2,t2,Torso2.CFrame:toObjectSpace(t2.CFrame))
  328. return t1,t2
  329. end
  330.  
  331. ------------------
  332. LThigh = newPart(3,3,3,mech,Torso.CFrame,"nonCollide","Transparent")
  333. LThighW = newWeld6D(Torso,Torso,LThigh,CF(-4.5+1.5,0,0),CF( 1.5,0.5,0)*CFA(ThighAngle,0,0))
  334. RThigh = newPart(3,3,3,mech,Torso.CFrame,"nonCollide","Transparent")
  335. RThighW = newWeld6D(Torso,Torso,RThigh,CF( 4.5-1.5,0,0),CF(-1.5,0.5,0)*CFA(ThighAngle,0,0))
  336. for i,v in pairs{[-1]=LThigh,[1]=RThigh} do
  337. newWeld(Torso,v,newPart(2.2,0.4,2.2,mech,nil,"CylinderMesh","nonCollide","Dark stone grey"),CF(1.41*i,0.5,0)*CFA(0,0,90))
  338. newWeld(Torso,v,newPart(1.8,0.41,1.8,mech,nil,"CylinderMesh","nonCollide","Black"),CF(1.41*i,0.5,0)*CFA(0,0,90))
  339. newWeld(Torso,v,newPart(1.75,0.2,1.75,mech,nil,"CylinderMesh","nonCollide","Really black"),CF(1.41*-i,0.5,0)*CFA(0,0,90))
  340.  
  341. newWeld(Torso,v,newPart(1.4,3.2,1.4,mech,nil,"CylinderMesh","nonCollide","Dark stone grey"),CF(0,-5,0)*CFA(0,0,90))
  342. newWeld(Torso,v,newPart(1.1,3.3,1.1,mech,nil,"CylinderMesh","nonCollide","Black"),CF(0,-5,0)*CFA(0,0,90))
  343. newWeld(Torso,v,newPart(1.6,0.2,1.2,mech,nil),CF(0,-3.9,-0.1))
  344.  
  345. local newp = newPart(1.6,math.sqrt(1+5.5*5.5)+0.05,0.2,mech,nil)
  346. local newpw = newWeld(Torso,v,newp,CF(0,-1.25,1.4-0.52)*CFA(math.deg(math.tan(1/5.5)),0,0))
  347. if i==-1 then
  348. LThighPad = newp
  349. LThighPadW = newpw
  350. else
  351. RThighPad = newp
  352. RThighPadW = newpw
  353. end
  354. local newp = newPart(1.6,math.sqrt(0.2^2+5.5^2)+0.05,0.2,mech,nil)
  355. local newpw = newWeld(Torso,v,newp,CF(0,-1.25,-1.4+0.3)*CFA(-math.deg(math.tan(0.6/5.5)),0,0)*CF(0,2.7725,0),CF(0,2.7725,0)*CFA(0,0,0))
  356. if i==-1 then
  357. LThighPad2 = newp
  358. LThighPad2W = newpw
  359. else
  360. RThighPad2 = newp
  361. RThighPad2W = newpw
  362. end
  363.  
  364. newWeld(Torso,v,newPart(3,1.2,0.8,mech,nil,"Wedge"),CF(0,2.1,-1.5+0.4)*CFA(0,0,0))
  365. newWeld(Torso,v,newPart(3,1.2,0.6,mech,nil),CF(0,2.1,-1.5+1.1))
  366. newWeld(Torso,v,newPart(3,1.2,1.6,mech,nil,"Wedge"),CF(0,2.1, 1.5-0.8)*CFA(0,180,0))
  367. for i=-1,1,2 do
  368. newWeld(Torso,v,newPart(0.7,7.5,1.6,mech,nil),CF(-1.15*i,-2.25,0))
  369. newWeld(Torso,v,newPart(0.7,0.8,0.5,mech,nil,"Wedge"),CF(1.15*i,-6.25,-0.4)*CFA(-90,0,0))
  370. newWeld(Torso,v,newPart(0.7,0.8,0.5,mech,nil,"Wedge"),CF(1.15*i,-6.25, 0.4)*CFA(-90,0,180))
  371. newWeld(Torso,v,newPart(0.7,0.7,7.5,mech,nil,"Wedge"),CF(1.15*i,-2.25,-0.8-0.35)*CFA(-90,0,0))
  372. newWeld(Torso,v,newPart(0.7,0.7,7.5,mech,nil,"Wedge"),CF(1.15*i,-2.25, 0.8+0.35)*CFA(-90,0,180))
  373. end
  374. end
  375. LLeg = newPart(2,2,2,mech,Torso.CFrame,"Transparent","nonCollide")
  376. LLegW = newWeld6D(LThigh,LThigh,LLeg,CF(0,-5,0),CF(0,0,0)*CFA(LegAngle,0,0))
  377. RLeg = newPart(2,2,2,mech,Torso.CFrame,"Transparent","nonCollide")
  378. RLegW = newWeld6D(RThigh,RThigh,RLeg,CF(0,-5,0),CF(0,0,0)*CFA(LegAngle,0,0))
  379. for i,v in pairs{LLeg,RLeg} do
  380. newWeld(Torso,v,newPart(2,1.6,2,mech,nil,"CylinderMesh"),CF(0,0,0)*CFA(0,0,90))
  381. newWeld(Torso,v,newPart(1,1,1,mech,nil,"CylinderMesh"),CF(0,-6,0)*CFA(0,0,90))
  382. newWeld(Torso,v,newPart(1.599,2,1,mech,nil),CFA(4,0,0)*CF(0,-1,-0.49))
  383. newWeld(Torso,v,newPart(1.599,2,1,mech,nil,"Wedge"),CFA(4,0,0)*CF(0,-1,0.5)*CFA(180,0,0))
  384. newWeld(Torso,v,newPart(1.6,3.2,1,mech,nil,"Torso"),CFA(4,0,0)*CF(0,-2-0.8,-0.355)*CFA(165+5,0,0)*CF(0,0.7,0))
  385. newWeld(Torso,v,newPart(1,1.15,1,mech,nil),CF(0,-6,0)*CFA(-17,0,0)*CF(0,0.575,0))
  386. for i=-1,1,2 do
  387. local baa = newPart(0.5,0.4,0.5,mech,nil,"CylinderMesh","Dark stone grey")
  388. newWeld(Torso,v,baa,CF(-0.25*i,-5.5,0.5)*CFA(-5,0,2.2*i))
  389. newWeld(Torso,baa,newPart(0.4,5,0.4,mech,nil,"CylinderMesh","Black"),CF(0,2.5,0))
  390. newWeld(Torso,baa,newPart(0.5,0.5,0.5,mech,nil,"Sphere","Dark stone grey"),CF(0,-0.15,0))
  391. newWeld(Torso,baa,newPart(0.7,1.8,0.7,mech,nil,"CylinderMesh","Dark stone grey"),CF(0,4.1-0.4,0))
  392. end
  393. end
  394. LFoot = newPart(2,2,2,mech,nil,"Transparent","nonCollide")
  395. LFootW = newWeld6D(LLeg,LLeg,LFoot,CF(0,-6,0),CF(0,0,0)*CFA(FootAngle,0,0))
  396. RFoot = newPart(2,2,2,mech,nil,"Transparent","nonCollide")
  397. RFootW = newWeld6D(RLeg,RLeg,RFoot,CF(0,-6,0),CF(0,0,0)*CFA(FootAngle,0,0))
  398. for i,v in pairs{LFoot,RFoot} do
  399. newWeld(Torso,v,newPart(0.8,2.8,0.8,mech,nil,"CylinderMesh","nonCollide","S0.5","Dark stone grey"),CF(0,-1,-5)*CFA(0,0,90))
  400. newWeld(Torso,v,newPart(0.6,2.81,0.6,mech,nil,"CylinderMesh","nonCollide","S0.5","Black"),CF(0,-1,-5)*CFA(0,0,90))
  401. newWeld(Torso,v,newPart(1,0.5,1,mech,nil,"CylinderMesh","nonCollide","S0.5"),CF(0,-1,-5)*CFA(0,-1,90))
  402. newWeld(Torso,v,newPart(1,0.25,1,mech,nil,"CylinderMesh","nonCollide","S0.5"),CF(-0.125-0.65-0.4,-1,-5)*CFA(0,0,90))
  403. newWeld(Torso,v,newPart(1,0.25,1,mech,nil,"CylinderMesh","nonCollide","S0.5"),CF(0.125+0.65+0.4,-1,-5)*CFA(0,0,90))
  404. newWeld(Torso,v,newPart(0.501,1,1,mech,nil,"nonCollide"),CF(0,-1,-4.5))
  405. newWeld(Torso,v,newPart(0.251,1,1,mech,nil,"nonCollide"),CF(-0.125-0.65-0.4,-1,-4.5))
  406. newWeld(Torso,v,newPart(0.251,1,1,mech,nil,"nonCollide"),CF( 0.125+0.65+0.4,-1,-4.5))
  407. newWeld(Torso,v,newPart(1,0.5,5.5,mech,nil,"Wedge"),CF(-0.9-0.15,-1,-1.25)*CFA(0,180,-90))
  408. newWeld(Torso,v,newPart(1,0.5,5.5,mech,nil,"Wedge"),CF( 0.9+0.15,-1,-1.25)*CFA(0,180, 90))
  409. newWeld(Torso,v,newPart(1.6,1,5.5,mech,nil),CF(0,-1,-1.25)) --asd
  410. newWeld(Torso,v,newPart(0.8,1.7,0.8,mech,nil,"CylinderMesh","nonCollide","Dark stone grey"),CF(0,0,0)*CFA(0,0,90))
  411. newWeld(Torso,v,newPart(0.6,1.71,0.6,mech,nil,"CylinderMesh","nonCollide","Black"),CF(0,0,0)*CFA(0,0,90))
  412. for i=-1,1,2 do
  413. newWeld(Torso,v,newPart(0.6,1,1,mech,nil,"Wedge"),CF(0.5*i,-1,2)*CFA(0,180,180)) --heel
  414. newWeld(Torso,v,newPart(0.3,0.5,0.8,mech,nil),CF(0.65*i, 0.25,0)*CFA(0,0,0))
  415. newWeld(Torso,v,newPart(0.3,0.5,1.6,mech,nil),CF(0.65*i,-0.25,0)*CFA(0,0,0))
  416. newWeld(Torso,v,newPart(0.3,0.5,0.4,mech,nil,"Wedge"),CF(0.65*i,0.25,-0.6)*CFA(0, 0,0))
  417. newWeld(Torso,v,newPart(0.3,0.5,0.4,mech,nil,"Wedge"),CF(0.65*i,0.25, 0.6)*CFA(0,180,0))
  418. newWeld(Torso,v,newPart(0.3,0.5,0.2,mech,nil,"Wedge"),CF(0.65*i,-0.25,-0.9)*CFA(0, 0,0))
  419. newWeld(Torso,v,newPart(0.3,0.5,0.2,mech,nil,"Wedge"),CF(0.65*i,-0.25, 0.9)*CFA(0,180,0))
  420. end
  421. end
  422. LToe = newPart(3,1,1,mech,nil,"Dark stone grey","Transparent")
  423. LToeW = newWeld6D(LFoot,LFoot,LToe,CF(0,-1,-5),CF(0,0,0)*CFA(ToeAngle,0,0))
  424. RToe = newPart(3,1,1,mech,nil,"Dark stone grey","Transparent")
  425. RToeW = newWeld6D(RFoot,RFoot,RToe,CF(0,-1,-5),CF(0,0,0)*CFA(ToeAngle,0,0))
  426. for i,v in pairs{LToe,RToe} do
  427. local part = newPart(0.8,1,3,mech,nil,"Wedge","Dark stone grey")
  428. newWeld(Torso,v,part,CF(-0.65,0,-1.75))
  429. local part = newPart(0.8,1,3,mech,nil,"Wedge","Dark stone grey")
  430. newWeld(Torso,v,part,CF(0.65,0,-1.75))
  431. local part = newPart(0.8,1,1,mech,nil,"Wedge","Dark stone grey")
  432. newWeld(Torso,v,part,CF(-0.65,0,0.25)*CFA(180,0,0))
  433. local part = newPart(0.8,1,1,mech,nil,"Wedge","Dark stone grey")
  434. newWeld(Torso,v,part,CF( 0.65,0,0.25)*CFA(180,0,0))
  435. newWeld(Torso,v,newPart(4,3,5,mech,nil,"Transparent"),CF(0,1,-1.5))
  436. end
  437.  
  438.  
  439. ---------------TORSO1 LOWER (NOT Y TURN)
  440. newWeld(Torso,Torso1,newPart(5,3,3,mech,nil,"Torso"),CF(0,-0.5,0)*CFA(180,90,0)) --lowest torso
  441. newWeld(Torso,Torso1,newPart(1.6,3.4,1.6,mech,nil,"CylinderMesh","nonCollide","Dark stone grey"),CF(0,-0.8,-0.55)*CFA(0,0,90))
  442. for i=-1,1,2 do
  443. newWeld(Torso,Torso1,newPart(1.5,1.5,1.5,mech,nil,"Sphere","nonCollide"),CF(3*i,0,0))
  444. newWeld(Torso,Torso1,newPart(1.2,2.4,1.2,mech,nil,"CylinderMesh","nonCollide"),CF(3*i,0,0)*CFA(-55,55*i,0)*CF(0,0,-1.2)*CFA(90,0,0))
  445. end
  446. --Tail
  447. newWeld(Torso,Torso1,newPart(2.5,1.5,2.5,mech,nil,"CylinderMesh"),CF(0,-0.5,2)*CFA(90,0,0)*CF(0,0.5-0.25,0))
  448. newWeld(Torso,Torso1,newPart(2.3,0.2,2.3,mech,nil,"CylinderMesh","Dark stone grey"),CF(0,-0.5,2)*CFA(90,0,0)*CF(0,1-0.09,0))
  449. newWeld(Torso,Torso1,newPart(2,0.5,0.2,mech,nil,"Black"),CF(0,-0.5,2+1-0.08)*CFA(0,0,0))
  450.  
  451.  
  452.  
  453.  
  454. CockpitGlass = {}
  455. ---------------------TORSO2 UPPER
  456. newWeld(Torso,Torso2,newPart(2.9,0.2,2.9,mech,nil,"CylinderMesh","nonCollide","Really black"),CF(0,1-0.09,0))
  457. newWeld(Torso,Torso2,newPart(2.9,0.2,2.9,mech,nil,"CylinderMesh","nonCollide","Really black"),CF(0,1+2+0.09,0))
  458. newWeld(Torso,Torso2,newPart(2.6,2,2.6,mech,nil,"CylinderMesh","Dark stone grey"),CF(0,1+1,0))
  459.  
  460. for i=0.2,1.8,0.4 do
  461. newWeld(Torso,Torso2,newPart(3.1+i/3,0.2,3.1+i/3,mech,nil,"CylinderMesh","nonCollide"),CF(0,1+i,0))
  462. end
  463. newWeld(Torso,Torso2,newPart(8,5,4,mech,nil,"Torso"),CF(0,1+2+2.5,0)*CFA(180,90,0)) -- upper
  464.  
  465. Ceiling = newPart(4,0.2,6,mech,nil)
  466. newWeld(Torso,Torso2,Ceiling,CF(0,16.9,0))
  467.  
  468. newWeld(Torso,Torso2,newPart(4,1,1,mech,nil),CF(0,8-0.5,-4.5)) --floor front
  469. --front glass part
  470. newWeld(Torso,Torso2,newPart(4.4,1,0.2,mech,nil),CF(0,8,-4.9)*CFA(-30,0,0)*CF(0,0.5,0))
  471. newWeld(Torso,Torso2,newPart(0.25,4.4,0.25,mech,nil,"CylinderMesh"),CF(0,8,-4.9)*CFA(-30,0,0)*CF(0,1,0)*CFA(0,0,90)) --glass metal
  472. CockpitGlass[#CockpitGlass+1] = newWeld(Torso,Torso2,newPart(4.4,2+0.1,0.2,mech,nil),CF(0,8,-4.9)*CFA(-30,0,0)*CF(0,1+1,0)).Part1
  473. newWeld(Torso,Torso2,newPart(0.25,4.4,0.25,mech,nil,"CylinderMesh"),CF(0,8,-4.9)*CFA(-30,0,0)*CF(0,1+2,0)*CFA(0,0,90)) --glass metal
  474. CockpitGlass[#CockpitGlass+1] = newWeld(Torso,Torso2,newPart(4.4,1+3.35,0.2,mech,nil),CF(0,8,-4.9)*CFA(-30,0,0)*CF(0,1+2,0)*CFA(30+19.8,0,0)*CF(0,0.5+1.675,0)).Part1
  475. newWeld(Torso,Torso2,newPart(4.4,3,0.2,mech,nil),CF(0,17,-3)*CFA(-135-5,0,0)*CF(0,1.5,0)) --upper ceiling
  476. newWeld(Torso,Torso2,newPart(0.25,4.4,0.25,mech,nil,"CylinderMesh"),CF(0,8,-4.9)*CFA(-30,0,0)*CF(0,1+2,0)*CFA(30+19.8,0,0)*CF(0,1+3.35,0)*CFA(0,0,90)) --glass metal
  477.  
  478.  
  479. for i=-1,1,2 do
  480. newWeld(Torso,Torso2,newPart(6.2,3,2,mech,nil,"Torso"),CF(3*i,1+2+3.5,0)*CFA(180,90,0)) --side torsos
  481. newWeld(Torso,Torso2,newPart(3,1,3,mech,nil,"CylinderMesh"),CF(2.5*i,5,0)*CFA(0,0,90)) -- hipgun
  482.  
  483. newWeld(Torso,Torso2,newPart(1,2,2,mech,nil,"Wedge"),CF(3*i,8-0.5,-4)*CFA(0,-90*i,90*i)) --floorwedge
  484. newWeld(Torso,Torso2,newPart(1,1,2,mech,nil,"Wedge"),CF(3*i,8-0.5, 3.5)*CFA(0,-90*i,90*-i))
  485.  
  486. newWeld(Torso,Torso2,newPart(0.2, 6,6.2,mech,nil),CF(4*i,8,-0.1)*CFA(0,0,-10*i)*CF(-0.1*i,3,0)) --sidewalls
  487. newWeld(Torso,Torso2,newPart(0.2,4.3,6.2,mech,nil),CF(4*i,8,-0.1)*CFA(0,0,-10*i)*CF(0,6,0)*CFA(0,0,55*i)*CF(0,2.15,0)) --sidewall upper
  488. newWeld(Torso,Torso2,newPart(0.2,1,math.sqrt(2*2+2*2)+0.1,mech,nil),CF(-2.9*i,8,-4)*CFA(0,-45*i,25*i)*CF(0,0.5,0.05)) --side front
  489.  
  490. --metal glasses
  491. newWeld(Torso,Torso2,newPart(0.25,4,0.25,mech,nil,"CylinderMesh"),CF(2.2*i,8,-4.9)*CFA(-30,0,0)*CF(0,1+1-1,0))
  492. newWeld(Torso,Torso2,newPart(0.25,4.4,0.25,mech,nil,"CylinderMesh"),CF(2.2*i,8,-4.9)*CFA(-30,0,0)*CF(0,1+2,0)*CFA(30+19.8,0,0)*CF(0,0.5+1.675,0))
  493. newWeld(Torso,Torso2,newPart(0.25,0.25,0.25,mech,nil,"Sphere"),CF(2.2*i,8,-4.9)*CFA(-30,0,0)*CF(0,1+2,0))
  494. newWeld(Torso,Torso2,newPart(0.25,0.25,0.25,mech,nil,"Sphere"),CF(2.2*i,8,-4.9)*CFA(-30,0,0)*CF(0,1+2,0)*CFA(30+19.8,0,0)*CF(0,1+3.35,0))
  495. local p1 = (Torso2.CFrame*CF(2.2*i,17,-3)*CFA(-135-5,0,0)*CF(0,3,0)).p
  496. local p2 = (Torso2.CFrame*CF(4*i,8,-3.2)*CFA(0,0,-10*i)*CF(0,6,0)).p
  497. local len = (p1-p2).magnitude
  498. local cf = CF(p1,p2)*CF(0,0,-len/2)*CFA(-90,0,0)
  499. newWeld(Torso,Torso2,newPart(0.25,len,0.25,mech,nil,"CylinderMesh"),Torso2.CFrame:toObjectSpace(cf))
  500. newWeld(Torso,Torso2,newPart(0.25,0.25,0.25,mech,nil,"Sphere"),Torso2.CFrame:toObjectSpace(cf*CF(0,len/2,0)))
  501. p1 = (Torso2.CFrame*CF(2.2*i,8,-4.9)*CFA(-30,0,0)*CF(0,1+2,0)).p
  502. len = (p1-p2).magnitude
  503. cf = CF(p1,p2)*CF(0,0,-len/2)*CFA(-90,0,0)
  504. newWeld(Torso,Torso2,newPart(0.25,len,0.25,mech,nil,"CylinderMesh"),Torso2.CFrame:toObjectSpace(cf))
  505. p1 = (Torso2.CFrame*CF(4*i,8,-3.2)*CFA(0,0,-10*i)*CF(-0.1*i,2,0)).p
  506. len = (p1-p2).magnitude
  507. cf = CF(p1,p2)*CF(0,0,-len/2)*CFA(-90,0,0)
  508. newWeld(Torso,Torso2,newPart(0.25,len,0.25,mech,nil,"CylinderMesh"),Torso2.CFrame:toObjectSpace(cf))
  509. newWeld(Torso,Torso2,newPart(0.25,0.25,0.25,mech,nil,"Sphere"),Torso2.CFrame:toObjectSpace(cf*CF(0,-len/2,0)))
  510. p2 = (Torso2.CFrame*CF(2.2*i,8,-4.9)*CFA(-30,0,0)*CF(0,1,0)).p
  511. len = (p1-p2).magnitude
  512. cf = CF(p1,p2)*CF(0,0,-len/2)*CFA(-90,0,0)
  513. newWeld(Torso,Torso2,newPart(0.25,len,0.25,mech,nil,"CylinderMesh"),Torso2.CFrame:toObjectSpace(cf))
  514.  
  515. local t1,t2 = fillTriangle1Mech{ --upper glass
  516. (Torso2.CFrame*CF(2.2*i,8,-4.9)*CFA(-30,0,0)*CF(0,1+2,0)).p;
  517. (Torso2.CFrame*CF(2.2*i,17,-3)*CFA(-135-5,0,0)*CF(0,3,0)).p;
  518. (Torso2.CFrame*CF(4*i,8,-3.2)*CFA(0,0,-10*i)*CF(0,6,0)).p;}
  519. CockpitGlass[#CockpitGlass+1] = t1 newI{"SpecialMesh",t1,MeshType="Wedge",Scale=V3(0,1,1)}
  520. CockpitGlass[#CockpitGlass+1] = t2 newI{"SpecialMesh",t2,MeshType="Wedge",Scale=V3(0,1,1)}
  521. local t1,t2 = fillTriangle1Mech{ --mid glass
  522. (Torso2.CFrame*CF(2.2*i,8,-4.9)*CFA(-30,0,0)*CF(0,1+2,0)).p;
  523. (Torso2.CFrame*CF(2.2*i,8,-4.9)*CFA(-30,0,0)*CF(0,1,0)).p;
  524. (Torso2.CFrame*CF(4*i,8,-3.2)*CFA(0,0,-10*i)*CF(-0.1*i,2,0)).p;}
  525. CockpitGlass[#CockpitGlass+1] = t1 newI{"SpecialMesh",t1,MeshType="Wedge",Scale=V3(0,1,1)}
  526. CockpitGlass[#CockpitGlass+1] = t2 newI{"SpecialMesh",t2,MeshType="Wedge",Scale=V3(0,1,1)}
  527. local t1,t2 = fillTriangle1Mech{ --lower glass
  528. (Torso2.CFrame*CF(2.2*i,8,-4.9)*CFA(-30,0,0)*CF(0,1+2,0)).p;
  529. (Torso2.CFrame*CF(4*i,8,-3.2)*CFA(0,0,-10*i)*CF(0,6,0)).p;
  530. (Torso2.CFrame*CF(4*i,8,-3.2)*CFA(0,0,-10*i)*CF(-0.1*i,2,0)).p;}
  531. CockpitGlass[#CockpitGlass+1] = t1 newI{"SpecialMesh",t1,MeshType="Wedge",Scale=V3(0,1,1)}
  532. CockpitGlass[#CockpitGlass+1] = t2 newI{"SpecialMesh",t2,MeshType="Wedge",Scale=V3(0,1,1)}
  533.  
  534. fillTriangle1Mech{ --sidewall upper front
  535. (Torso2.CFrame*CF(2.2*i,17,-3)).p;
  536. (Torso2.CFrame*CF(2.2*i,17,-3)*CFA(-135-5,0,0)*CF(0,3,0)).p;
  537. (Torso2.CFrame*CF(4*i,8,-3.2)*CFA(0,0,-10*i)*CF(0,6,0)).p;}
  538.  
  539. fillTriangle1Mech{ --sidewall lower front
  540. (Torso2.CFrame*CF(2.2*i,8,-4.9)*CFA(-30,0,0)*CF(0,1,0)).p;
  541. (Torso2.CFrame*CF(2.9*i,8,-4)*CFA(0,45*i,-25*i)*CF(0,1,math.sqrt(2*2+2*2)/2+0.1)).p;
  542. (Torso2.CFrame*CF(4*i,8,-3.2)*CFA(0,0,-10*i)*CF(-0.1*i,2,0)).p;}
  543.  
  544. fillTriangle1Mech{ --sides and back ceiling
  545. (Torso2.CFrame*CF(2*i,8,4)).p;
  546. (Torso2.CFrame*CF(2*i,8,4)*CFA(20,0,0)*CF(0,6,0)).p;
  547. (Torso2.CFrame*CF(4*i,8,3)).p;}
  548. fillTriangle1Mech{
  549. (Torso2.CFrame*CF(4*i,8,3)*CFA(0,0,-10*i)*CF(0,6,0)).p;
  550. (Torso2.CFrame*CF(2*i,8,4)*CFA(20,0,0)*CF(0,6,0)).p;
  551. (Torso2.CFrame*CF(4*i,8,3)).p;}
  552. fillTriangle1Mech{
  553. (Torso2.CFrame*CF(4*i,8,3)*CFA(0,0,-10*i)*CF(0,6,0)).p;
  554. (Torso2.CFrame*CF(2*i,8,4)*CFA(20,0,0)*CF(0,6,0)).p;
  555. (Torso2.CFrame*CF(2*i,16.5+0.5,3)).p;}
  556.  
  557.  
  558.  
  559.  
  560. end
  561.  
  562. --roof designs
  563. newWeld(Torso,Torso2,newPart(9,1,1,mech,nil,"Wedge"),CF(0,17.5,-1.5))
  564. newWeld(Torso,Torso2,newPart(4.4,1,2,mech,nil,"Wedge"),CF(0,17.5,-2))
  565. newWeld(Torso,Torso2,newPart(4.4,1,4,mech,nil,"Wedge"),CF(0,18.5, 1))
  566. newWeld(Torso,Torso2,newPart(4.4,2,3,mech,nil,"Wedge"),CF(0,18, 4.5)*CFA(0,180,0))
  567. newWeld(Torso,Torso2,newPart(9,1,4,mech,nil),CF(0,17.5, 1))
  568. newWeld(Torso,Torso2,newPart(4.4,3,3.3,mech,nil,"Wedge"),CF(0,17-1.65, 4.5)*CFA(-90,0,0))
  569.  
  570. LShoulder = newPart(2.6,2.6,2.6,mech,nil,"Dark stone grey","Sphere")
  571. LShoulderW = newWeld6D(Torso2,Torso2,LShoulder,CF(-8,16,0),CF(0,0,0)*CFA(30,0,8))
  572. RShoulder = newPart(2.6,2.6,2.6,mech,nil,"Dark stone grey","Sphere")
  573. RShoulderW = newWeld6D(Torso2,Torso2,RShoulder,CF( 8,16,0),CF(0,0,0)*CFA(30,0,-8))
  574.  
  575. BackBooster = {}
  576. for i=-1,1,2 do --back torso design
  577. local v = newPart(4,4,4,mech,nil,"CylinderMesh")
  578. newWeld(Torso,Torso2,v,CF(4.5*i,15.5,3.75)*CFA(-15,0,5*i))
  579. newWeld(Torso,v,newPart(3.65,2,3.65,mech,nil,"CylinderMesh"),CF(0,-2,0)*CFA(2,0,0)*CF(0,0,0))
  580. newWeld(Torso,v,newPart(3.2,3,3.2,mech,nil,"CylinderMesh"),CF(0,-2,0)*CFA(4,0,0)*CF(0,-1.5,0.1))
  581. local backboost = newPart(2.4,0.2,2.4,mech,nil,"CylinderMesh","Really black","Neon")
  582. newWeld(Torso,v,backboost,CF(0,-2,0)*CFA(4,0,0)*CF(0,-2.91,0.1))
  583. BackBooster[i] = newI{"ParticleEmitter",backboost
  584. ,Lifetime = NumberRange.new(0.8,1)
  585. ,LightEmission=1
  586. ,Color = ColorSequence.new(Color3.new(178/255,248/255,255/255),Color3.new(0/255,0/255,255/255))
  587. ,Texture = assetprefix.."346519018"
  588. ,LockedToPart=true
  589. ,EmissionDirection="Bottom"
  590. ,Rate=600
  591. ,Speed = NumberRange.new(6,6)
  592. ,Rotation = NumberRange.new(-180,-180)
  593. ,RotSpeed = NumberRange.new(-90,-90)
  594. ,VelocitySpread=0
  595. ,Acceleration=V3(0,-15,0)
  596. ,Enabled=false
  597. }
  598. for y=1,6 do
  599. newWeld(Torso,v,newPart(1,1,0.4,mech,nil,"Wedge"),CF(0,-2,0)*CFA(4,0,0)*CF(0,-3-0.5,0.1)*CFA(0,y*60,0)*CF(0,0,1.5-0.2)*CFA(180,0,0))
  600. end
  601. end
  602.  
  603.  
  604. for i,v in pairs{[-1]=LShoulder,[1]=RShoulder} do
  605. newWeld(Torso,v,newPart(3,0.75,3,mech,nil,"CylinderMesh"),CFA(0,0, 50)) --x
  606. newWeld(Torso,v,newPart(3,0.75,3,mech,nil,"CylinderMesh"),CFA(0,0,-50)) --x
  607. newWeld(Torso,Torso2,newPart(6,2.5,2,mech,nil,"Torso"),CF(-5.5*i,17-0.25,0)*CFA(0,90,0)) --shoulder
  608. newWeld(Torso,Torso2,newPart(4.5,2.5,3,mech,nil,"Torso"),CF(-8*i,17+0.5,0)*CFA(0,90,0))
  609.  
  610. newWeld(Torso,Torso2,newPart(1.6,2,2,mech,nil,"Wedge"),CF(-5.5*i,14.5, 1.5)*CFA(180,90*i,0))
  611. newWeld(Torso,Torso2,newPart(1.6,2,2,mech,nil,"Wedge"),CF(-5.5*i,14.5,-1.5)*CFA(180,90*i,0))
  612. newWeld(Torso,Torso2,newPart(5,3,2.5,mech,nil,"Wedge"),CF(-3.5*i,15.5,0.5)*CFA(180,-90*i,0))
  613.  
  614. newWeld(Torso,Torso2,newPart(4.3,2.5,3,mech,nil,"Wedge"),CF(-4.35*i,16.75,3.5)*CFA(180,0,0))
  615.  
  616.  
  617. newWeld(Torso,v,newPart(3,1,3,mech,nil,"Wedge"),CF(0,-11.5, 1)*CFA(180,0, 0))
  618. newWeld(Torso,v,newPart(3,2,1,mech,nil,"Wedge"),CF(0,-11 , -1)*CFA( 0,0,180))
  619. newWeld(Torso,v,newPart(3,1,3,mech,nil,"Wedge"),CF(0,-10.5, 1)*CFA( 0,180,0))
  620.  
  621. newWeld(Torso,v,newPart(2.8,1,2.2,mech,nil,"Wedge"),CF(0,-2.5,0.6)*CFA(180,0, 0))
  622. newWeld(Torso,v,newPart(2.8,2,1,mech,nil,"Wedge"),CF(0,-2 , -1)*CFA( 180,180,180))
  623. newWeld(Torso,v,newPart(2.8,1,2.2,mech,nil,"Wedge"),CF(0,-1.5,0.6)*CFA( 0,180,0))
  624. newWeld(Torso,v,newPart(0.8,1.7,0.8,mech,nil,"CylinderMesh","Dark stone grey"),CF(-0.6,-1.3,0.9)*CFA(-15,0,-7))
  625. newWeld(Torso,v,newPart(0.8,1.7,0.8,mech,nil,"CylinderMesh","Dark stone grey"),CF( 0.6,-1.3,0.9)*CFA(-15,0,7))
  626.  
  627. newWeld(Torso,v,newPart(4,1.42,4,mech,nil,"CylinderMesh","Dark stone grey"),CF(-0.7*i,-4,2)*CFA(0,0,90))--cylinder upper shoulder
  628. newWeld(Torso,v,newPart(3,0.2,3,mech,nil,"CylinderMesh"),CF(-1.5*i,-4,2)*CFA(0,0,90))
  629. newWeld(Torso,v,newPart(4,1.41,4,mech,nil,"CylinderMesh"),CF(-0.7*i,-4-0.25,1.5-0.5)*CFA(0,0,90))
  630. newWeld(Torso,v,newPart(2.05,3.19,2.05,mech,nil,"CylinderMesh","Dark stone grey"),CF(-0.1*i,-4,2)*CFA(0,0,90))
  631. newWeld(Torso,v,newPart(1.5,1.6,1.5,mech,nil,"CylinderMesh","Black"),CF(0.7*i,-4,2)*CFA(0,0,90))
  632. newWeld(Torso,v,newPart(1.4,5,2,mech,nil,"Dark stone grey"),CF(0.69*i,-4,2)*CFA(12.5,0,0)*CF(0,-2.5,0))
  633. newWeld(Torso,v,newPart(1.4,2.8,2,mech,nil,"Dark stone grey"),CF(0.69*i,-4,2)*CFA(129,0,0)*CF(0,-1.4,0))
  634. for x=50,110,30 do
  635. newWeld(Torso,v,newPart(1.3,1.6,1.3,mech,nil,"CylinderMesh","Dark stone grey"),CF(-0.7*i,-4-0.25,1.5-0.5)*CFA(x,0,0)*CF(0,2+0.8,0))
  636. newWeld(Torso,v,newPart(1,0.2,1,mech,nil,"CylinderMesh"),CF(-0.7*i,-4-0.25,1.5-0.5)*CFA(x,0,0)*CF(0,2+1.6-0.09,0))
  637. end
  638. newWeld(Torso,v,newPart(1.4,6.6,1.4,mech,nil,"CylinderMesh"),CF(-0.7*i,-4-0.25,1+2)*CFA( 5,0,0)*CF(0,-3.3,-0.7))
  639. newWeld(Torso,v,newPart(1.4,6,1.4,mech,nil,"CylinderMesh"),CF(-0.7*i,-4-0.25,1-2)*CFA(-2,0,0)*CF(0,-3, 0.7))
  640. newWeld(Torso,v,newPart(1.4,6,2.3,mech,nil),CF(-0.7*i,-7,0.8))
  641.  
  642. newWeld(Torso,v,newPart(4.2,2,3,mech,nil,"Torso"),CF(0,-9.55,0.75)*CFA(14,90,0))
  643.  
  644. end
  645.  
  646. LElbow = newPart(1,1,1,mech,nil)
  647. LElbowW = newWeld6D(LShoulder,LShoulder,LElbow,CF(0,-12,0),CF(0,0,0)*CFA(-90,0,0))
  648. RElbow = newPart(1,1,1,mech,nil)
  649. RElbowW = newWeld6D(RShoulder,RShoulder,RElbow,CF(0,-12,0),CF(0,0,0)*CFA(-90-10,0,0))
  650.  
  651. for i,v in pairs{[-1]=LElbow,[1]=RElbow} do
  652. newWeld(Torso,v,newPart(2.4,3.5,2.4,mech,nil,"CylinderMesh","Dark stone grey"),CF(0,0,0)*CFA(0,0,90))
  653. newWeld(Torso,v,newPart(1.7,3.8,1.7,mech,nil,"CylinderMesh","Black"),CF(0,0,0)*CFA(0,0,90))
  654. newWeld(Torso,v,newPart(3,0.6,3,mech,nil,"CylinderMesh","Really black"),CF(0,0,0)*CFA(0,0,90))
  655. if i == -1 then
  656. newWeld(Torso,v,newPart(2.2,2,2.5,mech,nil,"Torso"),CF(0,-0.5,1.3)*CFA(90,90,0)) --z y x --y z x
  657. newWeld(Torso,v,newPart(1.4,2,1,mech,nil,"Dark stone grey"),CF(0,-1,0))
  658.  
  659. newWeld(Torso,v,newPart(0.75,2.4,0.75,mech,nil,"CylinderMesh","Dark stone grey"),CF(-0.6,-1.6,1.3)*CFA(30,0,0))
  660. newWeld(Torso,v,newPart(0.75,2.4,0.75,mech,nil,"CylinderMesh","Dark stone grey"),CF( 0.6,-1.6,1.3)*CFA(30,0,0))
  661.  
  662. newWeld(Torso,v,newPart(2,2.2,2,mech,nil,"Wedge"),CF(0,-1.9,-1.5))
  663. newWeld(Torso,v,newPart(3,1,2,mech,nil),CF(0,-2.5,0))
  664.  
  665. end
  666. end
  667.  
  668. --Left Arm
  669. newWeld(Torso,LElbow,newPart(3,3.5,4,mech,nil,"Wedge"),CF(0,-3-2,-0.75)*CFA(-90,0,0))
  670. newWeld(Torso,LElbow,newPart(5,4,5,mech,nil,"CylinderMesh","Dark stone grey"),CF(0,-3-2.5,0)*CFA(0,0,90))
  671. newWeld(Torso,LElbow,newPart(2.4,5,2.4,mech,nil,"CylinderMesh","Dark stone grey"),CF(0,-3-2.5,0)*CFA(0,0,90))
  672. newWeld(Torso,LElbow,newPart(4,1.2,4,mech,nil,"CylinderMesh","Black"),CF(0,-3-2.5+1,-1)*CFA(0,0,90))
  673. --newWeld(Torso,LElbow,newPart(4.99,2.3,1.1,mech,nil,"Dark stone grey"),CF(0,-3-2.5-0.5,0))
  674. for i=-1,1,2 do
  675. newWeld(Torso,LElbow,newPart(1,4,4,mech,nil,"Sphere"),CF(2*i,-3-2.5,0)*CFA(0,0,0))
  676. newWeld(Torso,LElbow,newPart(0.7,5,0.7,mech,nil,"CylinderMesh","Dark stone grey"),CF(0.6*i,-3-5+1+1.2+0.5,1.3+1.8-0.45)*CFA(-10,0,0)*CF(0,2.5,0))
  677. end
  678. newWeld(Torso,LElbow,newPart(2.6,6,2.6,mech,nil),CF(0,-3-5-1,0)) --
  679. newWeld(Torso,LElbow,newPart(3.5,6,1.1,mech,nil,"Dark stone grey"),CF(0,-3-5-1,0))
  680. newWeld(Torso,LElbow,newPart(2.6,3,1.8,mech,nil,"Wedge"),CF(0,-3-5+1,1.3+0.9)*CFA(180,0,0))
  681. newWeld(Torso,LElbow,newPart(1,2.6,1,mech,nil,"CylinderMesh"),CF(0,-3-5+1+1.2+0.5,1.3+1.8-0.45)*CFA(0,0,90))
  682. newWeld(Torso,LElbow,newPart(1,1.4,1,mech,nil,"CylinderMesh","Dark stone grey"),CF(0,-3-5-3.5,1.3)*CFA(0,0,90))
  683. newWeld(Torso,LElbow,newPart(1.4,4,1,mech,nil,"Dark stone grey"),CF(0,-3-5-3.5+2,1.3))
  684. newWeld(Torso,LElbow,newPart(1.5,6,1.5,mech,nil,"Dark stone grey","CylinderMesh"),CF(0,-3-5-3.5+2.5,-2.2+1))
  685. newWeld(Torso,LElbow,newPart(2,3,2,mech,nil,"Dark stone grey","CylinderMesh"),CF(0,-3-5,-2.2+1))
  686. newWeld(Torso,LElbow,newPart(2.5,3,2.5,mech,nil,"Dark stone grey","CylinderMesh"),CF(0,-3-3.5,-2.2+1))
  687. newWeld(Torso,LElbow,newPart(2.6,1,1,mech,nil,"Wedge"),CF(0,-3-2.5+1,-2.5-0.5+0.2)*CFA(0,180,0))
  688. newWeld(Torso,LElbow,newPart(2.6,1,1,mech,nil),CF(0,-3-2.5,-2.5-0.5+0.2))
  689. newWeld(Torso,LElbow,newPart(2.6,2,2,mech,nil,"Wedge"),CF(0,-3-2.5-1-0.5,-2.5+0.2)*CFA(0,0,180))
  690.  
  691. LeftGunUse = false
  692. LeftGun = newPart(4,1,4,mech,nil,"CylinderMesh","Dark stone grey")
  693. LeftGunW = newWeld(Torso,LElbow,LeftGun,CF(0,-3-5-4.5,0)*CFA(0,0,0))
  694. newWeld(Torso,LeftGun,newPart(1.6,1,1.6,mech,nil,"Dark stone grey"),CF(0,-1,0))
  695. LeftGunSmoke = newI{"Smoke",LeftGun,Color=Color3.new(20/255,20/255,20/255),Opacity=0.5,Enabled=false,RiseVelocity=-10,Size=2}
  696. for i=120,360,120 do
  697. newWeld(Torso,LeftGun,newPart(1.6,1,1.6,mech,nil,"Dark stone grey"),CF(0,-1,0)*CFA(0,i,0)*CF(0,0,-2+0.8))
  698. newWeld(Torso,LeftGun,newPart(1,1,1,mech,nil,"Ring","Dark stone grey"),CF(0,-1.5-2,0)*CFA(0,i,0)*CF(0,0,-2+0.85)*CFA(90,0,0)).Part1.Mesh.Scale=V3(1.6,1.6,25)
  699. newWeld(Torso,LeftGun,newPart(2.66,1,1,mech,nil,"Dark stone grey"),CF(0,-1,0)*CFA(0,i+60,0)*CF(0,0,-2+0.81))
  700. local ghole = newPart(1.75,0.5,1.75,mech,nil,"Really black","Sphere","Neon")
  701. newWeld(Torso,LeftGun,ghole,CF(0,-1.5-2-0.5,0)*CFA(0,i,0)*CF(0,0,-2+0.85)) -- gun hole
  702. end
  703.  
  704. --Right Arm
  705. local of1 = 2
  706. local of2 = -5.2
  707. newWeld(Torso,RElbow,newPart(3.5,3,2.4,mech,nil,"Dark stone grey"),CFA(-55,0,0)*CF( 0,-1.5,0))
  708. newWeld(Torso,RElbow,newPart(3,4,3,mech,nil,"CylinderMesh","Dark stone grey"),CF( 0,of2+3.5,of1)*CFA(0,0,90))
  709. newWeld(Torso,RElbow,newPart(7,1,2,mech,nil,"Torso"),CF( 0,of2-1,of1-1.5-1.5)*CFA(-90,90,0))
  710. newWeld(Torso,RElbow,newPart(5,0.5,1,mech,nil,"Torso"),CF( 0,of2-5,of1-1.5-1.25)*CFA(-90,90,0))
  711. newWeld(Torso,RElbow,newPart(6,0.8,1.4,mech,nil,"Torso"),CF( 0,of2-1,of1+1.5+1.4)*CFA( 90,90,0))
  712. newWeld(Torso,RElbow,newPart(2,18,1,mech,nil),CF(0,of2-3-3,of1-1.5-0.5)) --upper long
  713. newWeld(Torso,RElbow,newPart(2,18,1,mech,nil),CF(-0.535,of2-3-3,of1-1.5-0.825)*CFA(0, 70,0)*CF(-1,0,0))
  714. newWeld(Torso,RElbow,newPart(2,18,1,mech,nil),CF( 0.535,of2-3-3,of1-1.5-0.825)*CFA(0,-70,0)*CF( 1,0,0))
  715. newWeld(Torso,RElbow,newPart(2,18,1,mech,nil),CF(0,of2-3-3,of1+1.5+0.5)) --lower long
  716. newWeld(Torso,RElbow,newPart(2,18,1,mech,nil),CF(-0.535,of2-3-3,of1+1.5+0.825)*CFA(0,-70,0)*CF(-1,0,0))
  717. newWeld(Torso,RElbow,newPart(2,18,1,mech,nil),CF( 0.535,of2-3-3,of1+1.5+0.825)*CFA(0, 70,0)*CF( 1,0,0))
  718. newWeld(Torso,RElbow,newPart(3.4,2,4,mech,nil,"Wedge"),CF( 0,of2+1,of1-1.5)*CFA(-90,0,180))
  719. newWeld(Torso,RElbow,newPart(3.4,4,2,mech,nil,"Wedge"),CF( 0,of2+1,of1+1.5)*CFA( 0,0,180))
  720. newWeld(Torso,RElbow,newPart(1.7,2,1.7,mech,nil,"CylinderMesh","Dark stone grey"),CF( 0,of2+2,of1)*CFA( 0,0,180))
  721. newWeld(Torso,RElbow,newPart(1.3,2.01,1.3,mech,nil,"CylinderMesh","Really black"),CF( 0,of2+2,of1)*CFA( 0,0,180))
  722.  
  723.  
  724. newWeld(Torso,RElbow,newPart(3.4,1,5,mech,nil),CF( 0,of2+3.5,of1)*CFA( 0,0,180))
  725. newWeld(Torso,RElbow,newPart(3.4,1,5,mech,nil,"Wedge"),CF( 0,of2+1.5,of1+3)*CFA(-90,0,180))
  726. newWeld(Torso,RElbow,newPart(3.4,2,2,mech,nil,"Wedge"),CF( 0,of2+5,of1-1.5)*CFA(0,0,0))
  727. newWeld(Torso,RElbow,newPart(3.4,2,4,mech,nil,"Wedge"),CF( 0,of2+5,of1+1.5)*CFA(0,180,0))
  728.  
  729. newWeld(Torso,RElbow,newPart(2.6,1,3,mech,nil,"Dark stone grey"),CF( 0,of2+5.25,of1+1.5+0.5)*CFA(27,0,0))
  730. for x=60,360,60 do
  731. newWeld(Torso,RElbow,newPart(5,1,3.45,mech,nil),CF( 0,of2+4.5,of1+1.5+0.25)*CFA(27,0,0)*CF(0,1+3,0)*CFA(x,0,0)*CF(0,2.5,0))
  732. end
  733. newWeld(Torso,RElbow,newPart(5.5,4,5.5,mech,nil,"Dark stone grey","CylinderMesh"),CF( 0,of2+4.5,of1+1.5+0.25)*CFA(27,0,0)*CF(0,1+3,0)*CFA(0,0,90))
  734. for i=-1,1,2 do
  735. newWeld(Torso,RElbow,newPart(0.6,0.25,1.6,mech,nil,"Black"),CF(1.2*i,of2-14,of1))
  736. for ii=1,10 do
  737. newWeld(Torso,RElbow,newPart(0.6,0.25,2,mech,nil,"Black"),CF(1.2*i,of2-14.75+ii*1.7,of1)*CFA(ii%2==0 and 56 or -56,0,0))
  738. end
  739. end
  740.  
  741.  
  742. Hatch = newPart(4,6,0.2,mech,nil)
  743. HatchW = newWeld6D(Torso2,Torso2,Hatch,CF(0,11-3,4),CF(0,-3,-0.1)*CFA(-20,0,0)) -- x is -20
  744. newWeld(Torso,Torso2,newPart(4,4.5,0.2,mech,nil),CF(0,8,4)*CFA(20,0,0)*CF(0,6,0)*CFA(-20-42,0,0)*CF(0,2.25,0))
  745.  
  746. Seat = newI{"Seat",mech,Name="Seat",formFactor="Symmetric",Size=V3(2,1,2),TopSurface="SmoothNoOutlines"}
  747. SeatW = newWeld6D(Torso2,Torso2,Seat,CF(0,8.5,0))
  748. newWeld(Torso,Seat,newPart(2,1,1,mech,nil,"Wedge"),CF(0,0,-1.5))
  749. newWeld(Torso,Seat,newPart(2,2.6,0.8,mech,nil),CF(0,0.5+1.15,0.8)*CFA(10,0,0))
  750. newWeld(Torso,Seat,newPart(2,1.2,0.8,mech,nil),CF(0,0.5+2.9,1)*CFA(0,0,0))
  751.  
  752.  
  753. Head = newPart(1,1,1,mech,nil,"nonCollide","Transparent")
  754. Head.Name="Head"
  755. HeadW = newWeld(Torso,Torso,Head,CF(0,2,0))
  756.  
  757. for i,v in pairs(CockpitGlass) do
  758. v.Transparency = 0.6
  759. end
  760. CockpitGlassD = false
  761. for i,v in pairs(mech:children()) do
  762. if v:IsA'BasePart' and v.Material==Enum.Material.SmoothPlastic and v.Transparency==0 then
  763. v.Material="Metal"
  764. end
  765. end
  766.  
  767. Base.Name="HumanoidRootPart" BaseW.Name = "Root Hip"
  768. Torso.Name="Torso"
  769. Torso1.Name = "LowerTorso" Torso1W.Name = "Lower Hip"
  770. Torso2.Name = "UpperTorso" Torso2W.Name = "Upper Hip"
  771. LThigh.Name = "LeftThigh" LThighW.Name = "LThigh"
  772. RThigh.Name = "RightThigh" RThighW.Name = "RThigh"
  773. LLeg.Name = "LeftLeg" LLegW.Name = "LLeg"
  774. RLeg.Name = "RightLeg" RLegW.Name = "RLeg"
  775. LFoot.Name = "LeftFoot" LFootW.Name = "LFoot"
  776. RFoot.Name = "RightFoot" RFootW.Name = "RFoot"
  777. LToe.Name = "LeftToe" LToeW.Name = "LToe"
  778. RToe.Name = "RightToe" RToeW.Name = "RToe"
  779. LShoulder.Name = "LeftShoulder" LShoulderW.Name = "LShoulder"
  780. RShoulder.Name = "RightShoulder" RShoulderW.Name = "RShoulder"
  781. LElbow.Name = "LeftElbow" LElbowW.Name = "LElbow"
  782. RElbow.Name = "RightElbow" RElbowW.Name = "RElbow"
  783. Hatch.Name = "Hatch" HatchW.Name = "Hatch"
  784. SeatW.Name="Seat"
  785.  
  786.  
  787. ----
  788. checkGroundTouch = function()
  789. local Hit1,Pos1 = ray(LToe.Position,LToe.CFrame*CF(0,-1,0).p-LToe.Position,mech,3)
  790. local Hit2,Pos2 = ray(RToe.Position,RToe.CFrame*CF(0,-1,0).p-RToe.Position,mech,3)
  791. if Hit1 or Hit2 then return 1 end
  792. return 0
  793. end
  794. ----
  795.  
  796. doAfterT = {}
  797. doAfter = function(t,f)
  798. local key = (MRND(-100,100)*MRND(-100,100)).."a"..MRND(-999999,999999)
  799. doAfterT[key] = {Time=t,Func=f,Current=0}
  800. return key
  801. end
  802. doInT = {}
  803. doIn = function(t,f,f2)
  804. local key = (MRND(-100,100)*MRND(-100,100)).."a"..MRND(-999999,999999)
  805. doInT[key] = {Time=t,Func=f,FuncEnd=f2,Current=0}
  806. return key
  807. end
  808.  
  809.  
  810. Motors = {["BaseW"]=BaseW,["Torso1W"]=Torso1W,["Torso2W"]=Torso2W,["LThighW"]=LThighW,["RThighW"]=RThighW,["LLegW"]=LLegW,["RLegW"]=RLegW,["LFootW"]=LFootW,["RFootW"]=RFootW,["LToeW"]=LToeW,["RToeW"]=RToeW,
  811. ["LShoulderW"]=LShoulderW,["RShoulderW"]=RShoulderW,["LElbowW"]=LElbowW,["RElbowW"]=RElbowW,["HatchW"]=HatchW,["SeatW"]=SeatW}
  812.  
  813. print(#mech:getChildren().." Parts")
  814. _G.mech = mech
  815. _G.RMM2 = getfenv()
  816. _G.m = _G.RMM2
  817.  
  818. gw = function()
  819. print(" ")
  820. for i,weldn in pairs{"LThighW","LLegW","LFootW","LToeW","RThighW","RLegW","RFootW","RToeW","LShoulderW","LElbowW","RShoulderW","RElbowW","BaseW","Torso1W","Torso2W","HatchW","SeatW"} do
  821. weld = getfenv()[weldn]
  822. local a,b,c = weld.C0:toEulerAnglesXYZ()
  823. local d,e,f = weld.C1:toEulerAnglesXYZ()
  824. inde = function(n)
  825. n = math.floor(n*1000+0.5)/1000
  826. return string.rep(" ",5-#(""..n))..n
  827. end
  828. --print(weldn..".C0 = CF("..inde(weld.C0.x)..","..inde(weld.C0.y)..","..inde(weld.C0.z)..")*CFA("..inde(MD(a))..","..inde(MD(b))..","..inde(MD(c))..")")
  829. print(" addAnim("..weldn..string.rep(" ",10-#weldn)..",1,t,nil,{"..inde(weld.C1.x)..","..inde(weld.C1.y)..","..inde(weld.C1.z)..","..inde(MD(d))..","..inde(MD(e))..","..inde(MD(f)).."})")
  830. end
  831. print(" ")
  832. end
  833. gwBool = newI{"BoolValue",mech,Name="GetWelds"}
  834. gwBool.Changed:connect(function()
  835. if not gwBool.Value then return end
  836. gwBool.Value=false
  837. gw()
  838. end)
  839. gw2 = function()
  840. print(" ")
  841. for i,weldn in pairs{"LS","RS","LH","RH"} do
  842. weld = getfenv()[weldn]
  843. local a,b,c = weld.C0:toEulerAnglesXYZ()
  844. local d,e,f = weld.C1:toEulerAnglesXYZ()
  845. inde = function(n)
  846. n = math.floor(n*1000+0.5)/1000
  847. return string.rep(" ",5-#(""..n))..n
  848. end
  849. print(" addAnim("..weldn..string.rep(" ",10-#weldn)..",0,t,nil,{"..inde(weld.C0.x)..","..inde(weld.C0.y)..","..inde(weld.C0.z)..","..inde(MD(a))..","..inde(MD(b))..","..inde(MD(c)).."})")
  850. print(" addAnim("..weldn..string.rep(" ",10-#weldn)..",1,t,nil,{"..inde(weld.C1.x)..","..inde(weld.C1.y)..","..inde(weld.C1.z)..","..inde(MD(d))..","..inde(MD(e))..","..inde(MD(f)).."})")
  851. end
  852. print(" ")
  853. end
  854. ------
  855. Anims = {} -- {WELD,C0or1,Time,CFStart,CFEnd,Current}
  856. addAnim = function(weld,C0or1,Time,CFStart,CFEnd)
  857. if not weld then return end
  858. local CC = "C"..C0or1
  859. if not CFStart then
  860. local a,b,c = weld[CC]:toEulerAnglesXYZ()
  861. CFStart = {weld[CC].x,weld[CC].y,weld[CC].z,MD(a),MD(b),MD(c)}
  862. end
  863. if not CFEnd[1] and not CFEnd[2] and not CFEnd[3] then
  864. CFEnd[1] = weld[CC].x
  865. CFEnd[2] = weld[CC].y
  866. CFEnd[3] = weld[CC].z
  867. end
  868. Anims[weld.Name..CC] = {weld=weld,CC="C"..C0or1,CFStart=CFStart,CFEnd=CFEnd,Time=Time,Current=0}
  869. end
  870. --
  871. WalkKey = {}
  872. loadAnim = {} _G.la = loadAnim
  873. --
  874. ClearWalk = function()
  875. for i,v in pairs(WalkKey) do
  876. doAfterT[i] = nil
  877. WalkKey[i] = nil
  878. end
  879. end
  880. --
  881. loadAnim.Open = function(a,t)
  882. t = t or 1.5
  883. addAnim(LThighW ,1,t,nil,{nil,nil,nil, -75, 0, 0})
  884. addAnim(LLegW ,1,t,nil,{nil,nil,nil, 155, 0, 0})
  885. addAnim(LFootW ,1,t,nil,{nil,nil,nil, -80, 0, 0})
  886. addAnim(LToeW ,1,t,nil,{nil,nil,nil, 0, 0, 0})
  887. addAnim(RThighW ,1,t,nil,{nil,nil,nil, -75, 0, 0})
  888. addAnim(RLegW ,1,t,nil,{nil,nil,nil, 155, 0, 0})
  889. addAnim(RFootW ,1,t,nil,{nil,nil,nil, -80, 0, 0})
  890. addAnim(RToeW ,1,t,nil,{nil,nil,nil, 0, 0, 0})
  891. addAnim(LShoulderW,1,t,nil,{nil,nil,nil, 20, 0, 8})
  892. addAnim(LElbowW ,1,t,nil,{nil,nil,nil, -90, 0, 0})
  893. addAnim(RShoulderW,1,t,nil,{nil,nil,nil, -20, 0, -8})
  894. addAnim(RElbowW ,1,t,nil,{nil,nil,nil, -60, 0, 0})
  895. addAnim(BaseW ,1,t,nil,{ 0,10.2-10.2, 0, 0, 0, 0})
  896. addAnim(Torso1W ,1,t,nil,{nil,nil,nil, 0, 0, 0})
  897. addAnim(Torso2W ,1,t,nil,{nil,nil,nil, 0, 0, 0})
  898. addAnim(HatchW ,1,t,nil,{nil,nil,nil,-180, 0, 0})
  899. addAnim(SeatW ,0,t,nil,{-0.6,8.5, 5, 0, 180, 0})
  900. doAfter(t,function() addAnim(SeatW ,0,t*0.5,nil,{ 0, -1, 5.3, 0, 180, 0}) end)
  901. end
  902. loadAnim.Close = function(a,t)
  903. addAnim(SeatW ,0,t*0.5,nil,{ -0.6, 8.5, 5, 0, 180, 0})
  904. doAfter(t*0.5,function() loadAnim:Standing(1) end)
  905. end
  906. loadAnim.Standing = function(a,t)
  907. t = t or 1
  908. addAnim(LThighW ,1,t,nil,{ 1.5, 0.5, 0, -25, 0, 0})
  909. addAnim(LLegW ,1,t,nil,{ 0, 0, 0, 75, 0, 0})
  910. addAnim(LFootW ,1,t,nil,{ 0, 0, 0, 10, 0, 0})
  911. addAnim(LToeW ,1,t,nil,{ 0, 0, 0, -60, 0, 0})
  912. addAnim(RThighW ,1,t,nil,{ -1.5, 0.5, 0, -25, 0, 0})
  913. addAnim(RLegW ,1,t,nil,{ 0, 0, 0, 75, 0, 0})
  914. addAnim(RFootW ,1,t,nil,{ 0, 0, 0, 10, 0, 0})
  915. addAnim(RToeW ,1,t,nil,{ 0, 0, 0, -60, 0, 0})
  916. addAnim(LShoulderW,1,t,nil,{ 0, 0, 0, 30, 0, 8})
  917. addAnim(LElbowW ,1,t,nil,{ 0, 0, 0, -90, 0, 0})
  918. addAnim(RShoulderW,1,t,nil,{ 0, 0, 0, 30, 0, -8})
  919. addAnim(RElbowW ,1,t,nil,{ 0, 0, 0, -100, 0, 0})
  920. addAnim(BaseW ,1,t,nil,{ 0, 0, 0, 0, 0, 0})
  921. addAnim(Torso1W ,1,t,nil,{ 0, 0, 0, 0, 0, 0})
  922. addAnim(Torso2W ,1,t,nil,{ 0, 0, 0, 0, 0, 0})
  923. addAnim(HatchW ,1,t,nil,{ 0, -3, -0.1, -20, 0, 0})
  924. addAnim(SeatW ,0,t,nil,{ 0, 8.5, 0, 0, 0, 0})
  925. end
  926. loadAnim.ReturnLeg = function(a,t)
  927. t = t or 0.5
  928. addAnim(LThighW ,1,t,nil,{ 1.5, 0.5, 0, -25, 0, 0})
  929. addAnim(LLegW ,1,t,nil,{ 0, 0, 0, 75, 0, 0})
  930. addAnim(LFootW ,1,t,nil,{ 0, 0, 0, 10, 0, 0})
  931. addAnim(LToeW ,1,t,nil,{ 0, 0, 0, -60, 0, 0})
  932. addAnim(RThighW ,1,t,nil,{ -1.5, 0.5, 0, -25, 0, 0})
  933. addAnim(RLegW ,1,t,nil,{ 0, 0, 0, 75, 0, 0})
  934. addAnim(RFootW ,1,t,nil,{ 0, 0, 0, 10, 0, 0})
  935. addAnim(RToeW ,1,t,nil,{ 0, 0, 0, -60, 0, 0})
  936. end
  937. loadAnim.ReturnArm = function(a,t)
  938. t = t or 0.5
  939. addAnim(LShoulderW,1,t,nil,{ 0, 0, 0, 30, 0, 8})
  940. addAnim(LElbowW ,1,t,nil,{ 0, 0, 0, -90, 0, 0})
  941. addAnim(RShoulderW,1,t,nil,{ 0, 0, 0, 30, 0, -8})
  942. addAnim(RElbowW ,1,t,nil,{ 0, 0, 0, -100, 0, 0})
  943. end
  944. loadAnim.WalkL = function(a,t)
  945. local WalkSpeed = 0.3
  946. local tu = Turn==0 and 0 or (Turn<0 and 45 or -45)
  947. addAnim(LThighW ,1,WalkSpeed ,nil,{ nil, nil, nil, -65, tu, 0})
  948. addAnim(LLegW ,1,WalkSpeed ,nil,{ 0, 0, 0, 115, 0, 0})
  949. addAnim(LFootW ,1,WalkSpeed ,nil,{ 0, 0, 0, -20, 0, 0})
  950. addAnim(LToeW ,1,WalkSpeed ,nil,{ 0, 0, 0, -30, 0, 0})
  951. addAnim(RThighW ,1,WalkSpeed*2,nil,{ nil, nil, nil, 15, tu, 0})
  952. addAnim(RLegW ,1,WalkSpeed*2,nil,{ 0, 0, 0, 35, 0, 0})
  953. addAnim(RFootW ,1,WalkSpeed*2,nil,{ 0, 0, 0, 30, 0, 0})
  954. addAnim(RToeW ,1,WalkSpeed*2,nil,{ 0, 0, 0, -80, 0, 0})
  955. wkey = doAfter(WalkSpeed,function()
  956. addAnim(LThighW ,1,WalkSpeed,nil,{ nil, nil, nil, -45, tu, 0})
  957. addAnim(LLegW ,1,WalkSpeed,nil,{ 0, 0, 0, 35, 0, 0})
  958. addAnim(LFootW ,1,WalkSpeed,nil,{ 0, 0, 0, 60, 0, 0})
  959. addAnim(LToeW ,1,WalkSpeed,nil,{ 0, 0, 0, -50, 0, 0})
  960. end)
  961. WalkKey[wkey] = true
  962. wkey = doAfter(WalkSpeed*2,function()
  963. addAnim(LThighW ,1,WalkSpeed,nil,{ nil, nil, nil, -20, tu, 0})
  964. addAnim(LLegW ,1,WalkSpeed,nil,{ 0, 0, 0, 65, 0, 0})
  965. addAnim(LFootW ,1,WalkSpeed,nil,{ 0, 0, 0, 10, 0, 0})
  966. addAnim(LToeW ,1,WalkSpeed,nil,{ 0, 0, 0, -50, 0, 0})
  967. addAnim(RThighW ,1,WalkSpeed,nil,{ nil, nil, nil, -35, tu, 0})
  968. addAnim(RLegW ,1,WalkSpeed,nil,{ 0, 0, 0, 105, 0, 0})
  969. addAnim(RFootW ,1,WalkSpeed,nil,{ 0, 0, 0, 40, 0, 0})
  970. addAnim(RToeW ,1,WalkSpeed,nil,{ 0, 0, 0, -40, 0, 0})
  971. end)
  972. WalkKey[wkey] = true
  973. end
  974. loadAnim.WalkR = function(a,t)
  975. local WalkSpeed = 0.3
  976. local tu = Turn==0 and 0 or (Turn<0 and 45 or -45)
  977. addAnim(LThighW ,1,WalkSpeed*2,nil,{ nil, nil, nil, 15, tu, 0})
  978. addAnim(LLegW ,1,WalkSpeed*2,nil,{ 0, 0, 0, 35, 0, 0})
  979. addAnim(LFootW ,1,WalkSpeed*2,nil,{ 0, 0, 0, 30, 0, 0})
  980. addAnim(LToeW ,1,WalkSpeed*2,nil,{ 0, 0, 0, -80, 0, 0})
  981. addAnim(RThighW ,1,WalkSpeed ,nil,{ nil, nil, nil, -65, tu, 0})
  982. addAnim(RLegW ,1,WalkSpeed ,nil,{ 0, 0, 0, 115, 0, 0})
  983. addAnim(RFootW ,1,WalkSpeed ,nil,{ 0, 0, 0, -20, 0, 0})
  984. addAnim(RToeW ,1,WalkSpeed ,nil,{ 0, 0, 0, -30, 0, 0})
  985. wkey = doAfter(WalkSpeed,function()
  986. addAnim(RThighW ,1,WalkSpeed,nil,{ nil, nil, nil, -45, tu, 0})
  987. addAnim(RLegW ,1,WalkSpeed,nil,{ 0, 0, 0, 35, 0, 0})
  988. addAnim(RFootW ,1,WalkSpeed,nil,{ 0, 0, 0, 60, 0, 0})
  989. addAnim(RToeW ,1,WalkSpeed,nil,{ 0, 0, 0, -50, 0, 0})
  990. end)
  991. WalkKey[wkey] = true
  992. wkey = doAfter(WalkSpeed*2,function()
  993. addAnim(LThighW ,1,WalkSpeed,nil,{ nil, nil, nil, -35, tu, 0})
  994. addAnim(LLegW ,1,WalkSpeed,nil,{ 0, 0, 0, 105, 0, 0})
  995. addAnim(LFootW ,1,WalkSpeed,nil,{ 0, 0, 0, 40, 0, 0})
  996. addAnim(LToeW ,1,WalkSpeed,nil,{ 0, 0, 0, -40, 0, 0})
  997. addAnim(RThighW ,1,WalkSpeed,nil,{ nil, nil, nil, -20, tu, 0})
  998. addAnim(RLegW ,1,WalkSpeed,nil,{ 0, 0, 0, 65, 0, 0})
  999. addAnim(RFootW ,1,WalkSpeed,nil,{ 0, 0, 0, 10, 0, 0})
  1000. addAnim(RToeW ,1,WalkSpeed,nil,{ 0, 0, 0, -50, 0, 0})
  1001. end)
  1002. WalkKey[wkey] = true
  1003. end
  1004. loadAnim.Walk2L = function(a,t)
  1005. local WalkSpeed = 0.4
  1006. local tu = Turn==0 and 0 or (Turn<0 and 45 or -45)
  1007. addAnim(LThighW ,1,WalkSpeed ,nil,{ nil, nil, nil, -15, tu, 0})
  1008. addAnim(LLegW ,1,WalkSpeed ,nil,{ 0, 0, 0, 105, 0, 0})
  1009. addAnim(LFootW ,1,WalkSpeed ,nil,{ 0, 0, 0,24.286, 0, 0})
  1010. addAnim(LToeW ,1,WalkSpeed ,nil,{ 0, 0, 0,-74.286, 0, 0})
  1011. addAnim(RThighW ,1,WalkSpeed*2,nil,{ nil, nil, nil, -45, tu, 0})
  1012. addAnim(RLegW ,1,WalkSpeed*2,nil,{ 0, 0, 0, 45, 0, 0})
  1013. addAnim(RFootW ,1,WalkSpeed*2,nil,{ 0, 0, 0, 50, 0, 0})
  1014. addAnim(RToeW ,1,WalkSpeed*2,nil,{ 0, 0, 0, -50, 0, 0})
  1015. wkey = doAfter(WalkSpeed,function()
  1016. addAnim(LThighW ,1,WalkSpeed,nil,{ nil, nil, nil, 15, tu, 0})
  1017. addAnim(LLegW ,1,WalkSpeed,nil,{ 0, 0, 0, 35, 0, 0})
  1018. addAnim(LFootW ,1,WalkSpeed,nil,{ 0, 0, 0, 30, 0, 0})
  1019. addAnim(LToeW ,1,WalkSpeed,nil,{ 0, 0, 0, -80, 0, 0})
  1020. end)
  1021. WalkKey[wkey] = true
  1022. end
  1023. loadAnim.Walk2R = function(a,t)
  1024. local WalkSpeed = 0.4
  1025. local tu = Turn==0 and 0 or (Turn<0 and 45 or -45)
  1026. addAnim(LThighW ,1,WalkSpeed*2,nil,{ nil, nil, nil, -45, tu, 0})
  1027. addAnim(LLegW ,1,WalkSpeed*2,nil,{ 0, 0, 0, 45, 0, 0})
  1028. addAnim(LFootW ,1,WalkSpeed*2,nil,{ 0, 0, 0, 50, 0, 0})
  1029. addAnim(LToeW ,1,WalkSpeed*2,nil,{ 0, 0, 0, -50, 0, 0})
  1030. addAnim(RThighW ,1,WalkSpeed ,nil,{ nil, nil, nil, -15, tu, 0})
  1031. addAnim(RLegW ,1,WalkSpeed ,nil,{ 0, 0, 0, 105, 0, 0})
  1032. addAnim(RFootW ,1,WalkSpeed ,nil,{ 0, 0, 0,24.286, 0, 0})
  1033. addAnim(RToeW ,1,WalkSpeed ,nil,{ 0, 0, 0,-74.286, 0, 0})
  1034. wkey = doAfter(WalkSpeed,function()
  1035. addAnim(RThighW ,1,WalkSpeed,nil,{ nil, nil, nil, 15, tu, 0})
  1036. addAnim(RLegW ,1,WalkSpeed,nil,{ 0, 0, 0, 35, 0, 0})
  1037. addAnim(RFootW ,1,WalkSpeed,nil,{ 0, 0, 0, 30, 0, 0})
  1038. addAnim(RToeW ,1,WalkSpeed,nil,{ 0, 0, 0, -80, 0, 0})
  1039. end)
  1040. WalkKey[wkey] = true
  1041. end
  1042. loadAnim.RunL = function(a,t)
  1043. local WalkSpeed = 0.24
  1044. addAnim(LThighW ,1,WalkSpeed ,nil,{ nil, nil, nil, -105, 0, 0})
  1045. addAnim(LLegW ,1,WalkSpeed ,nil,{ 0, 0, 0, 115, 0, 0})
  1046. addAnim(LFootW ,1,WalkSpeed ,nil,{ 0, 0, 0, 10, 0, 0})
  1047. addAnim(LToeW ,1,WalkSpeed ,nil,{ 0, 0, 0, -40, 0, 0})
  1048. addAnim(RThighW ,1,WalkSpeed*1.5,nil,{ nil, nil, nil, 50, 0, 0})
  1049. addAnim(RLegW ,1,WalkSpeed*1.5,nil,{ 0, 0, 0, 5, 0, 0})
  1050. addAnim(RFootW ,1,WalkSpeed*1.5,nil,{ 0, 0, 0, 10, 0, 0})
  1051. addAnim(RToeW ,1,WalkSpeed*1.5,nil,{ 0, 0, 0, -65, 0, 0})
  1052. wkey = doAfter(WalkSpeed,function()
  1053. WalkSpeed = 0.12
  1054. addAnim(LThighW ,1,WalkSpeed,nil,{ nil, nil, nil, -75, 0, 0})
  1055. addAnim(LLegW ,1,WalkSpeed,nil,{ 0, 0, 0, 75, 0, 0})
  1056. addAnim(LFootW ,1,WalkSpeed,nil,{ 0, 0, 0, 40, 0, 0})
  1057. addAnim(LToeW ,1,WalkSpeed,nil,{ 0, 0, 0, -40, 0, 0})
  1058. end)
  1059. WalkKey[wkey] = true
  1060. end
  1061. loadAnim.RunR = function(a,t)
  1062. local WalkSpeed = 0.24
  1063. addAnim(LThighW ,1,WalkSpeed*1.5,nil,{ nil, nil, nil, 50, 0, 0})
  1064. addAnim(LLegW ,1,WalkSpeed*1.5,nil,{ 0, 0, 0, 5, 0, 0})
  1065. addAnim(LFootW ,1,WalkSpeed*1.5,nil,{ 0, 0, 0, 10, 0, 0})
  1066. addAnim(LToeW ,1,WalkSpeed*1.5,nil,{ 0, 0, 0, -65, 0, 0})
  1067. addAnim(RThighW ,1,WalkSpeed ,nil,{ nil, nil, nil, -105, 0, 0})
  1068. addAnim(RLegW ,1,WalkSpeed ,nil,{ 0, 0, 0, 115, 0, 0})
  1069. addAnim(RFootW ,1,WalkSpeed ,nil,{ 0, 0, 0, 10, 0, 0})
  1070. addAnim(RToeW ,1,WalkSpeed ,nil,{ 0, 0, 0, -30, 0, 0})
  1071. wkey = doAfter(WalkSpeed,function()
  1072. WalkSpeed = 0.12
  1073. addAnim(RThighW ,1,WalkSpeed,nil,{ nil, nil, nil, -75, 0, 0})
  1074. addAnim(RLegW ,1,WalkSpeed,nil,{ 0, 0, 0, 75, 0, 0})
  1075. addAnim(RFootW ,1,WalkSpeed,nil,{ 0, 0, 0, 40, 0, 0})
  1076. addAnim(RToeW ,1,WalkSpeed,nil,{ 0, 0, 0, -30, 0, 0})
  1077. end)
  1078. WalkKey[wkey] = true
  1079. end
  1080. loadAnim.Jump = function(a,t)
  1081. local t = 0.4
  1082. addAnim(LThighW ,1,t,nil,{ 1.5, 0.5, 0,-74.779,-9.656,2.613})
  1083. addAnim(LLegW ,1,t,nil,{ 0, 0, 0, 155, 0, 0})
  1084. addAnim(LFootW ,1,t,nil,{ 0, 0, 0, -80, 0, 0})
  1085. addAnim(LToeW ,1,t,nil,{ 0, 0, 0, 0, 0, 0})
  1086. addAnim(RThighW ,1,t,nil,{ -1.5, 0.5, 0,-84.923,9.962,-0.88})
  1087. addAnim(RLegW ,1,t,nil,{ 0, 0, 0, 155, 0, 0})
  1088. addAnim(RFootW ,1,t,nil,{ 0, 0, 0, -70, 0, 0})
  1089. addAnim(RToeW ,1,t,nil,{ 0, 0, 0, 0, 0, 0})
  1090. addAnim(LShoulderW,1,t,nil,{ 0, 0, 0, 10, 0, 8})
  1091. addAnim(LElbowW ,1,t,nil,{ 0, 0, 0, -110, 0, 0})
  1092. addAnim(RShoulderW,1,t,nil,{ 0, 0, 0, 30, 0, -8})
  1093. addAnim(RElbowW ,1,t,nil,{ 0, 0, 0, -130, 0, 0})
  1094. addAnim(Torso1W ,1,t,nil,{ 0, 0, 0, 20, 0, 0})
  1095. doAfter(t,function()
  1096. local t = 0.2
  1097. addAnim(LThighW ,1,t,nil,{ 1.5, 0.5, 0,-15.455,-19.312,-0.077})
  1098. addAnim(LLegW ,1,t,nil,{ 0, 0, 0, 85, 0, 0})
  1099. addAnim(LFootW ,1,t,nil,{ 0, 0, 0, -10, 0, 0})
  1100. addAnim(LToeW ,1,t,nil,{ 0, 0, 0, -30, 0, 0})
  1101. addAnim(RThighW ,1,t,nil,{ -1.5, 0.5, 0,-14.923,9.962,-0.88})
  1102. addAnim(RLegW ,1,t,nil,{ 0, 0, 0, 85, 0, 0})
  1103. addAnim(RFootW ,1,t,nil,{ 0, 0, 0, -10, 0, 0})
  1104. addAnim(RToeW ,1,t,nil,{ 0, 0, 0, -30, 0, 0})
  1105. addAnim(Torso1W ,1,t,nil,{ 0, 0, 0, 0, 0, 0})
  1106. end)
  1107. end
  1108. Base.CanCollide=false
  1109. --------------------------------------------------------------------------
  1110. Player = Players.LocalPlayer
  1111. if not Player then print'not found' mech:MoveTo(V3(0,0,0)) return end
  1112. Hum = newI{"Humanoid",mech} Hum.PlatformStand=true
  1113. Char = Player.Character
  1114. CTorso = Char.Torso
  1115. CHRP = Char.HumanoidRootPart
  1116. LS = CTorso:findFirstChild'Left Shoulder'
  1117. RS = CTorso:findFirstChild'Right Shoulder'
  1118. LH = CTorso:findFirstChild'Left Hip'
  1119. RH = CTorso:findFirstChild'Right Hip'
  1120.  
  1121. if Char:findFirstChild(mech.Name) then Char[mech.Name]:Destroy() end
  1122. mech.Parent = Char
  1123. Base.Name="HRP"
  1124. ------
  1125. Pilot = nil
  1126. Anim = "Opening"
  1127. AnimLegs = true --use leg pose
  1128. AnimArms = true --use arm pose
  1129. AnimTorso = true --use torso pose
  1130. WalkDir = 0
  1131. ------
  1132. SeatWeld = nil
  1133. Seat.ChildAdded:connect(function(weld)
  1134. SeatWeld = weld
  1135. Pilot = weld.Part1==CHRP and CHRP or nil
  1136. pcall(function()
  1137. weld.C1 = CF(0,-1.5,0.25)*CFA(-95,0,0)
  1138. LS2 = weld.Part1.Parent.Torso:findFirstChild'Left Shoulder' LS2.Parent = nil
  1139. RS2 = weld.Part1.Parent.Torso:findFirstChild'Right Shoulder' RS2.Parent = nil
  1140. LH2 = weld.Part1.Parent.Torso:findFirstChild'Left Hip' LH2.Parent = nil
  1141. RH2 = weld.Part1.Parent.Torso:findFirstChild'Right Hip' RH2.Parent = nil
  1142. LS1 = newI{"Weld",weld.Part1.Parent.Torso,Part0=weld.Part1.Parent.Torso,Part1=weld.Part1.Parent:findFirstChild'Left Arm' ,Name="RM1"}
  1143. RS1 = newI{"Weld",weld.Part1.Parent.Torso,Part0=weld.Part1.Parent.Torso,Part1=weld.Part1.Parent:findFirstChild'Right Arm',Name="RM2"}
  1144. LH1 = newI{"Weld",weld.Part1.Parent.Torso,Part0=weld.Part1.Parent.Torso,Part1=weld.Part1.Parent:findFirstChild'Left Leg' ,Name="RM3"}
  1145. RH1 = newI{"Weld",weld.Part1.Parent.Torso,Part0=weld.Part1.Parent.Torso,Part1=weld.Part1.Parent:findFirstChild'Right Leg',Name="RM4"}
  1146. LS1.C0 = CF(-1.2,0.5,-0.5)*CFA(0,0,0)
  1147. LS1.C1 = CF( 0,0.5,0)*CFA(-80,-10,10)
  1148. RS1.C0 = CF( 1.2,0.5,-0.5)*CFA(0,0,0)
  1149. RS1.C1 = CF( 0,0.5,0)*CFA(-80, 10,-10)
  1150. LH1.C0 = CF(-0.5, -1,-0.3)*CFA(0,0,0)
  1151. LH1.C1 = CF( 0, 1,0)*CFA(-45,0, 5)
  1152. RH1.C0 = CF( 0.5, -1,-0.3)*CFA(0,0,0)
  1153. RH1.C1 = CF( 0, 1,0)*CFA(-45,0,-5)
  1154. end)
  1155. end)
  1156. Seat.ChildRemoved:connect(function(weld)
  1157. pcall(function()
  1158. local mm = weld.Part1.Parent
  1159. for i=1,4 do
  1160. mm.Torso["RM"..i]:Destroy()
  1161. end
  1162. LS2.Parent = mm.Torso
  1163. LS2.Part0 = mm.Torso
  1164. LS2.Part1 = mm["Left Arm"]
  1165. RS2.Parent = mm.Torso
  1166. RS2.Part0 = mm.Torso
  1167. RS2.Part1 = mm["Right Arm"]
  1168. LH2.Parent = mm.Torso
  1169. LH2.Part0 = mm.Torso
  1170. LH2.Part1 = mm["Left Leg"]
  1171. RH2.Parent = mm.Torso
  1172. RH2.Part0 = mm.Torso
  1173. RH2.Part1 = mm["Right Leg"]
  1174. end)
  1175. Pilot = nil
  1176. end)
  1177. ------
  1178. Gyro = newI{"BodyGyro",Base,cframe=Base.CFrame,maxTorque=V3(5000000,5000000,5000000),P=15000}
  1179. WeightForce = newI{"BodyForce",Base,Force=V3(0,-1000000,0)}
  1180. Turn = 0
  1181. Velo = newI{"BodyVelocity",Base,maxForce=V3N}
  1182. veloym = 0
  1183. veloy = 0
  1184. ------
  1185. function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size)
  1186. local fp=Instance.new("Part")
  1187. fp.formFactor=formfactor
  1188. fp.Parent=parent
  1189. fp.Reflectance=reflectance
  1190. fp.Transparency=transparency
  1191. fp.CanCollide=false
  1192. fp.Locked=true
  1193. fp.BrickColor=BrickColor.new(tostring(brickcolor))
  1194. fp.Name=name
  1195. fp.Size=size
  1196. fp.Material=material
  1197. fp:BreakJoints()
  1198. return fp
  1199. end
  1200. Damagefunc=function(Part,hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock)
  1201. if hit.Parent==nil then
  1202. return
  1203. end
  1204. local h=hit.Parent:FindFirstChild("Humanoid")
  1205. for _,v in pairs(hit.Parent:children()) do
  1206. if v:IsA("Humanoid") then
  1207. h=v
  1208. end
  1209. end
  1210. if hit.Parent.Parent:FindFirstChild("Torso")~=nil then
  1211. h=hit.Parent.Parent:FindFirstChild("Humanoid")
  1212. end
  1213. if hit.Parent.className=="Hat" then
  1214. hit=hit.Parent.Parent:findFirstChild("Head")
  1215. end
  1216. if h~=nil and hit.Parent.Name~=Char.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  1217. if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end
  1218. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  1219. return
  1220. end]]
  1221. -- hs(hit,1.2)
  1222. local c=Instance.new("ObjectValue")
  1223. c.Name="creator"
  1224. c.Value=game:service("Players").LocalPlayer
  1225. c.Parent=h
  1226. game:GetService("Debris"):AddItem(c,.5)
  1227. local Damage=math.random(minim,maxim)
  1228. -- h:TakeDamage(Damage)
  1229. local blocked=false
  1230. local block=hit.Parent:findFirstChild("Block")
  1231. if block~=nil then
  1232. print(block.className)
  1233. if block.className=="NumberValue" then
  1234. if block.Value>0 then
  1235. blocked=true
  1236. if decreaseblock==nil then
  1237. block.Value=block.Value-1
  1238. end
  1239. end
  1240. end
  1241. if block.className=="IntValue" then
  1242. if block.Value>0 then
  1243. blocked=true
  1244. if decreaseblock~=nil then
  1245. block.Value=block.Value-1
  1246. end
  1247. end
  1248. end
  1249. end
  1250. if blocked==false then
  1251. -- h:TakeDamage(Damage)
  1252. h.Health=h.Health-Damage
  1253. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, Part.BrickColor.Color)
  1254. else
  1255. h.Health=h.Health-(Damage/2)
  1256. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Bright blue").Color)
  1257. end
  1258. if Type=="Knockdown" then
  1259. local hum=hit.Parent.Humanoid
  1260. hum.PlatformStand=true
  1261. coroutine.resume(coroutine.create(function(HHumanoid)
  1262. swait(1)
  1263. HHumanoid.PlatformStand=false
  1264. end),hum)
  1265. local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit
  1266. --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  1267. local bodvol=Instance.new("BodyVelocity")
  1268. bodvol.velocity=angle*knockback
  1269. bodvol.P=5000
  1270. bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1271. bodvol.Parent=hit
  1272. local rl=Instance.new("BodyAngularVelocity")
  1273. rl.P=3000
  1274. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1275. rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10))
  1276. rl.Parent=hit
  1277. game:GetService("Debris"):AddItem(bodvol,.5)
  1278. game:GetService("Debris"):AddItem(rl,.5)
  1279. elseif Type=="Normal" then
  1280. local vp=Instance.new("BodyVelocity")
  1281. vp.P=500
  1282. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  1283. -- vp.velocity=Char.Torso.CFrame.lookVector*Knockback
  1284. if KnockbackType==1 then
  1285. vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05
  1286. elseif KnockbackType==2 then
  1287. vp.velocity=Property.CFrame.lookVector*knockback
  1288. end
  1289. if knockback>0 then
  1290. vp.Parent=hit.Parent.Torso
  1291. end
  1292. game:GetService("Debris"):AddItem(vp,.5)
  1293. elseif Type=="Up" then
  1294. local bodyVelocity=Instance.new("BodyVelocity")
  1295. bodyVelocity.velocity=V3(0,60,0)
  1296. bodyVelocity.P=5000
  1297. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1298. bodyVelocity.Parent=hit
  1299. game:GetService("Debris"):AddItem(bodyVelocity,1)
  1300. local rl=Instance.new("BodyAngularVelocity")
  1301. rl.P=3000
  1302. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1303. rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30))
  1304. rl.Parent=hit
  1305. game:GetService("Debris"):AddItem(rl,.5)
  1306. elseif Type=="Snare" then
  1307. local bp=Instance.new("BodyPosition")
  1308. bp.P=2000
  1309. bp.D=100
  1310. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1311. bp.position=hit.Parent.Torso.Position
  1312. bp.Parent=hit.Parent.Torso
  1313. game:GetService("Debris"):AddItem(bp,1)
  1314. elseif Type=="Target" then
  1315. local Targetting = false
  1316. if Targetting==false then
  1317. ZTarget=hit.Parent.Torso
  1318. coroutine.resume(coroutine.create(function(Part)
  1319. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  1320. swait(5)
  1321. so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5)
  1322. end),ZTarget)
  1323. local TargHum=ZTarget.Parent:findFirstChild("Humanoid")
  1324. local targetgui=Instance.new("BillboardGui")
  1325. targetgui.Parent=ZTarget
  1326. targetgui.Size=UDim2.new(10,100,10,100)
  1327. local targ=Instance.new("ImageLabel")
  1328. targ.Parent=targetgui
  1329. targ.BackgroundTransparency=1
  1330. targ.Image="rbxassetid://4834067"
  1331. targ.Size=UDim2.new(1,0,1,0)
  1332. cam.CameraType="Scriptable"
  1333. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  1334. local dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  1335. workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  1336. Targetting=true
  1337. RocketTarget=ZTarget
  1338. for i=1,Property do
  1339. --while Targetting==true and Humanoid.Health>0 and Char.Parent~=nil do
  1340. if Humanoid.Health>0 and Char.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then
  1341. swait()
  1342. end
  1343. --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100)
  1344. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)
  1345. dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z)
  1346. cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0)
  1347. end
  1348. Targetting=false
  1349. RocketTarget=nil
  1350. targetgui.Parent=nil
  1351. cam.CameraType="Custom"
  1352. end
  1353. end
  1354. local debounce=Instance.new("BoolValue")
  1355. debounce.Name="DebounceHit"
  1356. debounce.Parent=hit.Parent
  1357. debounce.Value=true
  1358. game:GetService("Debris"):AddItem(debounce,Delay)
  1359. c=Instance.new("ObjectValue")
  1360. c.Name="creator"
  1361. c.Value=Player
  1362. c.Parent=h
  1363. game:GetService("Debris"):AddItem(c,.5)
  1364. end
  1365. end
  1366.  
  1367.  
  1368. function ShowDamage(Pos, Text, Time, Color)
  1369. local Rate = (1 / 30)
  1370. local Pos = (Pos or Vector3.new(0, 0, 0))
  1371. local Text = (Text or "")
  1372. local Time = (Time or 2)
  1373. local Color = (Color or Color3.new(1, 0, 0))
  1374. local EffectPart = part("Custom",workspace,"SmoothPlastic",0,1,BrickColor.new(Color),"Effect",V3(0,0,0))
  1375. EffectPart.Anchored = true
  1376. local BillboardGui = Instance.new("BillboardGui")
  1377. BillboardGui.Size = UDim2.new(3, 0, 3, 0)
  1378. BillboardGui.Adornee = EffectPart
  1379. local TextLabel = Instance.new("TextLabel")
  1380. TextLabel.BackgroundTransparency = 1
  1381. TextLabel.Size = UDim2.new(1, 0, 1, 0)
  1382. TextLabel.Text = Text
  1383. TextLabel.TextColor3 = Color
  1384. TextLabel.TextScaled = true
  1385. TextLabel.Font = Enum.Font.ArialBold
  1386. TextLabel.Parent = BillboardGui
  1387. BillboardGui.Parent = EffectPart
  1388. game.Debris:AddItem(EffectPart, (Time + 0.1))
  1389. EffectPart.Parent = game:GetService("Workspace")
  1390. Delay(0, function()
  1391. local Frames = (Time / Rate)
  1392. for Frame = 1, Frames do
  1393. wait(Rate)
  1394. local Percent = (Frame / Frames)
  1395. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  1396. TextLabel.TextTransparency = Percent
  1397. end
  1398. if EffectPart and EffectPart.Parent then
  1399. EffectPart:Destroy()
  1400. end
  1401. end)
  1402. end
  1403.  
  1404. function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  1405. local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  1406. prt.Anchored = true
  1407. prt.CFrame = cframe
  1408. local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1409. game:GetService("Debris"):AddItem(prt, 10)
  1410. if Type == 1 or Type == nil then
  1411. table.insert(Effects, {
  1412. prt,
  1413. "Block1",
  1414. delay,
  1415. x3,
  1416. y3,
  1417. z3,
  1418. msh
  1419. })
  1420. elseif Type == 2 then
  1421. table.insert(Effects, {
  1422. prt,
  1423. "Block2",
  1424. delay,
  1425. x3,
  1426. y3,
  1427. z3,
  1428. msh
  1429. })
  1430. end
  1431. return prt
  1432. end
  1433.  
  1434. function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1435. local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  1436. prt.Anchored = true
  1437. prt.CFrame = cframe
  1438. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1439. game:GetService("Debris"):AddItem(prt, 10)
  1440. table.insert(Effects, {
  1441. prt,
  1442. "Cylinder",
  1443. delay,
  1444. x3,
  1445. y3,
  1446. z3,
  1447. msh
  1448. })
  1449. return prt
  1450. end
  1451.  
  1452. function explode(hitRef)
  1453. local vary=math.random(5, 10)/100
  1454. SphereEffect("Deep orange", hitRef.CFrame, 2, 2, 2, 1, 1, 1, vary)
  1455. BlockEffect("Bright red", hitRef.CFrame, 2, 2, 2, .8, .8, .8, vary, 1)
  1456. end
  1457.  
  1458. Mouse = Player:GetMouse()
  1459. Key = {}
  1460. --[[
  1461. X Open/Close
  1462. C Jump
  1463. WASD Movement
  1464. P Cockpit glass
  1465. --]]
  1466. WalkingSpeed = 16
  1467. onKeyDown = function(k)
  1468. if k=="a" then
  1469. Turn = 10
  1470. elseif k=="d" then
  1471. Turn = -10
  1472. end
  1473. --
  1474. if k=="x" and Anim=="Opened" then
  1475. Anim="Closing"
  1476. AnimLegs,AnimArms,AnimTorso,Movement=false,false,false,false
  1477. loadAnim:Close(2)
  1478. wait(2)
  1479. Anim="None"
  1480. AnimLegs,AnimArms,AnimTorso,Movement=true,true,true,true
  1481. elseif k=="x" and Anim=="None" then
  1482. Anim="Opening"
  1483. ClearWalk()
  1484. AnimLegs,AnimArms,AnimTorso,Movement=false,false,false,false
  1485. loadAnim:Open(2)
  1486. wait(3)
  1487. Anim="Opened"
  1488. elseif (k=="w" or k=="a" or k=="d") and not Key.s and Movement and Pilot and WalkDir~=1 and AnimLegs then
  1489. WalkDir=1
  1490. ClearWalk()
  1491. local whichLeg = -1
  1492. while (Key.w or Key.a or Key.d) and not Key.s and Movement and Pilot do
  1493. loadAnim[(Key["0"] and "Run" or "Walk")..(whichLeg==-1 and "L" or "R")]()
  1494. WalkingSpeed = Key["0"] and 18*4.5 or 18
  1495. whichLeg = whichLeg*-1
  1496. if not AnimLegs then repeat wait() until AnimLegs end
  1497. local duration = (Key["0"] and 0.36 or 0.9)
  1498. for i=duration/8,duration,duration/8 do wait(duration/8) if (Key.w or Key.a or Key.d) and not Key.s and Movement and Pilot then else break end end
  1499. if not AnimLegs then repeat wait() until AnimLegs end
  1500. end
  1501. WalkDir=0
  1502. ClearWalk()
  1503. if Movement and Anim=="None" then
  1504. loadAnim:Standing(0.5)
  1505. end
  1506. elseif k=="s" and not Key.w and Movement and Pilot and AnimLegs then
  1507. WalkDir=-1
  1508. ClearWalk()
  1509. local whichLeg = -1
  1510. while Key.s and not Key.w and Movement and Pilot do
  1511. loadAnim["Walk2"..(whichLeg==-1 and "L" or "R")]()
  1512. whichLeg = whichLeg*-1
  1513. if not AnimLegs then repeat wait() until AnimLegs end
  1514. for i=0.1,0.8,0.1 do wait(0.1) if Key.s and not Key.w and Movement and Pilot then else break end end
  1515. if not AnimLegs then repeat wait() until AnimLegs end
  1516. end
  1517. WalkDir=0
  1518. ClearWalk()
  1519. if Movement and Anim=="None" then
  1520. loadAnim:Standing(0.5)
  1521. end
  1522. elseif k=="c" and Movement and Pilot and AnimLegs and AnimTorso and checkGroundTouch()>0 then
  1523. AnimLegs,AnimArms,AnimTorso=false,false,false
  1524. ClearWalk()
  1525. loadAnim:Jump()
  1526. wait(0.5)
  1527. AnimTorso=true
  1528. AnimArms=true
  1529. veloym = 10000000
  1530. loadAnim:ReturnArm(0.3)
  1531. if Key.c then BackBooster[-1].Enabled = true BackBooster[1].Enabled = true veloy = 100 wait(1) else veloy = 75 wait(0.5) end
  1532. BackBooster[-1].Enabled = false BackBooster[1].Enabled = false
  1533. veloym = 0
  1534. veloy = 0
  1535. AnimLegs=true
  1536. if WalkDir==0 then loadAnim:ReturnLeg() end
  1537. elseif k=="p" and not CockpitGlassD and Pilot then
  1538. CockpitGlassD = true
  1539. if CockpitGlass[1].Transparency==0 then
  1540. doIn(0.7,function(i)
  1541. for x,v in pairs(CockpitGlass) do
  1542. v.Transparency = 0.6*i
  1543. end
  1544. end)
  1545. else
  1546. doIn(0.7,function(i)
  1547. for x,v in pairs(CockpitGlass) do
  1548. v.Transparency = 0.6-0.6*i
  1549. end
  1550. end)
  1551. end
  1552. wait(0.8)
  1553. CockpitGlassD = false
  1554. elseif k =="q" and not LeftGunUse then
  1555. LeftGunUse=true
  1556. if not spinSpeed then spinSpeed=0 end
  1557. for i=1,50 do
  1558. if spinSpeed>40 then spinSpeed=40 end
  1559. LeftGunW.C1=LeftGunW.C1*CFA(0,spinSpeed,0)
  1560. spinSpeed=spinSpeed+0.7
  1561. if i%2==0 then PlaySound(assets.Minigun1,LeftGun,0.4+0.8*spinSpeed/40,1) end
  1562. wait()
  1563. end
  1564. local co=0
  1565. LeftGunSmoke.Enabled=true
  1566. local muzzleFlash = newPart(1,1,1,mech,nil,"Transparent","New Yeller")
  1567. newI{"SpecialMesh",muzzleFlash,MeshType="FileMesh",MeshId=assets.MuzzleFlash,Scale=V3(0.8,3,0.8)}
  1568. local muzzleW = newWeld(LeftGun,LeftGun,muzzleFlash,CF(0,0,0))
  1569. repeat
  1570. co=co+1
  1571. LeftGunW.C1=LeftGunW.C1*CFA(0,spinSpeed,0)
  1572. if co%2==0 then PlaySound(assets.Minigun1,LeftGun,1.2,1) end
  1573. if co%2==0 then
  1574. muzzleFlash.Transparency = 0.5
  1575. PlaySound(assets.Fire1,LeftGun,MRND(600,950)/1000,0.4)
  1576. local bullet = newI{"Part",mech,Name="Bullet",Anchored=true,CanCollide=false,formFactor="Custom",Size=V3(0.5,2,0.5),Debris=10,TopSurface='Smooth',BottomSurface='Smooth'}
  1577. newI{"CylinderMesh",bullet}
  1578. RemoveOutlines(bullet)
  1579. bullet.BrickColor=BrickColor.new("Black")
  1580. local rotRand = MRND(1,3)*120
  1581. bullet.CFrame=LeftGun.CFrame*CF(0,-6+2,0)*CFA(0,rotRand,0)*CF(0,0,-2+0.85)
  1582. addProjectile(bullet.Position,bullet.CFrame*CF(0,-1,0),800,function(hit)print'boom' CreateSound("http://www.roblox.com/asset/?id=318118996",bullet,1,math.random(8,12)/10) Damagefunc(bullet,hit,50,100,0,"Normal",CHRP,.2,1) explode(bullet) bullet.Transparency=1 end,function(cf) bullet.CFrame=cf*CF(0,0,1)*CFA(90,0,0) end,function() bullet:Destroy() end)
  1583. muzzleW.C0 = CF(0,-6-2,0)*CFA(0,rotRand,0)*CF(0,0,-2+0.85)*CFA(180,0,0)
  1584. else
  1585. muzzleFlash.Transparency=1
  1586. end
  1587. wait()
  1588. until not Key.q
  1589. muzzleFlash:Destroy()
  1590. LeftGunSmoke.Enabled=false
  1591. LeftGunUse=false
  1592. for i=50,1,-0.5 do
  1593. if LeftGunUse then break end
  1594. if spinSpeed<0 then spinSpeed=0 end
  1595. LeftGunW.C1=LeftGunW.C1*CFA(0,spinSpeed,0)
  1596. spinSpeed=spinSpeed-0.35
  1597. if i%2==0 then PlaySound(assets.Minigun1,LeftGun,0.4+0.8*spinSpeed/40,1) end
  1598. wait()
  1599. end
  1600. elseif k=="]" then
  1601. Pilot = Char.Torso
  1602. Char.Humanoid.Sit = true
  1603. elseif k=="0" then
  1604. end
  1605. end
  1606. ------
  1607. onKeyUp = function(k)
  1608. if k=="a" and not Key.d then
  1609. Turn = 0
  1610. elseif k=="d" and not Key.a then
  1611. Turn = 0
  1612. end
  1613. end
  1614. ------
  1615. onButton1Down = function(k)
  1616. end
  1617. ------
  1618. onButton1Up = function(k)
  1619. end
  1620. ------
  1621. Mouse.KeyDown:connect(function(k)
  1622. Key[k]=true
  1623. onKeyDown(k)
  1624. end)
  1625. -------------------------
  1626. Mouse.KeyUp:connect(function(k)
  1627. Key[k]=false
  1628. onKeyUp(k)
  1629. end)
  1630. Mouse.Button1Down:connect(function()
  1631. Button1=true
  1632. onButton1Down()
  1633. end)
  1634. Mouse.Button1Up:connect(function()
  1635. Button1=false
  1636. onButton1Up()
  1637. end)
  1638.  
  1639. doAfter(1,function() Base.CanCollide=false end)
  1640. runcount = 0
  1641. game:getService'RunService'.Stepped:connect(function(aa,step)
  1642. runcount = runcount+1
  1643. --
  1644. if runcount%10==0 and AnimTorso and Movement and Pilot then
  1645. local y=GetY(Base,Mouse.Hit.p)
  1646. addAnim(Torso2W ,1,1,nil,{ 0, 0, 0, 0, -y, 0})
  1647. end
  1648. --
  1649. if AnimArms and Movement and Pilot then
  1650. local x=GetX(Torso2,Mouse.Hit.p)
  1651. if x>40 then x = 40 end
  1652. if x<-120 then x = -120 end
  1653. addAnim(LElbowW ,1,0.5,nil,{ nil, 0, nil, -120-x, 0, 0})
  1654. if x<-60 then x = -60 end
  1655. addAnim(RElbowW ,1,0.5,nil,{ nil, 0, nil, -120-x, 0, 0})
  1656. end
  1657. --
  1658. if runcount%5==0 and Turn~=0 and Movement and Pilot then
  1659. local turntarg = Base.CFrame*CFA(0,Turn,0)*CF(0,0,-1)
  1660. Gyro.cframe = CF(V3(Base.Position.x,0,Base.Position.z),V3(turntarg.x,0,turntarg.z))
  1661. end
  1662. --
  1663. if Key.w and not Key.s and Movement and Pilot and WalkDir==1 then
  1664. Velo.maxForce = V3(10000000,veloym,10000000)
  1665. local velo = Base.CFrame.lookVector*WalkingSpeed
  1666. Velo.Velocity = V3(velo.x,veloy,velo.z)
  1667. elseif Key.s and not Key.w and Movement and Pilot and WalkDir==-1 then
  1668. Velo.maxForce = V3(10000000,veloym,10000000)
  1669. local velo = Base.CFrame.lookVector*-12
  1670. Velo.Velocity = V3(velo.x,veloy,velo.z)
  1671. else
  1672. Velo.maxForce = V3(10000000,veloym,10000000)
  1673. Velo.Velocity = V3(0,veloy,0)
  1674. end
  1675. --
  1676. for i,anim in pairs(Anims) do
  1677. anim.Current = anim.Current + step
  1678. local CFStart = CF(anim.CFStart[1],anim.CFStart[2],anim.CFStart[3])*CFA(anim.CFStart[4],anim.CFStart[5],anim.CFStart[6])
  1679. local CFEnd = CF( anim.CFEnd[1], anim.CFEnd[2], anim.CFEnd[3])*CFA( anim.CFEnd[4], anim.CFEnd[5], anim.CFEnd[6])
  1680. anim.weld[anim.CC] = CFStart:lerp(CFEnd,anim.Current/anim.Time)
  1681. --print(anim.Current)
  1682. if anim.Current>=anim.Time then
  1683. anim.weld[anim.CC] = CFEnd -- 100%
  1684. Anims[i]=nil
  1685. end
  1686. end
  1687. --
  1688. for i,v in pairs(doAfterT) do
  1689. v.Current = v.Current + step
  1690. if v.Current>=v.Time then
  1691. v.Func()
  1692. doAfterT[i] = nil
  1693. end
  1694. end
  1695. --
  1696. for i,v in pairs(doInT) do
  1697. v.Current = v.Current + step
  1698. if v.Current>v.Time then v.Current = v.Time end -- sometimes exceeds
  1699. v.Func(v.Current/v.Time,i,step)
  1700. if doInT[i] and v.Current>=v.Time then
  1701. if v.FuncEnd then v.FuncEnd() end
  1702. doInT[i] = nil
  1703. end
  1704. end
  1705. --
  1706. end)
  1707. loadAnim:Open(0.2)
  1708. Anim = "Opened"
  1709. mech:MoveTo((CTorso.CFrame*CF(0,0,-30)).p)
  1710.  
  1711. while true do
  1712. swait()
  1713. if #Effects > 0 then
  1714. for e = 1, #Effects do
  1715. if Effects[e] ~= nil then
  1716. local Thing = Effects[e]
  1717. if Thing ~= nil then
  1718. local Part = Thing[1]
  1719. local Mode = Thing[2]
  1720. local Delay = Thing[3]
  1721. local IncX = Thing[4]
  1722. local IncY = Thing[5]
  1723. local IncZ = Thing[6]
  1724. if Thing[1].Transparency <= 1 then
  1725. if Thing[2] == "Block1" then
  1726. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1727. Mesh = Thing[1].Mesh
  1728. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1729. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1730. elseif Thing[2] == "Block2" then
  1731. Thing[1].CFrame = Thing[1].CFrame
  1732. Mesh = Thing[7]
  1733. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1734. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1735. elseif Thing[2] == "Cylinder" then
  1736. Mesh = Thing[1].Mesh
  1737. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1738. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1739. elseif Thing[2] == "Blood" then
  1740. Mesh = Thing[7]
  1741. Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, .5, 0)
  1742. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1743. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1744. elseif Thing[2] == "Elec" then
  1745. Mesh = Thing[1].Mesh
  1746. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  1747. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1748. elseif Thing[2] == "Disappear" then
  1749. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1750. elseif Thing[2] == "Shatter" then
  1751. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1752. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  1753. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  1754. Thing[6] = Thing[6] + Thing[5]
  1755. end
  1756. else
  1757. Part.Parent = nil
  1758. table.remove(Effects, e)
  1759. end
  1760. end
  1761. end
  1762. end
  1763. end
  1764. end
  1765.  
  1766. --(CTorso.CFrame*CF(0,0,-16)).p)
  1767. -- hl/https://preview.c9users.io/jaspher/rbx_stoof/RMMech.lua
  1768. -- l/_G.m.addAnim(_G.m.BaseW ,1,1,nil,{ 0, 0, 0, 90, 0, 0})
  1769. -- l/_G.m.addAnim(_G.m.LThighW,1,1,nil,{1.5,0.5,0,-25,0,45})
  1770. -- l/_G.la:Open() l/_G.la:Standing()
  1771. -- c/for i,v in pairs(workspace.notrmdx["RM Mech 2"]:children()) do if v:IsA'BasePart' then v:SetNetworkOwner(game.Players.notrmdx) end end -- jew
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement