Axtem

Mech Script

Oct 12th, 2015
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 64.32 KB | None | 0 0
  1. --[[
  2. Great Roi made by Fenrier.
  3. ]]
  4. Player = game:GetService("Players").LocalPlayer
  5. PlayerName=Player.Name
  6. Character = Player.Character
  7. PlayerGui = Player.PlayerGui
  8. Backpack = Player.Backpack
  9. Torso = Character.Torso
  10. Head = Character.Head
  11. Humanoid = Character.Humanoid
  12. LeftArm = Character["Left Arm"]
  13. LeftLeg = Character["Left Leg"]
  14. RightArm = Character["Right Arm"]
  15. RightLeg = Character["Right Leg"]
  16. LS = Torso["Left Shoulder"]
  17. LH = Torso["Left Hip"]
  18. RS = Torso["Right Shoulder"]
  19. RH = Torso["Right Hip"]
  20. Neck = Torso.Neck
  21. it=Instance.new
  22. vt=Vector3.new
  23. cf=CFrame.new
  24. euler=CFrame.fromEulerAnglesXYZ
  25. angles=CFrame.Angles
  26. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  27. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  28. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  29. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  30. attack = false
  31. attackdebounce = false
  32. debouncerockets=false
  33. debounceorb=false
  34. MMouse=nil
  35. idle=true
  36. doingidle=false
  37. doingwalk=false
  38. armwalk=false
  39. restarted=false
  40. holdrockets=false
  41. canidle=true
  42. aiming=false
  43. Mode="Robot"
  44. combo=0
  45. RootPart=Character.HumanoidRootPart
  46. workspace.CurrentCamera.CameraSubject=RootPart
  47. workspace.CurrentCamera.CameraType = "Track"
  48. RootJoint=RootPart.RootJoint
  49. RootCF=euler(-1.57,0,3.14)*cf(0,0,2.4)
  50. local RobotParts={}
  51. local RobotWelds={}
  52. local rocketlaunchparts={}
  53. do
  54. local PlayerColours = {
  55. BrickColor.new("Bright red"),
  56. BrickColor.new("Bright blue"),
  57. BrickColor.new("Earth green"),
  58. BrickColor.new("Bright violet"),
  59. BrickColor.new("Bright orange"),
  60. BrickColor.new("Bright yellow"),
  61. BrickColor.new("Light reddish violet"),
  62. BrickColor.new("Brick yellow"),
  63. }
  64. local GetNameValue
  65.  
  66. function GetChatColour(Name)
  67. return PlayerColours[GetNameValue(Name) + 1]
  68. end
  69.  
  70. function GetNameValue(Name)
  71. local Length = #Name
  72. local Value = 0
  73. for Index = 1, Length do
  74. local CharacterValue = string.byte(string.sub(Name, Index, Index))
  75. if (Length - Index + 1) % 4 < 2 then
  76. Value = Value + CharacterValue
  77. else
  78. Value = Value - CharacterValue
  79. end
  80. end
  81. return Value % 8
  82. end
  83. end
  84.  
  85. print(GetChatColour(PlayerName))
  86. Color1=GetChatColour(PlayerName)
  87. Color2="Medium stone grey"
  88. Color3="Dark stone grey"
  89. Color4="Black"
  90. --player
  91. player = nil
  92. --save shoulders
  93. RSH, LSH = nil, nil
  94. --welds
  95. RW, LW , RWL, LWL = it("Weld"), it("Weld"), it("Weld"), it("Weld")
  96. RW.Name="Right Shoulder"
  97. LW.Name="Left Shoulder"
  98. RWL.Name="Right Hip"
  99. LWL.Name="Left Hip"
  100.  
  101.  
  102. if Character:findFirstChild("Roi",true) ~= nil then
  103. Character:findFirstChild("Roi",true).Parent = nil
  104. end
  105. if Character:findFirstChild("Right Fist",true) ~= nil then
  106. Character:findFirstChild("Right Fist",true).Parent = nil
  107. end
  108. if Character:findFirstChild("Left Fist",true) ~= nil then
  109. Character:findFirstChild("Left Fist",true).Parent = nil
  110. end
  111. if Character:findFirstChild("Block",true) ~= nil then
  112. Character:findFirstChild("Block",true).Parent = nil
  113. end
  114.  
  115.  
  116. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  117. local fp = it("Part")
  118. fp.formFactor = formfactor
  119. fp.Parent = parent
  120. fp.Reflectance = reflectance
  121. fp.Transparency = transparency
  122. fp.CanCollide = false
  123. fp.Locked=true
  124. fp.BrickColor = brickcolor
  125. fp.Name = name
  126. fp.Size = size
  127. fp.Position = Torso.Position
  128. fp.BottomSurface="Smooth"
  129. fp.TopSurface="Smooth"
  130. fp:BreakJoints()
  131. table.insert(RobotParts,fp)
  132. return fp
  133. end
  134.  
  135. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  136. local mesh = it(Mesh)
  137. mesh.Parent = part
  138. if Mesh=="SpecialMesh" then
  139. mesh.MeshType = meshtype
  140. mesh.MeshId = meshid
  141. end
  142. mesh.Offset=offset
  143. mesh.Scale=scale
  144. return mesh
  145. end
  146.  
  147. function weld(parent,part0,part1,c0)
  148. local weld = it("Weld")
  149. weld.Parent = parent
  150. weld.Part0 = part0
  151. weld.Part1 = part1
  152. weld.C0 = c0
  153. table.insert(RobotWelds,weld)
  154. return weld
  155. end
  156.  
  157. local modelzorz = Instance.new("Model")
  158. modelzorz.Parent = Character
  159. modelzorz.Name = "Roi"
  160. fist1=Instance.new("Model")
  161. fist1.Parent=Character
  162. fist1.Name="Left Fist"
  163. fist2=Instance.new("Model")
  164. fist2.Parent=Character
  165. fist2.Name="Right Fist"
  166.  
  167. Torso.CFrame=Torso.CFrame*cf(0,10,0)
  168. tors1=part(3,modelzorz,0,0,Color1,"Torso1",vt(1,1,1))
  169. RootJoint.Part1=tors1
  170. tors2=part(3,modelzorz,0,0,Color1,"Torso2",vt(1,1,1))
  171. tors3=part(3,modelzorz,0,0,BrickColor.new(Color2),"Torso3",vt(1,1,1))
  172. tors4=part(3,modelzorz,0,0,BrickColor.new(Color2),"Torso4",vt(1,1,1))
  173. tors5=part(3,modelzorz,0,0,BrickColor.new(Color3),"Torso5",vt(1,1,1))
  174. tors6=part(3,modelzorz,0,0,BrickColor.new(Color3),"Torso6",vt(1,1,1))
  175. tors7=part(3,modelzorz,0,0,Color1,"Torso7",vt(1,1,1))
  176. tors8=part(3,modelzorz,0,0,BrickColor.new(Color3),"Torso8",vt(1,1,1))
  177. tors9=part(3,modelzorz,0,0,Color1,"Torso9",vt(1,1,1))
  178. tors10=part(3,modelzorz,0,0,BrickColor.new(Color3),"Torso10",vt(1,1,1))
  179. tors11=part(3,modelzorz,0,0,BrickColor.new(Color3),"Torso11",vt(1,1,1))
  180. tors12=part(3,modelzorz,0,0,BrickColor.new(Color3),"Torso12",vt(1,1,1))
  181. tors13=part(3,modelzorz,0,0,Color1,"Torso13",vt(1,1,1))
  182. tors14=part(3,modelzorz,0,0,BrickColor.new(Color4),"Torso14",vt(1,1,1))
  183. tors15=part(3,modelzorz,0,0,BrickColor.new(Color4),"Torso15",vt(1,1,1))
  184. tors16=part(3,modelzorz,0,0,BrickColor.new(Color4),"Torso16",vt(1,1,1))
  185. tors17=part(3,modelzorz,0,0,BrickColor.new(Color3),"Torso17",vt(1,1,1))
  186. tors18=part(3,modelzorz,0,1,BrickColor.new("Really black"),"Torso Hitbox",vt(5,4,3.5))
  187. tors18.CanCollide=true
  188.  
  189. lleg1=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Left Leg1",vt(1,1,1))
  190. lleg2=part(3,modelzorz,0,0,Color1,"Left Leg2",vt(1,1,1))
  191. lleg3=part(3,modelzorz,0,0,BrickColor.new(Color3),"Left Leg3",vt(1,1,1))
  192. lleg4=part(3,modelzorz,0,0,Color1,"Left Leg4",vt(1,1,1))
  193. lleg5=part(3,modelzorz,0,0,BrickColor.new(Color3),"Left Leg5",vt(1,1,1))
  194. lleg6=part(3,modelzorz,0,0,Color1,"Left Leg6",vt(1,1,1))
  195. lleg7=part(3,modelzorz,0,0,BrickColor.new(Color3),"Left Leg7",vt(1,1,1))
  196. lleg8=part(3,modelzorz,0,0,BrickColor.new(Color2),"Left Leg8",vt(1,1,1))
  197. lleg9=part(3,modelzorz,0,0,BrickColor.new(Color3),"Left Leg9",vt(1,1,1))
  198. lleg10=part(3,modelzorz,0,0,BrickColor.new(Color2),"Left Leg10",vt(1,1,1))
  199. lleg11=part(3,modelzorz,0,1,BrickColor.new("Really black"),"Left Leg Hitbox",vt(1.5,4,1.5))
  200.  
  201. rleg1=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Right Leg1",vt(1,1,1))
  202. rleg2=part(3,modelzorz,0,0,Color1,"Right Leg2",vt(1,1,1))
  203. rleg3=part(3,modelzorz,0,0,BrickColor.new(Color3),"Right Leg3",vt(1,1,1))
  204. rleg4=part(3,modelzorz,0,0,Color1,"Right Leg4",vt(1,1,1))
  205. rleg5=part(3,modelzorz,0,0,BrickColor.new(Color3),"Right Leg5",vt(1,1,1))
  206. rleg6=part(3,modelzorz,0,0,Color1,"Right Leg6",vt(1,1,1))
  207. rleg7=part(3,modelzorz,0,0,BrickColor.new(Color3),"Right Leg7",vt(1,1,1))
  208. rleg8=part(3,modelzorz,0,0,BrickColor.new(Color2),"Right Leg8",vt(1,1,1))
  209. rleg9=part(3,modelzorz,0,0,BrickColor.new(Color3),"Right Leg9",vt(1,1,1))
  210. rleg10=part(3,modelzorz,0,0,BrickColor.new(Color2),"Right Leg10",vt(1,1,1))
  211. rleg11=part(3,modelzorz,0,1,BrickColor.new("Really black"),"Right Leg Hitbox",vt(1.5,4,1.5))
  212.  
  213. larm1=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Left Arm1",vt(1,1,1))
  214. larm2=part(3,modelzorz,0,0,BrickColor.new(Color3),"Left Arm2",vt(1,1,1))
  215. larm3=part(3,modelzorz,0,1,BrickColor.new(Color4),"Left Arm3",vt(1,1,1)) --Scrapped to make way for new cannon
  216. numb=0.6
  217. for i=1,3 do
  218. larm4=part(3,modelzorz,0,1,BrickColor.new("Really black"),"Left Arm4",vt(1,1,1))
  219. larmmsh4=mesh("CylinderMesh",larm4,"","",vt(0,0,0),vt(0.5,1.01,0.5))
  220. larmwld4=weld(larm4,larm4,larm3,euler(1.57,0,0)*cf(numb,-0.1,0))
  221. numb=numb-0.6
  222. end
  223. larm5=part(3,modelzorz,0,1,BrickColor.new("Really black"),"Left Arm5",vt(1,1,1))
  224. larm6=part(3,modelzorz,0,0,Color1,"Left Arm6",vt(1,1,1))
  225. larm7=part(3,modelzorz,0,0,Color1,"Left Arm7",vt(1,1,1))
  226. larm8=part(3,modelzorz,0,0,Color1,"Left Arm8",vt(1,1,1))
  227. larm9=part(3,modelzorz,0,0,Color1,"Left Arm9",vt(1,1,1))
  228. larm10=part(3,modelzorz,0,0,Color1,"Left Arm10",vt(1,1,1))
  229. larm11=part(3,modelzorz,0,0,BrickColor.new(Color2),"Left Arm11",vt(1,1,1))
  230. larm12=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Left Arm12",vt(1,1,1))
  231. larm13=part(3,modelzorz,0,0,BrickColor.new(Color2),"Left Arm13",vt(1,1,1))
  232. larm14=part(3,modelzorz,0,0,BrickColor.new(Color4),"Left Arm14",vt(1,1,1))
  233. larm15=part(3,modelzorz,0,0,BrickColor.new(Color2),"Left Arm15",vt(1,1,1))
  234. larm16=part(3,modelzorz,0,0,BrickColor.new(Color2),"Left Arm16",vt(1,1,1))
  235. larm17=part(3,modelzorz,0,0,Color1,"Left Arm17",vt(1,1,1))
  236. lfist1=part(3,fist1,0,0,BrickColor.new(Color2),"Left Fist1",vt(1,1,1))
  237. lfist2=part(3,fist1,0,0,Color1,"Left Fist2",vt(1,1,1))
  238. lfist3=part(3,fist1,0,0,Color1,"Left Fist3",vt(1,1,1))
  239. lfist4=part(3,fist1,0,0,Color1,"Left Fist4",vt(1,1,1))
  240. lfist5=part(3,fist1,0,0,Color1,"Left Fist5",vt(1,1,1))
  241. lfist6=part(3,fist1,0,0,BrickColor.new(Color3),"Left Fist6",vt(1,1,1))
  242. lfist7=part(3,fist1,0,0,BrickColor.new(Color3),"Left Fist7",vt(1,1,1))
  243. lfist8=part(3,fist1,0,0,BrickColor.new(Color3),"Left Fist8",vt(1,1,1))
  244. lfist9=part(3,fist1,0,0,BrickColor.new(Color3),"Left Fist9",vt(1,1,1))
  245. lfist10=part(3,fist1,0,0,BrickColor.new(Color3),"Left Fist10",vt(1,1,1))
  246. lfist11=part(3,fist1,0,0,BrickColor.new(Color3),"Left Fist11",vt(1,1,1))
  247. lfist12=part(3,fist1,0,1,BrickColor.new("Really black"),"Left Fist Hitbox",vt(1.5,4,1.5))
  248.  
  249. rarm1=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Right Arm1",vt(1,1,1))
  250. rarm2=part(3,modelzorz,0,0,BrickColor.new(Color3),"Right Arm2",vt(1,1,1))
  251. rarm3=part(3,modelzorz,0,0,BrickColor.new(Color4),"Right Arm3",vt(1,1,1))
  252. numb=0.6
  253. for i=1,3 do
  254. rarm4=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Right Arm4",vt(1,1,1))
  255. rarmmsh4=mesh("CylinderMesh",rarm4,"","",vt(0,0,0),vt(0.5,1.01,0.5))
  256. rarmwld4=weld(rarm4,rarm4,rarm3,euler(1.57,0,0)*cf(numb,-0.1,0))
  257. table.insert(rocketlaunchparts,rarm4)
  258. numb=numb-0.6
  259. end
  260. rarm5=part(3,modelzorz,0,1,BrickColor.new("Really black"),"Right Arm5",vt(1,1,1))
  261. rarm6=part(3,modelzorz,0,0,Color1,"Right Arm6",vt(1,1,1))
  262. rarm7=part(3,modelzorz,0,0,Color1,"Right Arm7",vt(1,1,1))
  263. rarm8=part(3,modelzorz,0,0,Color1,"Right Arm8",vt(1,1,1))
  264. rarm9=part(3,modelzorz,0,0,Color1,"Right Arm9",vt(1,1,1))
  265. rarm10=part(3,modelzorz,0,0,Color1,"Right Arm10",vt(1,1,1))
  266. rarm11=part(3,modelzorz,0,0,BrickColor.new(Color2),"Right Arm11",vt(1,1,1))
  267. rarm12=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Right Arm12",vt(1,1,1))
  268. rarm13=part(3,modelzorz,0,0,BrickColor.new(Color2),"Right Arm13",vt(1,1,1))
  269. rfist1=part(3,fist2,0,0,BrickColor.new(Color2),"Right Fist1",vt(1,1,1))
  270. rfist2=part(3,fist2,0,0,Color1,"Right Fist2",vt(1,1,1))
  271. rfist3=part(3,fist2,0,0,Color1,"Right Fist3",vt(1,1,1))
  272. rfist4=part(3,fist2,0,0,Color1,"Right Fist4",vt(1,1,1))
  273. rfist5=part(3,fist2,0,0,Color1,"Right Fist5",vt(1,1,1))
  274. rfist6=part(3,fist2,0,0,BrickColor.new(Color3),"Right Fist6",vt(1,1,1))
  275. rfist7=part(3,fist2,0,0,BrickColor.new(Color3),"Right Fist7",vt(1,1,1))
  276. rfist8=part(3,fist2,0,0,BrickColor.new(Color3),"Right Fist8",vt(1,1,1))
  277. rfist9=part(3,fist2,0,0,BrickColor.new(Color3),"Right Fist9",vt(1,1,1))
  278. rfist10=part(3,fist2,0,0,BrickColor.new(Color3),"Right Fist10",vt(1,1,1))
  279. rfist11=part(3,fist2,0,0,BrickColor.new(Color3),"Right Fist11",vt(1,1,1))
  280. rfist12=part(3,fist2,0,1,BrickColor.new("Really black"),"Right Fist Hitbox",vt(1.5,4,1.5))
  281.  
  282.  
  283. torsmsh1=mesh("BlockMesh",tors1,"","",vt(0,0,0),vt(2,1.5,3))
  284. torsmsh2=mesh("BlockMesh",tors2,"","",vt(0,0,0),vt(3.3,1.3,2.8))
  285. torsmsh3=mesh("BlockMesh",tors3,"","",vt(0,0,0),vt(2.5,0.8,3))
  286. torsmsh4=mesh("BlockMesh",tors4,"","",vt(0,0,0),vt(2.4,0.7,1.5))
  287. torsmsh5=mesh("BlockMesh",tors5,"","",vt(0,0,0),vt(1,1,1.5))
  288. torsmsh6=mesh("BlockMesh",tors6,"","",vt(0,0,0),vt(2,0.6,2))
  289. torsmsh7=mesh("BlockMesh",tors7,"","",vt(0,0,0),vt(2.5,1.5,1))
  290. torsmsh8=mesh("BlockMesh",tors8,"","",vt(0,0,0),vt(2,1.5,0.9))
  291. torsmsh9=mesh("BlockMesh",tors9,"","",vt(0,0,0),vt(1.9,1,1))
  292. torsmsh10=mesh("BlockMesh",tors10,"","",vt(0,0,0),vt(1.5,1.3,1.3))
  293. torsmsh11=mesh("BlockMesh",tors11,"","",vt(0,0,0),vt(1.2,2,1.2))
  294. torsmsh12=mesh("BlockMesh",tors12,"","",vt(0,0,0),vt(1.2,1,1.4))
  295. torsmsh13=mesh("BlockMesh",tors13,"","",vt(0,0,0),vt(1,1,1.2))
  296. torsmsh14=mesh("BlockMesh",tors14,"","",vt(0,0,0),vt(0.2,1,1.2))
  297. torsmsh15=mesh("BlockMesh",tors15,"","",vt(0,0,0),vt(0.2,1,1.2))
  298. torsmsh16=mesh("BlockMesh",tors16,"","",vt(0,0,0),vt(0.2,1,1.2))
  299. torsmsh17=mesh("BlockMesh",tors17,"","",vt(0,0,0),vt(1.2,1.2,1))
  300.  
  301. llegmsh1=mesh("BlockMesh",lleg1,"","",vt(0,0,0),vt(0.5,0.5,0.5))
  302. llegmsh2=mesh("CylinderMesh",lleg2,"","",vt(0,0,0),vt(1.3,1.3,1.3))
  303. llegmsh3=mesh("CylinderMesh",lleg3,"","",vt(0,0,0),vt(1,1.4,1))
  304. llegmsh4=mesh("BlockMesh",lleg4,"","",vt(0,0,0),vt(1.2,1,1.2))
  305. llegmsh5=mesh("BlockMesh",lleg5,"","",vt(0,0,0),vt(0.9,1,0.9))
  306. llegmsh6=mesh("BlockMesh",lleg6,"","",vt(0,0,0),vt(0.8,1.2,0.8))
  307. llegmsh7=mesh("BlockMesh",lleg7,"","",vt(0,0,0),vt(1,1.2,1.5))
  308. llegmsh8=mesh("BlockMesh",lleg8,"","",vt(0,0,0),vt(1,0.8,1.4))
  309. llegmsh9=mesh("BlockMesh",lleg9,"","",vt(0,0,0),vt(1,0.4,1.3))
  310. llegmsh10=mesh("BlockMesh",lleg10,"","",vt(0,0,0),vt(1.5,2.5,0.8))
  311.  
  312. rlegmsh1=mesh("BlockMesh",rleg1,"","",vt(0,0,0),vt(0.5,0.5,0.5))
  313. rlegmsh2=mesh("CylinderMesh",rleg2,"","",vt(0,0,0),vt(1.3,1.3,1.3))
  314. rlegmsh3=mesh("CylinderMesh",rleg3,"","",vt(0,0,0),vt(1,1.4,1))
  315. rlegmsh4=mesh("BlockMesh",rleg4,"","",vt(0,0,0),vt(1.2,1,1.2))
  316. rlegmsh5=mesh("BlockMesh",rleg5,"","",vt(0,0,0),vt(0.9,1,0.9))
  317. rlegmsh6=mesh("BlockMesh",rleg6,"","",vt(0,0,0),vt(0.8,1.2,0.8))
  318. rlegmsh7=mesh("BlockMesh",rleg7,"","",vt(0,0,0),vt(1,1.2,1.5))
  319. rlegmsh8=mesh("BlockMesh",rleg8,"","",vt(0,0,0),vt(1,0.8,1.4))
  320. rlegmsh9=mesh("BlockMesh",rleg9,"","",vt(0,0,0),vt(1,0.4,1.3))
  321. rlegmsh10=mesh("BlockMesh",rleg10,"","",vt(0,0,0),vt(1.5,2.5,0.8))
  322.  
  323. larmmsh1=mesh("BlockMesh",larm1,"","",vt(0,0,0),vt(0.5,0.5,0.5))
  324. larmmsh2=mesh("BlockMesh",larm2,"","",vt(0,0,0),vt(3,0.5,2))
  325. larmmsh3=mesh("BlockMesh",larm3,"","",vt(0,0,0),vt(2,1,1))
  326. larmmsh5=mesh("BlockMesh",larm5,"","",vt(0,0,0),vt(0.5,0.5,0.5))
  327. larmmsh6=mesh("BlockMesh",larm6,"","",vt(0,0,0),vt(3.1,1,0.5))
  328. larmmsh7=mesh("BlockMesh",larm7,"","",vt(0,0,0),vt(0.5,1,2.1))
  329. larmmsh8=mesh("BlockMesh",larm8,"","",vt(0,0,0),vt(0.5,1,2.1))
  330. larmmsh9=mesh("BlockMesh",larm9,"","",vt(0,0,0),vt(3.1,1,0.5))
  331. larmmsh10=mesh("BlockMesh",larm10,"","",vt(0,0,0),vt(3.1,0.5,2.5))
  332. larmmsh11=mesh("BlockMesh",larm11,"","",vt(0,0,0),vt(1,1.5,1))
  333. larmmsh12=mesh("BlockMesh",larm12,"","",vt(0,0,0),vt(0.5,0.5,0.5))
  334. larmmsh13=mesh("BlockMesh",larm13,"","",vt(0,0,0),vt(1.2,1.9,1.2))
  335. larmmsh14=mesh("BlockMesh",larm14,"","",vt(0,0,0),vt(1.5,0.8,1))
  336. larmmsh15=mesh("BlockMesh",larm15,"","",vt(0,0,0),vt(0.2,1,0.2))
  337. larmmsh16=mesh("BlockMesh",larm16,"","",vt(0,0,0),vt(0.2,1,0.2))
  338. larmmsh17=mesh("SpecialMesh",larm17,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5))
  339. lfistmsh1=mesh("BlockMesh",lfist1,"","",vt(0,0,0),vt(1.3,1,1.3))
  340. lfistmsh2=mesh("BlockMesh",lfist2,"","",vt(0,0,0),vt(0.5,2,1.4))
  341. lfistmsh3=mesh("BlockMesh",lfist3,"","",vt(0,0,0),vt(0.5,2,1.4))
  342. lfistmsh4=mesh("BlockMesh",lfist4,"","",vt(0,0,0),vt(0.5,2,1.4))
  343. lfistmsh5=mesh("BlockMesh",lfist5,"","",vt(0,0,0),vt(1.2,1,1.4))
  344. lfistmsh6=mesh("BlockMesh",lfist6,"","",vt(0,0,0),vt(0.5,0.8,1.3))
  345. lfistmsh7=mesh("BlockMesh",lfist7,"","",vt(0,0,0),vt(0.3,0.8,0.3))
  346. lfistmsh8=mesh("BlockMesh",lfist8,"","",vt(0,0,0),vt(0.3,0.8,0.3))
  347. lfistmsh9=mesh("BlockMesh",lfist9,"","",vt(0,0,0),vt(0.3,0.8,0.3))
  348. lfistmsh10=mesh("BlockMesh",lfist10,"","",vt(0,0,0),vt(0.3,0.8,0.3))
  349. lfistmsh11=mesh("BlockMesh",lfist11,"","",vt(0,0,0),vt(0.3,0.6,0.3))
  350.  
  351. rarmmsh1=mesh("BlockMesh",rarm1,"","",vt(0,0,0),vt(0.5,0.5,0.5))
  352. rarmmsh2=mesh("BlockMesh",rarm2,"","",vt(0,0,0),vt(3,0.5,2))
  353. rarmmsh3=mesh("BlockMesh",rarm3,"","",vt(0,0,0),vt(2,1,1))
  354. rarmmsh5=mesh("BlockMesh",rarm5,"","",vt(0,0,0),vt(0.5,0.5,0.5))
  355. rarmmsh6=mesh("BlockMesh",rarm6,"","",vt(0,0,0),vt(3.1,1,0.5))
  356. rarmmsh7=mesh("BlockMesh",rarm7,"","",vt(0,0,0),vt(0.5,1,2.1))
  357. rarmmsh8=mesh("BlockMesh",rarm8,"","",vt(0,0,0),vt(0.5,1,2.1))
  358. rarmmsh9=mesh("BlockMesh",rarm9,"","",vt(0,0,0),vt(3.1,1,0.5))
  359. rarmmsh10=mesh("BlockMesh",rarm10,"","",vt(0,0,0),vt(3.1,0.5,2.5))
  360. rarmmsh11=mesh("BlockMesh",rarm11,"","",vt(0,0,0),vt(1,1.5,1))
  361. rarmmsh12=mesh("BlockMesh",rarm12,"","",vt(0,0,0),vt(0.5,0.5,0.5))
  362. rarmmsh13=mesh("BlockMesh",rarm13,"","",vt(0,0,0),vt(1.2,1.9,1.2))
  363. rfistmsh1=mesh("BlockMesh",rfist1,"","",vt(0,0,0),vt(1.3,1,1.3))
  364. rfistmsh2=mesh("BlockMesh",rfist2,"","",vt(0,0,0),vt(0.5,2,1.4))
  365. rfistmsh3=mesh("BlockMesh",rfist3,"","",vt(0,0,0),vt(0.5,2,1.4))
  366. rfistmsh4=mesh("BlockMesh",rfist4,"","",vt(0,0,0),vt(0.5,2,1.4))
  367. rfistmsh5=mesh("BlockMesh",rfist5,"","",vt(0,0,0),vt(1.2,1,1.4))
  368. rfistmsh6=mesh("BlockMesh",rfist6,"","",vt(0,0,0),vt(0.5,0.8,1.3))
  369. rfistmsh7=mesh("BlockMesh",rfist7,"","",vt(0,0,0),vt(0.3,0.8,0.3))
  370. rfistmsh8=mesh("BlockMesh",rfist8,"","",vt(0,0,0),vt(0.3,0.8,0.3))
  371. rfistmsh9=mesh("BlockMesh",rfist9,"","",vt(0,0,0),vt(0.3,0.8,0.3))
  372. rfistmsh10=mesh("BlockMesh",rfist10,"","",vt(0,0,0),vt(0.3,0.8,0.3))
  373. rfistmsh11=mesh("BlockMesh",rfist11,"","",vt(0,0,0),vt(0.3,0.6,0.3))
  374.  
  375.  
  376.  
  377. local torswld1=weld(tors1,tors1,Torso,euler(0.2,0,0)*cf(-3,2.3,0))
  378. -- torswld1=weld(tors1,tors1,Torso,euler(0,0,0)*cf(0,-4,5))
  379. torswld2=weld(tors2,tors2,tors1,euler(0,0,0)*cf(0,0,0))
  380. torswld3=weld(tors3,tors3,tors2,euler(0,0,0)*cf(0,1,0.2))
  381. torswld4=weld(tors4,tors4,tors3,euler(0,0,0)*cf(0,0.5,-0.7))
  382. torswld5=weld(tors5,tors5,tors3,euler(0,0,0)*cf(0,0.8,0.2))
  383. torswld6=weld(tors6,tors6,tors5,euler(0,0,0)*cf(0,0.8,0))
  384. torswld7=weld(tors7,tors7,tors6,euler(0,0,0)*cf(0,0,0.8))
  385. torswld8=weld(tors8,tors8,tors7,euler(0,0,0)*cf(0,1.2,0))
  386. torswld9=weld(tors9,tors9,tors7,euler(1,0,0)*cf(0,0.2,0.3))
  387. torswld10=weld(tors10,tors10,tors8,euler(0.785,0,1.57)*cf(0,0,0))
  388. torswld11=weld(tors11,tors11,tors6,euler(0,0,0)*cf(0,0,-0.6))
  389. torswld12=weld(tors12,tors12,tors1,euler(0,0,0)*cf(0,-0.5,-0.2))
  390. torswld13=weld(tors13,tors13,tors12,euler(0,0,0)*cf(0,-0.5,0))
  391. torswld14=weld(tors14,tors14,tors13,euler(0,0,0)*cf(0.3,0.2,0.01))
  392. torswld15=weld(tors15,tors15,tors13,euler(0,0,0)*cf(0,0.2,0.01))
  393. torswld16=weld(tors16,tors16,tors13,euler(0,0,0)*cf(-0.3,0.2,0.01))
  394. torswld17=weld(tors17,tors17,tors13,euler(0,0,0)*cf(0,0,-0.4))
  395. torswld18=weld(tors18,tors18,tors1,euler(0,0,0)*cf(0,1,0))
  396.  
  397. llegwld1=weld(lleg1,lleg1,tors6,euler(0,0,0)*cf(1.5,0,-0.5))
  398. llegwld2=weld(lleg2,lleg2,lleg1,euler(0,0,1.57)*cf(0,0,0))
  399. llegwld3=weld(lleg3,lleg3,lleg2,euler(0,0,0)*cf(0,0,0))
  400. llegwld4=weld(lleg4,lleg4,lleg2,euler(0,0,-1.57)*cf(0,0.4,0.8))
  401. llegwld5=weld(lleg5,lleg5,lleg4,euler(0.785,0,0)*cf(0,-0.4,0))
  402. llegwld6=weld(lleg6,lleg6,lleg4,euler(0,0,0)*cf(0,0.2,0.4))
  403. llegwld7=weld(lleg7,lleg7,lleg4,euler(0,0,0)*cf(0,1.1,-0.4))
  404. llegwld8=weld(lleg8,lleg8,lleg7,euler(0,0,0)*cf(0,1,0))
  405. llegwld9=weld(lleg9,lleg9,lleg8,euler(0,0,0)*cf(0,0.6,0))
  406. llegwld10=weld(lleg10,lleg10,lleg7,euler(0,0,0)*cf(0,0.5,0))
  407. llegwld11=weld(lleg11,lleg11,lleg7,euler(0,0,0)*cf(0,-0.2,0))
  408.  
  409. rlegwld1=weld(rleg1,rleg1,tors6,euler(0,0,0)*cf(-1.5,0,-0.5))
  410. rlegwld2=weld(rleg2,rleg2,rleg1,euler(0,0,1.57)*cf(0,0,0))
  411. rlegwld3=weld(rleg3,rleg3,rleg2,euler(0,0,0)*cf(0,0,0))
  412. rlegwld4=weld(rleg4,rleg4,rleg2,euler(0,0,-1.57)*cf(0,-0.4,0.8))
  413. rlegwld5=weld(rleg5,rleg5,rleg4,euler(0.785,0,0)*cf(0,-0.4,0))
  414. rlegwld6=weld(rleg6,rleg6,rleg4,euler(0,0,0)*cf(0,0.2,0.4))
  415. rlegwld7=weld(rleg7,rleg7,rleg4,euler(0,0,0)*cf(0,1.1,-0.4))
  416. rlegwld8=weld(rleg8,rleg8,rleg7,euler(0,0,0)*cf(0,1,0))
  417. rlegwld9=weld(rleg9,rleg9,rleg8,euler(0,0,0)*cf(0,0.6,0))
  418. rlegwld10=weld(rleg10,rleg10,rleg7,euler(0,0,0)*cf(0,0.5,0))
  419. rlegwld11=weld(rleg11,rleg11,rleg7,euler(0,0,0)*cf(0,-0.2,0))
  420.  
  421. larmwld1=weld(larm1,larm1,tors1,euler(0,0,0)*cf(3,0,0))
  422. larmwld2=weld(larm2,larm2,larm1,euler(0,0,0)*cf(0,0.2,0))
  423. larmwld3=weld(larm3,larm3,larm2,euler(0,0,0)*cf(0,-0.4,0))
  424. larmwld5=weld(larm5,larm5,larm1,euler(0,0,0)*cf(0,-0.4,-1))
  425. larmwld6=weld(larm6,larm6,larm5,euler(0,0,0)*cf(0,0,0))
  426. larmwld7=weld(larm7,larm7,larm5,euler(0,0,0)*cf(1.29,0,1))
  427. larmwld8=weld(larm8,larm8,larm5,euler(0,0,0)*cf(-1.29,0,1))
  428. larmwld9=weld(larm9,larm9,larm5,euler(0,0,0)*cf(0,0,2))
  429. larmwld10=weld(larm10,larm10,larm5,euler(0,0,0)*cf(0,-0.7,1))
  430. larmwld11=weld(larm11,larm11,larm2,euler(-0.5,0,0.2)*cf(0,0.8,0))
  431. larmwld12=weld(larm12,larm12,larm11,euler(0.5,0,-0.2)*cf(0,0.8,0))
  432. larmwld13=weld(larm13,larm13,larm12,cf(0,1,0)*euler(-1.2,0,0.2))
  433. larmwld14=weld(larm14,larm14,larm2,euler(0,0,0)*cf(0,-0.2,0))
  434. larmwld15=weld(larm15,larm15,larm14,euler(0,0,0.5)*cf(-0.4,-0.5,0))
  435. larmwld16=weld(larm16,larm16,larm14,euler(0,0,-0.5)*cf(0.4,-0.5,0))
  436. larmwld17=weld(larm17,larm17,larm14,euler(0,0,0)*cf(0,-1,0))
  437. lfistwld1=weld(lfist1,lfist1,larm13,euler(0,0,0)*cf(0,1,0))
  438. lfistwld2=weld(lfist2,lfist2,lfist1,euler(0,0,0)*cf(0.5,-1,0))
  439. lfistwld3=weld(lfist3,lfist3,lfist1,euler(0,1.57,0)*cf(0,-1,0.5))
  440. lfistwld4=weld(lfist4,lfist4,lfist1,euler(0,1.57,0)*cf(0,-1,-0.5))
  441. lfistwld5=weld(lfist5,lfist5,lfist1,euler(-0.2,0,0)*cf(0,0.7,0))
  442. lfistwld6=weld(lfist6,lfist6,lfist5,euler(0,0,-0.2)*cf(0.2,0.7,0))
  443. lfistwld7=weld(lfist7,lfist7,lfist6,euler(0,0,-0.2)*cf(0,0.6,0.5))
  444. lfistwld8=weld(lfist8,lfist8,lfist6,euler(0,0,-0.4)*cf(-0.1,0.6,0.175))
  445. lfistwld9=weld(lfist9,lfist9,lfist6,euler(0,0,-0.4)*cf(-0.1,0.6,-0.175))
  446. lfistwld10=weld(lfist10,lfist10,lfist6,euler(0,0,-0.4)*cf(-0.1,0.6,-0.5))
  447. lfistwld11=weld(lfist11,lfist11,lfist6,euler(2.1,0.3,0)*cf(0,0.2,0.7))
  448. lfistwld12=weld(lfist12,lfist12,lfist1,euler(0,0,0)*cf(0,0,0))
  449.  
  450. rarmwld1=weld(rarm1,rarm1,tors1,euler(0,0,0)*cf(-3,0,0))
  451. rarmwld2=weld(rarm2,rarm2,rarm1,euler(0,0,0)*cf(0,0.2,0))
  452. rarmwld3=weld(rarm3,rarm3,rarm2,euler(0,0,0)*cf(0,-0.4,0))
  453. rarmwld5=weld(rarm5,rarm5,rarm1,euler(0,0,0)*cf(0,-0.4,-1))
  454. rarmwld6=weld(rarm6,rarm6,rarm5,euler(0,0,0)*cf(0,0,0))
  455. rarmwld7=weld(rarm7,rarm7,rarm5,euler(0,0,0)*cf(1.29,0,1))
  456. rarmwld8=weld(rarm8,rarm8,rarm5,euler(0,0,0)*cf(-1.29,0,1))
  457. rarmwld9=weld(rarm9,rarm9,rarm5,euler(0,0,0)*cf(0,0,2))
  458. rarmwld10=weld(rarm10,rarm10,rarm5,euler(0,0,0)*cf(0,-0.7,1))
  459. rarmwld11=weld(rarm11,rarm11,rarm2,euler(-0.5,0,-0.2)*cf(0,0.8,0))
  460. rarmwld12=weld(rarm12,rarm12,rarm11,euler(0.5,0,0.2)*cf(0,0.8,0))
  461. rarmwld13=weld(rarm13,rarm13,rarm12,cf(0,1,0)*euler(-1.2,0,-0.2))
  462. rfistwld1=weld(rfist1,rfist1,rarm13,euler(0,0,0)*cf(0,1,0))
  463. rfistwld2=weld(rfist2,rfist2,rfist1,euler(0,0,0)*cf(-0.5,-1,0))
  464. rfistwld3=weld(rfist3,rfist3,rfist1,euler(0,1.57,0)*cf(0,-1,0.5))
  465. rfistwld4=weld(rfist4,rfist4,rfist1,euler(0,1.57,0)*cf(0,-1,-0.5))
  466. rfistwld5=weld(rfist5,rfist5,rfist1,euler(-0.2,0,0)*cf(0,0.7,0))
  467. rfistwld6=weld(rfist6,rfist6,rfist5,euler(0,0,0.2)*cf(-0.2,0.7,0))
  468. rfistwld7=weld(rfist7,rfist7,rfist6,euler(0,0,0.2)*cf(0,0.6,0.5))
  469. rfistwld8=weld(rfist8,rfist8,rfist6,euler(0,0,0.4)*cf(0.1,0.6,0.175))
  470. rfistwld9=weld(rfist9,rfist9,rfist6,euler(0,0,0.4)*cf(0.1,0.6,-0.175))
  471. rfistwld10=weld(rfist10,rfist10,rfist6,euler(0,0,0.4)*cf(0.1,0.6,-0.5))
  472. rfistwld11=weld(rfist11,rfist11,rfist6,euler(2.1,-0.3,0)*cf(0,0.2,0.7))
  473. rfistwld12=weld(rfist12,rfist12,rfist1,euler(0,0,0)*cf(0,0,0))
  474.  
  475.  
  476.  
  477. player = Player
  478. ch = Character
  479. RSH = ch.Torso["Right Shoulder"]
  480. LSH = ch.Torso["Left Shoulder"]
  481. RH = ch.Torso["Right Hip"]
  482. LH = ch.Torso["Left Hip"]
  483. --
  484. RSH.Parent = nil
  485. LSH.Parent = nil
  486. RH.Parent = nil
  487. LH.Parent = nil
  488. --
  489. RW.Part0 = ch.Torso
  490. RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  491. RW.C1 = CFrame.new(0, 0.5, 0)
  492. RW.Part1 = ch["Right Arm"]
  493. RW.Parent = ch.Torso
  494. --_G.R = RW
  495. --
  496. LW.Part0 = ch.Torso
  497. LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  498. LW.C1 = CFrame.new(0, 0.5, 0)
  499. LW.Part1 = ch["Left Arm"]
  500. LW.Parent = ch.Torso
  501. --_G.L = LW
  502. --
  503. RWL.Part0 = ch.Torso
  504. RWL.C0 = cf(0, -1.5, 0) --* euler(1.3, 0, -0.5)
  505. RWL.C1 = cf(-0.5, 0.5, 0)
  506. RWL.Part1 = ch["Right Leg"]
  507. RWL.Parent = ch.Torso
  508. --_G.R = RW
  509. --
  510. LWL.Part0 = ch.Torso
  511. LWL.C0 = cf(0, -1.5, 0) --* euler(1.7, 0, 0.8)
  512. LWL.C1 = cf(0.5, 0.5, 0)
  513. LWL.Part1 = ch["Left Leg"]
  514. LWL.Parent = ch.Torso
  515. --_G.L = LW
  516. --
  517. Neck.C0=necko*euler(0.2,0,0)
  518. LW.C0 = cf(-1.5,0.5,0) * euler(-0.2,0,0)
  519. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  520. RW.C0 = cf(1.5,0.5,0) * euler(-0.3,0,0.1)
  521. RW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  522. RWL.C0 = cf(0,-0.5,0) * euler(1,0,0.1)
  523. RWL.C1 = cf(-0.5,1.5,0) * euler(0,0,0)
  524. LWL.C0 = cf(0,-0.5,0) * euler(1,0,-0.1)
  525. LWL.C1 = cf(0.5,1.5,0) * euler(0,0,0)
  526. --
  527.  
  528. if (script.Parent.className ~= "HopperBin") then
  529. Tool = Instance.new("HopperBin")
  530. Tool.Parent = Backpack
  531. Tool.Name = "Roi"
  532. script.Parent = Tool
  533. end
  534. Bin = script.Parent
  535.  
  536. local bg = it("BodyGyro")
  537. bg.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
  538. bg.P = 20e+003
  539. bg.Parent = nil
  540. bp=it("BodyPosition")
  541. bp.P=2000
  542. bp.D=100
  543. bp.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  544.  
  545. so = function(id,par,vol,pit)
  546. coroutine.resume(coroutine.create(function()
  547. local sou = Instance.new("Sound",par or workspace)
  548. sou.Volume=vol
  549. sou.Pitch=pit or 1
  550. sou.SoundId=id
  551. wait()
  552. sou:play()
  553. wait(6)
  554. sou:Remove()
  555. end))
  556. end
  557.  
  558. function hideanim()
  559. equipped=false
  560. wait(0.1)
  561. Torso.Neck.C0=necko
  562. RootJoint.C0=RootCF
  563. end
  564.  
  565. function equipanim()
  566. equipped=true
  567. wait(0.1)
  568. end
  569.  
  570. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  571. return game.Workspace:FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  572. end
  573.  
  574. function attackone()
  575. attack=true
  576. idle=false
  577. closefistl()
  578. for i=0,1,0.1 do
  579. wait()
  580. RootJoint.C0=RootCF*euler(0,0,1*i)
  581. torswld5.C0=euler(0,1*i,0)*cf(0,0.8,0.2)
  582. larmwld11.C0=euler(-0.5,0,0.2+1.3*i)*cf(1*i,0.8-0.1*i,0)
  583. end
  584. con1=lfist12.Touched:connect(function(hit) Damagefunc1(hit,20,5) end)
  585. so("http://roblox.com/asset/?id=10209640",lfist12,1,0.5)
  586. for i=0,1,0.2 do
  587. wait()
  588. RootJoint.C0=RootCF*euler(0,0,1-2.3*i)
  589. torswld5.C0=euler(0,1-2.3*i,0)*cf(0,0.8,0.2)
  590. larmwld11.C0=euler(-0.5+0.5*i,0.5*i,1.5)*cf(1,0.8-0.1,0)
  591. end
  592. closefistr()
  593. for i=0,1,0.2 do
  594. wait()
  595. RootJoint.C0=RootCF*euler(0,0,1-2.3-0.2*i)
  596. torswld5.C0=euler(0,1-2.3-0.2*i,0)*cf(0,0.8,0.2)
  597. larmwld11.C0=euler(0,0.5,1.5)*cf(1,0.8-0.1,0)
  598. end
  599. con1:disconnect()
  600. openfistl()
  601. torswld5.C0=euler(0,0,0)*cf(0,0.8,0.2)
  602. end
  603.  
  604. function attacktwo()
  605. attack=true
  606. idle=false
  607. con1=rfist12.Touched:connect(function(hit) Damagefunc1(hit,30,30) end)
  608. so("http://roblox.com/asset/?id=10209640",rfist12,1,0.6)
  609. for i=0,1,0.2 do
  610. wait()
  611. RootJoint.C0=RootCF*euler(0,0,-1.5+2.8*i)
  612. torswld5.C0=euler(0,1-2.5+2.8*i,0)*cf(0,0.8,0.2)
  613. larmwld11.C0=euler(0,0.5,1.5)*cf(1,0.8-0.1,0)
  614. rarmwld11.C0=euler(-0.5+0.5*i,0,-0.2-1.3*i)*cf(-1*i,0.8-0.1*i,0)
  615. end
  616. for i=0,1,0.2 do
  617. wait()
  618. RootJoint.C0=RootCF*euler(0,0,-1.5+2.8+0.2*i)
  619. torswld5.C0=euler(0,1-2.5+2.8+0.2*i,0)*cf(0,0.8,0.2)
  620. larmwld11.C0=euler(0,0.5,1.5)*cf(1,0.8-0.1,0)
  621. end
  622. con1:disconnect()
  623. openfistr()
  624. for i=0,1,0.1 do
  625. wait()
  626. RootJoint.C0=RootCF*euler(0,0,1.5-1.5*i)
  627. torswld5.C0=euler(0,1.5-1.5*i,0)*cf(0,0.8,0.2)
  628. larmwld11.C0=euler(-0.5*i,0.5-0.5*i,1.5-1.3*i)*cf(1-1*i,0.8-0.1+0.1*i,0)
  629. rarmwld11.C0=euler(-0.5*i,0,-1.5+1.3*i)*cf(-1+1*i,0.8-0.1+0.1*i,0)
  630. --[[
  631. larmwld11.C0=euler(-0.5+0.2*i,0,0.2)*cf(0,0.8,0)
  632. rarmwld11.C0=euler(-0.5+0.2*i,0,-0.2)*cf(0,0.8,0)]]
  633. end
  634. torswld5.C0=euler(0,0,0)*cf(0,0.8,0.2)
  635. attack=false
  636. end
  637.  
  638. function MovingPunch()
  639. attack=true
  640. closefistr()
  641. con1=rfist12.Touched:connect(function(hit) Damagefunc1(hit,30,30) end)
  642. so("http://roblox.com/asset/?id=10209640",rfist12,1,0.4)
  643. for i=0,1,0.1 do
  644. wait()
  645. rarmwld11.C0=euler(-0.5-1.5*i,0,-1.2-0.37*i)*cf(-1+1*i,0.7,0.5*i)
  646. rarmwld12.C0=euler(0.5-0.5*i,0,0.2-0.2*i)*cf(0,0.8,0)
  647. rarmwld13.C0=cf(0,1,0)*euler(-1.2+1.2*i,0,-0.2+0.2*i)
  648. end
  649. for i=0,1,0.1 do
  650. wait()
  651. rarmwld11.C0=euler(-0.5-1.5-0.2*i,0,-1.2-0.37)*cf(-1+1,0.7,0.5)
  652. end
  653. con1:disconnect()
  654. openfistr()
  655. for i=0,1,0.1 do
  656. wait()
  657. rarmwld11.C0=euler(-0.5-1.7+1.7*i,0,-1.2-0.37+0.37*i)*cf(-1*i,0.7,0.5-0.5*i)
  658. rarmwld12.C0=euler(0.5*i,0,0.2*i)*cf(0,0.8,0)
  659. rarmwld13.C0=cf(0,1,0)*euler(-1.2*i,0,-0.2*i)
  660. end
  661. torswld5.C0=euler(0,0,0)*cf(0,0.8,0.2)
  662. rarmwld11.C0=euler(-0.5,0,-0.2-1)*cf(-1,0.8-0.1,0)
  663. rarmwld12.C0=euler(0.5,0,0.2)*cf(0,0.8,0)
  664. rarmwld13.C0=cf(0,1,0)*euler(-1.2,0,-0.2)
  665. attack=false
  666. end
  667.  
  668. function punchone()
  669. attack=true
  670. idle=false
  671. --[[
  672. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.2)
  673. RW.C0 = cf(1.5,0.5,0) * euler(0,0,0.2)
  674. ]]
  675. closefistl()
  676. for i=0,1,0.1 do
  677. wait()
  678. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.2-1.37*i)
  679. lfistwld1.C0=euler(-0.6-0.97*i,0.2,0)*cf(4,-2+2*i,1)
  680. end
  681. con1=lfist12.Touched:connect(function(hit) Damagefunc1(hit,20,10) end)
  682. so("http://roblox.com/asset/?id=10209640",lfist12,1,0.5)
  683. for i=0,1,0.2 do
  684. wait()
  685. LW.C0 = cf(-1.5,0.5,0) * euler(0,-1.2*i,-1.57)
  686. lfistwld1.C0=euler(-1.57,0.2,0)*cf(4,0,1)*euler(0,1.2*i,0)
  687. end
  688. for i=0,1,0.2 do
  689. wait()
  690. LW.C0 = cf(-1.5,0.5,0) * euler(0,-1.2-0.2*i,-1.57)
  691. lfistwld1.C0=euler(-1.57,0.2,0)*cf(4,0,1)*euler(0,1.2+0.2*i,0)
  692. end
  693. con1:disconnect()
  694. openfistl()
  695. end
  696.  
  697. function punchtwo()
  698. attack=true
  699. idle=false
  700. for i=0,1,0.1 do
  701. wait()
  702. RootJoint.C0=euler(-1.57,0,3.14)*euler(0,0,1*i)
  703. lfistwld1.C0=euler(-1.57,0.2,0)*cf(4,0,1)*euler(0,1.4-1.4*i,0)
  704. end
  705. attack=false
  706. end
  707.  
  708. function RocketPunch()
  709. Humanoid.WalkSpeed=0
  710. attack=true
  711. idle=false
  712. for i=0,1,0.2 do
  713. wait()
  714. RootJoint.C0=RootCF*euler(0,0,-1*i)
  715. torswld5.C0=euler(0,-1*i,0)*cf(0,0.8,0.2)
  716. rarmwld11.C0=euler(-0.5+0.5*i,0,-0.2)*cf(0,0.8,0)
  717. rarmwld13.C0=cf(0,1,0)*euler(-1.2+1.2*i,0,-0.2+0.2*i)
  718. end
  719. for i=0,1,0.2 do
  720. wait()
  721. RootJoint.C0=RootCF*euler(0,0,-1+2.5*i)
  722. torswld5.C0=euler(0,-1+2.5*i,0)*cf(0,0.8,0.2)
  723. rarmwld11.C0=euler(-1.57*i,1.57*i,-0.2+0.2*i)*cf(0,0.8,0)
  724. rarmwld12.C0=euler(0.5-0.5*i,-1.57*i,0.2-0.2*i)*cf(0,0.8,0)
  725. --rarmwld13.C0=cf(0,1,0)*euler(-1.2+1.2*i,0,-0.2+0.2*i)
  726. end
  727. so("http://www.roblox.com/asset/?id=2697431",rfist12,1,0.2)
  728. disconnect=false
  729. con1=rfist12.Touched:connect(function(hit)
  730. disconnect=true
  731. Damagefunc1(hit,30,30) end)
  732. rfistwld1.Part1=nil
  733. rfist1.CanCollide=true
  734. rfist12.CanCollide=true
  735. rfist1.CFrame=rfist1.CFrame*cf(0,-2,0)
  736. rfist1.Velocity=MMouse.Hit.lookVector * 70
  737. bv=Instance.new("BodyVelocity")
  738. bv.Parent=rfist1
  739. bv.maxForce=Vector3.new(4e+020, 4e+020, 4e+020)
  740. bv.velocity=MMouse.Hit.lookVector * 70
  741. gy=Instance.new("BodyGyro")
  742. gy.Parent=rfist1
  743. gy.maxTorque = Vector3.new(999999999999,99999999999999999,0)
  744. gy.cframe = CFrame.new(gy.Parent.Position, MMouse.Hit.p)*euler(1.57,1.57,0)
  745. bf=Instance.new("BodyForce")
  746. bf.Parent=rfist1
  747. mass=rfist1:GetMass()+rfist2:GetMass()+rfist3:GetMass()+rfist4:GetMass()+rfist5:GetMass()+rfist6:GetMass()+rfist7:GetMass()+rfist8:GetMass()+rfist9:GetMass()+rfist10:GetMass()+rfist11:GetMass()+rfist12:GetMass()
  748. bf.force=Vector3.new(0, 196.2 * mass, 0)
  749. -- rfistwld1=weld(rfist1,rfist1,rarm13,euler(0,0,0)*cf(0,1,0))
  750. wait()
  751. rfist1.Velocity=MMouse.Hit.lookVector * 120
  752. numb=0
  753. for i=1,100 do
  754. if numb<=5 then
  755. numb=numb+1
  756. else
  757. numb=0
  758. end
  759. local target=findNearestTorso(rfist1.Position,50)
  760. if target~=nil then
  761. bv.velocity=(target.Position-rfist1.Position).unit*70
  762. gy.cframe = CFrame.new(gy.Parent.Position, target.Position)*euler(1.57,1.57,0)
  763. --rfist1.Velocity=MMouse.Hit.lookVector * 70
  764. else
  765. bv.velocity=MMouse.Hit.lookVector * 70
  766. gy.cframe = CFrame.new(gy.Parent.Position, MMouse.Hit.p)*euler(1.57,1.57,0)
  767. end
  768. if disconnect==false then
  769. wait()
  770. end
  771. end
  772. so("http://www.roblox.com/asset/?id=2101148",rfist12,1,0.6)
  773. boomcf=rfist12.CFrame
  774. MagicCircle(BrickColor.new("Bright red"),boomcf,1,1,1,5,5,5)
  775. for i=1,2 do
  776. MagicRing(BrickColor.new("Bright red"),boomcf*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),1,1,1,2,2,2)
  777. end
  778. con1:disconnect()
  779. bv.Parent=nil
  780. gy.Parent=nil
  781. bf.Parent=nil
  782. rfist1.CanCollide=false
  783. rfist12.CanCollide=false
  784. rfist1.Anchored=false
  785. rfistwld1.Part1=rarm13
  786. RootJoint.C0=RootCF*euler(0,0,0)
  787. torswld5.C0=euler(0,0,0)*cf(0,0.8,0.2)
  788. rarmwld11.C0=euler(-0.5,0,-0.2)*cf(0,0.8,0)
  789. rarmwld12.C0=euler(0.5,0,0.2)*cf(0,0.8,0)
  790. rarmwld13.C0=cf(0,1,0)*euler(-1.2,0,-0.2)
  791. attack=false
  792. Humanoid.WalkSpeed=16
  793. end
  794.  
  795. function Rockets()
  796. attack=true
  797. holdrockets=true
  798. for i=0,1,0.1 do
  799. wait()
  800. rarmwld5.C0=euler(-0.6*i,0,0)*cf(0,-0.4,-1)
  801. end
  802. rocketnumb=1
  803. while holdrockets==true do
  804. if rocketnumb==1 then
  805. rocketnumb=2
  806. item=rocketlaunchparts[1]
  807. shoottrail(mouse,item)
  808. elseif rocketnumb==2 then
  809. rocketnumb=3
  810. item=rocketlaunchparts[2]
  811. shoottrail(mouse,item)
  812. elseif rocketnumb==3 then
  813. rocketnumb=1
  814. item=rocketlaunchparts[3]
  815. holdrockets=false
  816. shoottrail(mouse,item)
  817. end
  818. wait(0.5)
  819. end
  820. for i=0,1,0.1 do
  821. wait()
  822. rarmwld5.C0=euler(-0.6+0.6*i,0,0)*cf(0,-0.4,-1)
  823. end
  824. attack=false
  825. end
  826.  
  827. function LightningOrb()
  828. attack=true
  829. for i=0,1,0.1 do
  830. wait()
  831. torswld1.C0=euler(0.2+2*i,0,0)*cf(-3,2.3-2*i,-3*i)
  832. LW.C0 = cf(-1.5,0.5,0) * euler(-0.2-1*i,0,0)
  833. RW.C0 = cf(1.5,0.5,0) * euler(-0.3-0.9*i,0,0.1)
  834. RWL.C0 = cf(0,-0.5,0) * euler(1+0.5*i,0,0.1-0.1*i)
  835. RWL.C1 = cf(-0.5,1.5-1.5*i,-0.5*i) * euler(-1.57*i,0,0)
  836. LWL.C0 = cf(0,-0.5,0) * euler(1+0.5*i,0,-0.1+0.1*i)
  837. LWL.C1 = cf(0.5,1.5-1.5*i,-0.5*i) * euler(-1.57*i,0,0)
  838. larmwld5.C0=euler(-0.8*i,0,0)*cf(0,-0.4,-1)
  839. end
  840. coroutine.resume(coroutine.create(function()
  841. for i=0,1,0.1 do
  842. wait()
  843. torswld1.C0=euler(0.2+2,0,0)*cf(-3,2.3-2,-3)
  844. torswld1.C1=euler(3*i,0,0)*cf(0,0,0)
  845. LW.C0 = cf(-1.5,0.5,0) * euler(-1.2+2.4*i,0,0)
  846. RW.C0 = cf(1.5,0.5,0) * euler(-1.2+2.4*i,0,0.1)
  847. RWL.C1 = cf(-0.5,1.5*i,-0.5+0.5*i) * euler(-1.57+1.57*i,0,0)
  848. LWL.C1 = cf(0.5,1.5*i,-0.5+0.5*i) * euler(-1.57+1.57*i,0,0)
  849. end
  850. for i=0,1,0.1 do
  851. wait()
  852. torswld1.C0=euler(0.2+2,0,0)*cf(-3,2.3-2,-3)
  853. torswld1.C1=euler(3+0.1*i,0,0)*cf(0,-1.5*i,0)
  854. LW.C0 = cf(-1.5,0.5,0) * euler(1.2+0.8*i,0,0)
  855. RW.C0 = cf(1.5,0.5,0) * euler(1.2+0.8*i,0,0.1)
  856. RWL.C0 = cf(0,-0.5,0) * euler(1.5-1.4*i,0,0.2*i)
  857. LWL.C0 = cf(0,-0.5,0) * euler(1.5-1.5*i,0,-0.2*i)
  858. end
  859. for i=0,1,0.1 do
  860. wait()
  861. torswld1.C0=euler(0.2+2,0,0)*cf(-3,2.3-2,-3)
  862. torswld1.C1=euler(3.1-0.7*i,0,0.5*i)*cf(1*i,-1.5,0)
  863. LW.C0 = cf(-1.5+0.5*i,0.5,-0.5*i) * euler(2-1*i,0,0.4*i)
  864. RW.C0 = cf(1.5,0.5,0) * euler(2-1*i,0,0.1+0.2*i)
  865. end
  866. end))
  867. numb=0
  868. for i=0,2,0.1 do
  869. wait(0.1)
  870. --Lightning(p0,p1,tym,ofs,col,th,tra)
  871. Lightning(larm17.Position+vt(math.random(-1,1),math.random(-1,1),math.random(-1,1)),larm17.Position+vt(math.random(-1,1),math.random(-1,1),math.random(-1,1)),3,1,"Bright yellow",0.05,0.5)
  872. if numb<=5 then
  873. numb=numb+1
  874. else
  875. numb=0
  876. MagicCircle(BrickColor.new("Bright yellow"),larm17.CFrame,0.5,0.5,0.5,1,1,1)
  877. end
  878. end
  879. shoottrail2(mouse,larm17)
  880. wait(1)
  881. for i=0,1,0.1 do
  882. wait()
  883. torswld1.C0=euler(2.2-1.5*i,0,0)*cf(-3,0.3-0.3*i,-3+3*i)
  884. torswld1.C1=euler(2.4-2.4*i,0,0.5-0.5*i)*cf(1-1*i,-1.5-0.5*i,1*i)
  885. LW.C0 = cf(-1.5+0.5-0.5*i,0.5,-0.5+0.5*i) * euler(1-2*i,0,0.4-0.4*i)
  886. RW.C0 = cf(1.5,0.5,0) * euler(1-2*i,0,0.3-0.3*i)
  887. RWL.C0 = cf(0,-0.5,0) * euler(0.1+1.2*i,0,0.2-0.2*i)
  888. LWL.C0 = cf(0,-0.5,0) * euler(1.3*i,0,-0.2+0.2*i)
  889. larmwld5.C0=euler(-0.8+0.8*i,0,0)*cf(0,-0.4,-1)
  890. end
  891. for i=0,1,0.1 do
  892. wait()
  893. torswld1.C0=euler(0.7-0.5*i,0,0)*cf(-3,2.3*i,0)
  894. torswld1.C1=euler(0,0,0)*cf(0,-2+2*i,1-1*i)
  895. LW.C0 = cf(-1.5,0.5,0) * euler(-1+0.8*i,0,0)
  896. RW.C0 = cf(1.5,0.5,0) * euler(-1+0.7*i,0,0.1*i)
  897. RWL.C0 = cf(0,-0.5,0) * euler(1.3-0.3*i,0,0.1*i)
  898. LWL.C0 = cf(0,-0.5,0) * euler(1.3-0.3*i,0,-0.1*i)
  899. end
  900. attack=false
  901. end
  902.  
  903. function closefistl()
  904. coroutine.resume(coroutine.create(function()
  905. for i=0,1,0.1 do
  906. wait()
  907. lfistwld6.C0=euler(0,0,-0.2-0.4*i)*cf(0.2,0.7,0)
  908. lfistwld7.C0=euler(0,0,-0.2-0.4*i)*cf(0,0.6,0.5)
  909. lfistwld8.C0=euler(0,0,-0.4-0.2*i)*cf(-0.1,0.6,0.175)
  910. lfistwld9.C0=euler(0,0,-0.4-0.2*i)*cf(-0.1,0.6,-0.175)
  911. lfistwld10.C0=euler(0,0,-0.4-0.2*i)*cf(-0.1,0.6,-0.5)
  912. end
  913. end))
  914. end
  915. function openfistl()
  916. coroutine.resume(coroutine.create(function()
  917. for i=0,1,0.1 do
  918. wait()
  919. lfistwld6.C0=euler(0,0,-0.2-0.4+0.4*i)*cf(0.2,0.7,0)
  920. lfistwld7.C0=euler(0,0,-0.2-0.4+0.4*i)*cf(0,0.6,0.5)
  921. lfistwld8.C0=euler(0,0,-0.4-0.2+0.2*i)*cf(-0.1,0.6,0.175)
  922. lfistwld9.C0=euler(0,0,-0.4-0.2+0.2*i)*cf(-0.1,0.6,-0.175)
  923. lfistwld10.C0=euler(0,0,-0.4-0.2+0.2*i)*cf(-0.1,0.6,-0.5)
  924. end
  925. end))
  926. end
  927.  
  928. function closefistr()
  929. coroutine.resume(coroutine.create(function()
  930. for i=0,1,0.1 do
  931. wait()
  932. rfistwld6.C0=euler(0,0,0.2+0.4*i)*cf(-0.2,0.7,0)
  933. rfistwld7.C0=euler(0,0,0.2+0.4*i)*cf(0,0.6,0.5)
  934. rfistwld8.C0=euler(0,0,0.4+0.2*i)*cf(0.1,0.6,0.175)
  935. rfistwld9.C0=euler(0,0,0.4+0.2*i)*cf(0.1,0.6,-0.175)
  936. rfistwld10.C0=euler(0,0,0.4+0.2*i)*cf(0.1,0.6,-0.5)
  937. end
  938. end))
  939. end
  940. function openfistr()
  941. coroutine.resume(coroutine.create(function()
  942. for i=0,1,0.1 do
  943. wait()
  944. rfistwld6.C0=euler(0,0,0.2+0.4-0.4*i)*cf(-0.2,0.7,0)
  945. rfistwld7.C0=euler(0,0,0.2+0.4-0.4*i)*cf(0,0.6,0.5)
  946. rfistwld8.C0=euler(0,0,0.4+0.2-0.2*i)*cf(0.1,0.6,0.175)
  947. rfistwld9.C0=euler(0,0,0.4+0.2-0.2*i)*cf(0.1,0.6,-0.175)
  948. rfistwld10.C0=euler(0,0,0.4+0.2-0.2*i)*cf(0.1,0.6,-0.5)
  949. end
  950. end))
  951. end
  952.  
  953. function idlefistr()
  954. coroutine.resume(coroutine.create(function()
  955. for i=0,1,0.1 do
  956. wait()
  957. rfistwld6.C0=euler(0,0,0.2+0.4*i)*cf(-0.2+0.1*i,0.7,0)
  958. end
  959. wait(0.1)
  960. for i=0,1,0.1 do
  961. wait()
  962. rfistwld6.C0=euler(0,0,0.6-0.6*i)*cf(-0.2+0.1-0.1*i,0.7,0)
  963. end
  964. for i=0,1,0.1 do
  965. wait()
  966. rfistwld6.C0=euler(0,0,0.2*i)*cf(-0.2,0.7,0)
  967. end
  968. end))
  969. coroutine.resume(coroutine.create(function()
  970. wait(0.2)
  971. for i=0,1,0.1 do
  972. wait()
  973. rfistwld7.C0=euler(0,0,0.2+0.6*i)*cf(0.1*i,0.6,0.5)
  974. end
  975. wait(0.1)
  976. for i=0,1,0.1 do
  977. wait()
  978. rfistwld7.C0=euler(0,0,0.8-0.8*i)*cf(0.1-0.1*i,0.6,0.5)
  979. end
  980. for i=0,1,0.1 do
  981. wait()
  982. rfistwld7.C0=euler(0,0,0.2*i)*cf(0,0.6,0.5)
  983. end
  984. end))
  985. coroutine.resume(coroutine.create(function()
  986. wait(0.15)
  987. for i=0,1,0.1 do
  988. wait()
  989. rfistwld8.C0=euler(0,0,0.4+0.4*i)*cf(0.1,0.6,0.175)
  990. end
  991. wait(0.1)
  992. for i=0,1,0.1 do
  993. wait()
  994. rfistwld8.C0=euler(0,0,0.8-0.8*i)*cf(0.1-0.1*i,0.6,0.175)
  995. end
  996. for i=0,1,0.1 do
  997. wait()
  998. rfistwld8.C0=euler(0,0,0.4*i)*cf(0.1*i,0.6,0.175)
  999. end
  1000. end))
  1001. coroutine.resume(coroutine.create(function()
  1002. wait(0.1)
  1003. for i=0,1,0.1 do
  1004. wait()
  1005. rfistwld9.C0=euler(0,0,0.4+0.4*i)*cf(0.1,0.6,-0.175)
  1006. end
  1007. wait(0.1)
  1008. for i=0,1,0.1 do
  1009. wait()
  1010. rfistwld9.C0=euler(0,0,0.8-0.8*i)*cf(0.1-0.1*i,0.6,-0.175)
  1011. end
  1012. for i=0,1,0.1 do
  1013. wait()
  1014. rfistwld9.C0=euler(0,0,0.4*i)*cf(0.1*i,0.6,-0.175)
  1015. end
  1016. end))
  1017. coroutine.resume(coroutine.create(function()
  1018. for i=0,1,0.1 do
  1019. wait()
  1020. rfistwld10.C0=euler(0,0,0.4+0.4*i)*cf(0.1,0.6,-0.5)
  1021. end
  1022. wait(0.1)
  1023. for i=0,1,0.1 do
  1024. wait()
  1025. rfistwld10.C0=euler(0,0,0.8-0.8*i)*cf(0.1-0.1*i,0.6,-0.5)
  1026. end
  1027. for i=0,1,0.1 do
  1028. wait()
  1029. rfistwld10.C0=euler(0,0,0.4*i)*cf(0.1*i,0.6,-0.5)
  1030. end
  1031. end))
  1032. end
  1033.  
  1034. function idlefistl()
  1035. coroutine.resume(coroutine.create(function()
  1036. for i=0,1,0.1 do
  1037. wait()
  1038. lfistwld6.C0=euler(0,0,-0.2-0.4*i)*cf(0.2-0.1*i,0.7,0)
  1039. end
  1040. wait(0.1)
  1041. for i=0,1,0.1 do
  1042. wait()
  1043. lfistwld6.C0=euler(0,0,-0.6+0.6*i)*cf(0.2-0.1+0.1*i,0.7,0)
  1044. end
  1045. for i=0,1,0.1 do
  1046. wait()
  1047. lfistwld6.C0=euler(0,0,-0.2*i)*cf(0.2,0.7,0)
  1048. end
  1049. end))
  1050. coroutine.resume(coroutine.create(function()
  1051. wait(0.2)
  1052. for i=0,1,0.1 do
  1053. wait()
  1054. lfistwld7.C0=euler(0,0,-0.2-0.6*i)*cf(-0.1*i,0.6,0.5)
  1055. end
  1056. wait(0.1)
  1057. for i=0,1,0.1 do
  1058. wait()
  1059. lfistwld7.C0=euler(0,0,-0.8+0.8*i)*cf(-0.1+0.1*i,0.6,0.5)
  1060. end
  1061. for i=0,1,0.1 do
  1062. wait()
  1063. lfistwld7.C0=euler(0,0,-0.2*i)*cf(0,0.6,0.5)
  1064. end
  1065. end))
  1066. coroutine.resume(coroutine.create(function()
  1067. wait(0.15)
  1068. for i=0,1,0.1 do
  1069. wait()
  1070. lfistwld8.C0=euler(0,0,-0.4-0.4*i)*cf(-0.1,0.6,0.175)
  1071. end
  1072. wait(0.1)
  1073. for i=0,1,0.1 do
  1074. wait()
  1075. lfistwld8.C0=euler(0,0,-0.8+0.8*i)*cf(-0.1+0.1*i,0.6,0.175)
  1076. end
  1077. for i=0,1,0.1 do
  1078. wait()
  1079. lfistwld8.C0=euler(0,0,-0.4*i)*cf(-0.1*i,0.6,0.175)
  1080. end
  1081. end))
  1082. coroutine.resume(coroutine.create(function()
  1083. wait(0.1)
  1084. for i=0,1,0.1 do
  1085. wait()
  1086. lfistwld9.C0=euler(0,0,-0.4-0.4*i)*cf(-0.1,0.6,-0.175)
  1087. end
  1088. wait(0.1)
  1089. for i=0,1,0.1 do
  1090. wait()
  1091. lfistwld9.C0=euler(0,0,-0.8+0.8*i)*cf(-0.1+0.1*i,0.6,-0.175)
  1092. end
  1093. for i=0,1,0.1 do
  1094. wait()
  1095. lfistwld9.C0=euler(0,0,-0.4*i)*cf(-0.1*i,0.6,-0.175)
  1096. end
  1097. end))
  1098. coroutine.resume(coroutine.create(function()
  1099. for i=0,1,0.1 do
  1100. wait()
  1101. lfistwld10.C0=euler(0,0,-0.4-0.4*i)*cf(-0.1,0.6,-0.5)
  1102. end
  1103. wait(0.1)
  1104. for i=0,1,0.1 do
  1105. wait()
  1106. lfistwld10.C0=euler(0,0,-0.8+0.8*i)*cf(-0.1+0.1*i,0.6,-0.5)
  1107. end
  1108. for i=0,1,0.1 do
  1109. wait()
  1110. lfistwld10.C0=euler(0,0,-0.4*i)*cf(-0.1*i,0.6,-0.5)
  1111. end
  1112. end))
  1113. end
  1114.  
  1115. function Aim()
  1116. aiming=true
  1117. coroutine.resume(coroutine.create(function()
  1118. bg.maxTorque = vt(math.huge,math.huge,math.huge)
  1119. bg.P = 9000
  1120. bg.Parent = Torso
  1121. --wld1.C0 = euler(0,0,0) * cf(0,0,0)
  1122. while aiming==true do
  1123. wait()
  1124. local pos4 = vt(workspace.CurrentCamera.CoordinateFrame.X,RootPart.Position.Y,workspace.CurrentCamera.CoordinateFrame.Z)
  1125. bg.cframe = cf(RootPart.Position,pos4) * euler(0,3.14,0) * cf(0,0,0) --cf(Torso.Position,MMouse.Hit.p) *
  1126. bg.Parent = RootPart
  1127. local pos5 = Vector3.new(MMouse.Hit.p.x,RootPart.Position.Y,MMouse.Hit.p.z)
  1128. offset=(Torso.Position.y-MMouse.Hit.p.y)/60
  1129. mag=(Torso.Position-MMouse.Hit.p).magnitude/80
  1130. offset=offset/mag
  1131. end
  1132. for i=0,1,0.1 do
  1133. wait()
  1134. bg.Parent=nil
  1135. end
  1136. end))
  1137. end
  1138.  
  1139. function NoAim()
  1140. aiming=false
  1141. end
  1142.  
  1143. spread=0
  1144. range=500
  1145. rangepower=10
  1146. function shoottrail(mouse,baseprt)
  1147. so("http://www.roblox.com/asset/?id=2697431",baseprt,1,0.5)
  1148. MagicBlock(BrickColor.new("Bright red"),baseprt.CFrame,0.1,0.1,0.1,1,1,1)
  1149. coroutine.resume(coroutine.create(function(v)
  1150. local spreadvector = (Vector3.new(math.random(-spread,spread),math.random(-spread,spread),math.random(-spread,spread))) * (baseprt.Position-MMouse.Hit.p).magnitude/100
  1151. local dir = CFrame.new((baseprt.Position+MMouse.Hit.p)/2,MMouse.Hit.p+spreadvector)
  1152. local hit,pos = rayCast(baseprt.Position,dir.lookVector,10,Character)
  1153. local rangepos = range
  1154. local function drawtrail(From,To)
  1155. local effectsmsh = Instance.new("CylinderMesh")
  1156. effectsmsh.Scale = Vector3.new(1,1,1)
  1157. effectsmsh.Name = "Mesh"
  1158. local effectsg = Instance.new("Part")
  1159. effectsg.formFactor = 3
  1160. effectsg.CanCollide = false
  1161. effectsg.Name = "Eff"
  1162. effectsg.Locked = true
  1163. effectsg.Anchored = true
  1164. effectsg.Size = Vector3.new(0.2,0.2,0.2)
  1165. effectsg.Parent = modelzorz
  1166. effectsmsh.Parent = effectsg
  1167. effectsg.BrickColor = BrickColor.new("Bright red")
  1168. effectsg.Reflectance = 0.25
  1169. local LP = From
  1170. local point1 = To
  1171. --[[if target~=nil then
  1172. LP=targetted
  1173. end]]
  1174. local mg = (LP - point1).magnitude
  1175. effectsmsh.Scale = Vector3.new(3,mg*5,3)
  1176. effectsg.CFrame = CFrame.new((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0)
  1177. MagicBlock(BrickColor.new("Bright red"),effectsg.CFrame,0.1,0.1,0.1,0.5,0.5,0.5)
  1178. coroutine.resume(coroutine.create(function()
  1179. for i = 0 , 1 , 0.2 do
  1180. wait()
  1181. effectsg.Transparency = 1*i
  1182. effectsmsh.Scale = Vector3.new(3-3*i,mg*5,3-3*i)
  1183. end
  1184. effectsg.Parent = nil
  1185. end))
  1186. end
  1187. local newpos = baseprt.Position
  1188. local inc = rangepower
  1189. repeat
  1190. wait() wait()
  1191. rangepos = rangepos - 10
  1192. dir = dir * CFrame.Angles(math.rad(-0.5),0,0)
  1193. hit,pos = rayCast(newpos,dir.lookVector,inc,Character)
  1194. drawtrail(newpos,pos)
  1195. newpos = newpos + (dir.lookVector * inc)
  1196. if inc >= 20 then
  1197. inc = inc - 10
  1198. end
  1199. if hit ~= nil then
  1200. rangepos = 0
  1201. end
  1202. until rangepos <= 0
  1203. if hit ~= nil then
  1204. so("http://www.roblox.com/asset/?id=2101148",hit,1,0.6)
  1205. MagicCircle(BrickColor.new("Bright red"),CFrame.new(pos),0.5,0.5,0.5,2,2,2)
  1206. MagicRing(BrickColor.new("Bright red"),CFrame.new(pos)*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)),0.5,0.5,0.5,0.5,0.5,0.5)
  1207. if hit.Parent:FindFirstChild("Humanoid") ~= nil then
  1208. hum = hit.Parent.Humanoid
  1209. tTorso=hit.Parent.Torso
  1210. Damagefunc1(hit,10,20)
  1211. --ADmg(hum,hit)
  1212. elseif hit.Parent.Parent ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
  1213. hum = hit.Parent.Parent.Humanoid
  1214. tTorso=hit.Parent.Parent.Torso
  1215. Damagefunc1(hit.Parent.Parent.Torso,10,20)
  1216. --ADmg(hum,hit)
  1217. end
  1218. end
  1219. end))
  1220. end
  1221.  
  1222. lightningdebounce=false
  1223. function shoottrail2(mouse,baseprt)
  1224. coroutine.resume(coroutine.create(function(v)
  1225. local spreadvector = (Vector3.new(math.random(-spread,spread),math.random(-spread,spread),math.random(-spread,spread))) * (baseprt.Position-MMouse.Hit.p).magnitude/100
  1226. local dir = CFrame.new((baseprt.Position+MMouse.Hit.p)/2,MMouse.Hit.p+spreadvector)
  1227. local hit,pos = rayCast(baseprt.Position,dir.lookVector,10,Character)
  1228. local rangepos = range*2
  1229. local function drawtrail(From,To)
  1230. local effectsmsh = Instance.new("SpecialMesh")
  1231. effectsmsh.MeshType = "Sphere"
  1232. effectsmsh.Scale = Vector3.new(1,1,1)
  1233. effectsmsh.Name = "Mesh"
  1234. local effectsg = Instance.new("Part")
  1235. effectsg.formFactor = 3
  1236. effectsg.CanCollide = false
  1237. effectsg.Name = "Eff"
  1238. effectsg.Locked = true
  1239. effectsg.Anchored = true
  1240. effectsg.Size = Vector3.new(0.2,0.2,0.2)
  1241. effectsg.Parent = modelzorz
  1242. effectsmsh.Parent = effectsg
  1243. effectsg.BrickColor = BrickColor.new("Bright yellow")
  1244. effectsg.Reflectance = 0.25
  1245. local LP = From
  1246. local point1 = To
  1247. --[[if target~=nil then
  1248. LP=targetted
  1249. end]]
  1250. local mg = (LP - point1).magnitude
  1251. effectsmsh.Scale = Vector3.new(5,5,5)
  1252. Lightning(LP+vt(math.random(-1,1),math.random(-1,1),math.random(-1,1)),point1+vt(math.random(-1,1),math.random(-1,1),math.random(-1,1)),6,4,"Bright yellow",0.05,0.5)
  1253. effectsg.CFrame = CFrame.new((LP+point1)/2,point1) * CFrame.Angles(math.rad(90),0,0)
  1254. local target=findNearestTorso(effectsg.Position,20)
  1255. if target~=nil and lightningdebounce==false then
  1256. lightningdebounce=true
  1257. Lightning(effectsg.Position,target.Position,6,1,"Bright yellow",0.05,0.5)
  1258. Damagefunc1(target,1,0)
  1259. so("http://www.roblox.com/asset/?id=10756118",tartet,1,1)
  1260. coroutine.resume(coroutine.create(function()
  1261. wait(0.2)
  1262. lightningdebounce=false
  1263. end))
  1264. end
  1265. coroutine.resume(coroutine.create(function()
  1266. wait(0.1)
  1267. effectsg.Parent = nil
  1268. end))
  1269. end
  1270. local newpos = baseprt.Position
  1271. local inc = rangepower/10
  1272. repeat
  1273. wait() wait()
  1274. rangepos = rangepos - 10
  1275. dir = dir
  1276. hit,pos = rayCast(newpos,dir.lookVector,inc,Character)
  1277. drawtrail(newpos,pos)
  1278. newpos = newpos + (dir.lookVector * inc)
  1279. if inc >= 20 then
  1280. inc = inc - 10
  1281. end
  1282. if hit ~= nil then
  1283. rangepos = 0
  1284. end
  1285. until rangepos <= 0
  1286. if hit ~= nil then
  1287. if hit.Parent:FindFirstChild("Humanoid") ~= nil then
  1288. hum = hit.Parent.Humanoid
  1289. tTorso=hit.Parent.Torso
  1290. Damagefunc1(hit,10,20)
  1291. --ADmg(hum,hit)
  1292. elseif hit.Parent.Parent ~= nil and hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then
  1293. hum = hit.Parent.Parent.Humanoid
  1294. tTorso=hit.Parent.Parent.Torso
  1295. Damagefunc1(hit.Parent.Parent.Torso,10,20)
  1296. --ADmg(hum,hit)
  1297. end
  1298. end
  1299. end))
  1300. end
  1301.  
  1302. function ModeChange()
  1303. canidle=false
  1304. idle=false
  1305. if Mode=="Robot" then
  1306. Mode="Battle"
  1307. rfistwld1.Part1=Torso
  1308. rfistwld1.C0=euler(-1,-0.2,0)*cf(-6,5,2)
  1309. lfistwld1.Part1=Torso
  1310. lfistwld1.C0=euler(-1,0.2,0)*cf(0,5,2)
  1311. for _,v in pairs(modelzorz:children()) do
  1312. if v.className=="Part" then
  1313. coroutine.resume(coroutine.create(function(Part)
  1314. for i=0,1,0.1 do
  1315. wait(0)
  1316. Part.Transparency=Part.Transparency+0.1
  1317. end
  1318. end),v)
  1319. print(v)
  1320. end
  1321. end
  1322. for i=0,1,0.1 do
  1323. wait()
  1324. LW.C0 = cf(-1.5,0.5,0) * euler(-0.2-0.1*i,0,-1.57*i)
  1325. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  1326. RW.C0 = cf(1.5,0.5,0) * euler(-0.3,0,0.1+1.47*i)
  1327. RW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  1328. RWL.C0 = cf(0,-0.5,0) * euler(1-1*i,0,0.1)
  1329. RWL.C1 = cf(-0.5,1.5,0) * euler(0,0,0)
  1330. LWL.C0 = cf(0,-0.5,0) * euler(1-1*i,0,-0.1)
  1331. LWL.C1 = cf(0.5,1.5,0) * euler(0,0,0)
  1332. RootCF=euler(-1.57,0,3.14)*cf(0,0,2.4-2.4*i)
  1333. torswld1.C0=euler(0.2-0.2*i,0,0)*cf(-3+3*i,2.3-(2.3+2.4)*i,0)
  1334. rfistwld1.C0=euler(-1+0.4*i,-0.2,0)*cf(-6+2*i,5-7*i,2-1*i)
  1335. lfistwld1.C0=euler(-1+0.4*i,0.2,0)*cf(4*i,5-7*i,2-1*i)
  1336. end
  1337. workspace.CurrentCamera.CameraSubject=Humanoid
  1338. workspace.CurrentCamera.CameraType = "Custom"
  1339. RootJoint.Part1=Torso
  1340. RootJoint.C0=euler(-1.57,0,3.14)
  1341. RootCF=euler(-1.57,0,3.14)*cf(0,0,2.4-2.4)
  1342. modelzorz.Parent=nil
  1343. rfistwld1.C0=euler(-0.6,-0.2,0)*cf(-4,-2,1)
  1344. lfistwld1.C0=euler(-0.6,0.2,0)*cf(4,-2,1)
  1345. rfistwld1.Parent=rfist1
  1346. --rfistwld1.Part1=Torso
  1347. rfistwld1.Part1=RootPart
  1348. lfistwld1.Parent=lfist1
  1349. --lfistwld1.Part1=Torso
  1350. lfistwld1.Part1=RootPart
  1351. print(lfistwld1.Part0)
  1352. print(lfistwld1.Part1)
  1353. wait(0.1)
  1354. for i=0,1,0.1 do
  1355. wait()
  1356. LW.C0 = cf(-1.5+0.5*i,0.5,-0.5*i) * euler(-0.3+0.3*i,-2.8*i,-1.57+0.5*i)
  1357. RW.C0 = cf(1.5-0.5*i,0.5,-0.5*i) * euler(-0.3+0.3*i,2.8*i,1.57)
  1358. rfistwld1.C1=euler(0,1*i,0)*cf(0,0,0)
  1359. lfistwld1.C1=euler(0,-1*i,0)*cf(0,0,0)
  1360. rfistwld1.C0=euler(-0.6-1*i,-0.2,0)*cf(-4,-2+1*i,1+1*i)
  1361. lfistwld1.C0=euler(-0.6-0.7*i,0.2,0)*cf(4,-2+1*i,1+1*i)
  1362. end
  1363. print(lfistwld1.Part0)
  1364. print(lfistwld1.Part1)
  1365. for i=0,1,0.2 do
  1366. wait()
  1367. Neck.C0=necko*euler(0.2-0.2*i,0,0)
  1368. LW.C0 = cf(-1.5+0.5-0.5*i,0.5,-0.5+0.5*i) * euler(0,-2.8+2.7*i,-1.57+0.5-0.5*i)
  1369. RW.C0 = cf(1.5-0.5+0.5*i,0.5,-0.5+0.5*i) * euler(0,2.8-2.7*i,1.57)
  1370. rfistwld1.C1=euler(0,1-1*i,0)*cf(0,0,0)
  1371. lfistwld1.C1=euler(0,-1+1*i,0)*cf(0,0,0)
  1372. rfistwld1.C0=euler(-1.6,-0.2+1.47*i,0)*cf(-4-1*i,-1,2-2*i)
  1373. lfistwld1.C0=euler(-1.3-0.3,0.2-1.47*i,0)*cf(4+1*i,-1,2-2*i)
  1374. end
  1375. for i=0,1,0.1 do
  1376. wait()
  1377. LW.C0 = cf(-1.5,0.5,0) * euler(0,-0.1+0.1*i,-1.57)
  1378. RW.C0 = cf(1.5,0.5,0) * euler(0,0.1-0.1*i,1.57)
  1379. rfistwld1.C0=euler(-1.6,1.27+0.1*i,0)*cf(-5,-1,0)
  1380. lfistwld1.C0=euler(-1.6,-1.27-0.1*i,0)*cf(5,-1,0)
  1381. end
  1382. for i=0,1,0.1 do
  1383. wait()
  1384. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-1.57+1.37*i)
  1385. RW.C0 = cf(1.5,0.5,0) * euler(0,0,1.57-1.37*i)
  1386. RWL.C0 = cf(0,-0.5,0) * euler(0,0,0.1-0.1*i)
  1387. LWL.C0 = cf(0,-0.5,0) * euler(0,0,-0.1+0.1*i)
  1388. rfistwld1.C0=euler(-1.6+1*i,1.37-1.57*i,0)*cf(-5+1*i,-1-1*i,1*i)
  1389. lfistwld1.C0=euler(-1.6+1*i,-1.37+1.57*i,0)*cf(5-1*i,-1-1*i,1*i)
  1390. end
  1391. RWL.Parent = nil
  1392. LWL.Parent = nil
  1393. RH.Parent = player.Character.Torso
  1394. LH.Parent = player.Character.Torso
  1395. canidle=true
  1396. elseif Mode=="Battle" then
  1397. Mode="Robot"
  1398. workspace.CurrentCamera.CameraSubject=RootPart
  1399. workspace.CurrentCamera.CameraType = "Track"
  1400. modelzorz.Parent=Character
  1401. RootJoint.Part1=tors1
  1402. RootJoint.C0=euler(-1.57,0,3.14)
  1403. rfistwld1.Part1=Torso
  1404. lfistwld1.Part1=Torso
  1405. for e=1,#RobotWelds do
  1406. RobotWelds[e].Parent=Torso
  1407. end
  1408. for _,v in pairs(modelzorz:children()) do
  1409. if v.className=="Part" then
  1410. coroutine.resume(coroutine.create(function(Part)
  1411. for i=0,1,0.1 do
  1412. wait(0)
  1413. Part.Transparency=Part.Transparency-0.1
  1414. end
  1415. if Part.Name~="Torso Hitbox" and Part.Name~="Left Leg Hitbox" and Part.Name~="Right Leg Hitbox" then
  1416. Part.Transparency=0
  1417. end
  1418. end),v)
  1419. end
  1420. end
  1421. player = Player
  1422. ch = Character
  1423. RH = ch.Torso["Right Hip"]
  1424. LH = ch.Torso["Left Hip"]
  1425. --
  1426. RH.Parent = nil
  1427. LH.Parent = nil
  1428. --
  1429. RWL.Part0 = ch.Torso
  1430. RWL.C0 = cf(0, -1.5, 0) --* euler(1.3, 0, -0.5)
  1431. RWL.C1 = cf(-0.5, 0.5, 0)
  1432. RWL.Part1 = ch["Right Leg"]
  1433. RWL.Parent = ch.Torso
  1434. --_G.R = RW
  1435. --
  1436. LWL.Part0 = ch.Torso
  1437. LWL.C0 = cf(0, -1.5, 0) --* euler(1.7, 0, 0.8)
  1438. LWL.C1 = cf(0.5, 0.5, 0)
  1439. LWL.Part1 = ch["Left Leg"]
  1440. LWL.Parent = ch.Torso
  1441. --_G.L = LW
  1442. --
  1443. for i=0,1,0.1 do
  1444. wait()
  1445. Neck.C0=necko*euler(0.6*i,0,0)
  1446. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.2-1.37*i)
  1447. RW.C0 = cf(1.5,0.5,0) * euler(0,0,0.2+1.37*i)
  1448. RWL.C0 = cf(0,-0.5,0) * euler(1*i,0,0.1)
  1449. LWL.C0 = cf(0,-0.5,0) * euler(1*i,0,-0.1)
  1450. rfistwld1.C0=euler(-0.6-0.4*i,-0.2,0)*cf(-4-2*i,-2+7*i,1+1*i)
  1451. lfistwld1.C0=euler(-0.6-0.4*i,0.2,0)*cf(4-4*i,-2+7*i,1+1*i)
  1452. torswld1.C0=euler(0.2*i,0,0)*cf(-3*i,-2.4+(2.3+2.4)*i,0)
  1453. RootCF=euler(-1.57,0,3.14)*cf(0,0,2.4*i)
  1454. RootJoint.C0=RootCF
  1455. end
  1456. RWL.C0 = cf(0,-0.5,0) * euler(1,0,0.1)
  1457. RWL.C1 = cf(-0.5,1.5,0) * euler(0,0,0)
  1458. LWL.C0 = cf(0,-0.5,0) * euler(1,0,-0.1)
  1459. LWL.C1 = cf(0.5,1.5,0) * euler(0,0,0)
  1460. rfistwld1.Part1=rarm13
  1461. rfistwld1.C0=euler(0,0,0)*cf(0,1,0)
  1462. lfistwld1.Part1=larm13
  1463. lfistwld1.C0=euler(0,0,0)*cf(0,1,0)
  1464. wait(0.2)
  1465. closefistl()
  1466. closefistr()
  1467. for i=0,1,0.1 do
  1468. wait()
  1469. Neck.C0=necko*euler(0.6-0.4*i,0,0)
  1470. LW.C0 = cf(-1.5,0.5,0) * euler(2*i,0,-1.57+1.57*i)
  1471. RW.C0 = cf(1.5,0.5,0) * euler(2*i,0,1.57-1.57*i)
  1472. larmwld11.C0=euler(-0.5-1*i,0,0.2-0.2*i)*cf(0,0.8,0)
  1473. rarmwld11.C0=euler(-0.5-1*i,0,-0.2+0.2*i)*cf(0,0.8,0)
  1474. end
  1475. for i=0,1,0.1 do
  1476. wait()
  1477. LW.C0 = cf(-1.5,0.5,0) * euler(2-3*i,0,0)
  1478. RW.C0 = cf(1.5,0.5,0) * euler(2-3*i,0,0)
  1479. larmwld11.C0=euler(-1.5+2*i,0,0)*cf(0,0.8,0)
  1480. rarmwld11.C0=euler(-1.5+2*i,0,0)*cf(0,0.8,0)
  1481. end
  1482. openfistl()
  1483. openfistr()
  1484. for i=0,1,0.1 do
  1485. wait()
  1486. LW.C0 = cf(-1.5,0.5,0) * euler(-1+0.8*i,0,0)
  1487. RW.C0 = cf(1.5,0.5,0) * euler(-1+0.7*i,0,0.1*i)
  1488. larmwld11.C0=euler(0.5-1*i,0,0.2*i)*cf(0,0.8,0)
  1489. rarmwld11.C0=euler(0.5-1*i,0,-0.2*i)*cf(0,0.8,0)
  1490. end
  1491. LW.C0 = cf(-1.5,0.5,0) * euler(-0.2,0,0)
  1492. LW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  1493. RW.C0 = cf(1.5,0.5,0) * euler(-0.3,0,0.1)
  1494. RW.C1 = cf(0, 0.5, 0) * euler(0,0,0)
  1495. canidle=true
  1496. end
  1497. end
  1498.  
  1499. function findNearestTorso(pos,distance)
  1500. local list = game.Workspace:children()
  1501. local torso = nil
  1502. local dist = distance
  1503. local temp = nil
  1504. local human = nil
  1505. local temp2 = nil
  1506. for x = 1, #list do
  1507. temp2 = list[x]
  1508. if (temp2.className == "Model") and (temp2 ~= Character) then
  1509. temp = temp2:findFirstChild("Torso")
  1510. human = temp2:findFirstChild("Humanoid")
  1511. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  1512. if (temp.Position - pos).magnitude < dist then
  1513. torso = temp
  1514. dist = (temp.Position - pos).magnitude
  1515. end
  1516. end
  1517. end
  1518. end
  1519. return torso
  1520. end
  1521.  
  1522. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3)
  1523. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1524. prt.Anchored=true
  1525. prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  1526. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  1527. coroutine.resume(coroutine.create(function(Part,Mesh)
  1528. for i=0,1,0.1 do
  1529. wait()
  1530. Part.CFrame=Part.CFrame
  1531. Part.Transparency=i
  1532. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1533. end
  1534. Part.Parent=nil
  1535. end),prt,msh)
  1536. end
  1537.  
  1538. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3)
  1539. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1540. prt.Anchored=true
  1541. prt.CFrame=cframe
  1542. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  1543. coroutine.resume(coroutine.create(function(Part,Mesh)
  1544. for i=0,1,0.1 do
  1545. wait()
  1546. Part.CFrame=Part.CFrame
  1547. Part.Transparency=i
  1548. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1549. end
  1550. Part.Parent=nil
  1551. end),prt,msh)
  1552. end
  1553.  
  1554. function MagicRing(brickcolor,cframe,x1,y1,z1,x3,y3,z3)
  1555. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  1556. prt.Anchored=true
  1557. prt.CFrame=cframe
  1558. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1))
  1559. coroutine.resume(coroutine.create(function(Part,Mesh)
  1560. for i=0,1,0.03 do
  1561. wait()
  1562. Part.CFrame=Part.CFrame
  1563. Part.Transparency=i
  1564. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  1565. end
  1566. Part.Parent=nil
  1567. end),prt,msh)
  1568. end
  1569.  
  1570. function Lightning(p0,p1,tym,ofs,col,th,tra)
  1571. local magz = (p0 - p1).magnitude local curpos = p0 local trz = {-ofs,ofs}
  1572. for i=1,tym do
  1573. local li = Instance.new("Part",modelzorz) li.TopSurface =0 li.BottomSurface = 0 li.Anchored = true li.Transparency = tra or 0.4 li.BrickColor = BrickColor.new(col)
  1574. li.formFactor = "Custom" li.CanCollide = false li.Size = Vector3.new(th,th,magz/tym) local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)])
  1575. local trolpos = CFrame.new(curpos,p1)*CFrame.new(0,0,magz/tym).p+ofz
  1576. if tym == i then
  1577. local magz2 = (curpos - p1).magnitude li.Size = Vector3.new(th,th,magz2)
  1578. li.CFrame = CFrame.new(curpos,p1)*CFrame.new(0,0,-magz2/2)
  1579. else
  1580. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/tym/2)
  1581. end
  1582. curpos = li.CFrame*CFrame.new(0,0,magz/tym/2).p game.Debris:AddItem(li,.5)
  1583. end
  1584. end
  1585.  
  1586. Damagefunc1=function(hit,Damage,Knockback)
  1587. if hit.Parent==nil then
  1588. return
  1589. end
  1590. CPlayer=Bin
  1591. h=hit.Parent:FindFirstChild("Humanoid")
  1592. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  1593. if attackdebounce == false then
  1594. attackdebounce = true
  1595. coroutine.resume(coroutine.create(function()
  1596. wait(0.2)
  1597. attackdebounce = false
  1598. end))
  1599. Damage=Damage
  1600. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  1601. return
  1602. end]]
  1603. -- hs(hit,1.2)
  1604. c=Instance.new("ObjectValue")
  1605. c.Name="creator"
  1606. c.Value=game.Players.LocalPlayer
  1607. c.Parent=h
  1608. game:GetService("Debris"):AddItem(c,.5)
  1609. Damage=Damage+math.random(0,10)
  1610. -- h:TakeDamage(Damage)
  1611. blocked=false
  1612. block=hit.Parent:findFirstChild("Block")
  1613. if block~=nil then
  1614. print("herp")
  1615. if block.Value>0 then
  1616. blocked=true
  1617. block.Value=block.Value-1
  1618. print(block.Value)
  1619. end
  1620. end
  1621. if blocked==false then
  1622. -- h:TakeDamage(Damage)
  1623. h.Health=h.Health-Damage
  1624. showDamage(hit.Parent,Damage,.5)
  1625. else
  1626. Damage=Damage/2
  1627. h:TakeDamage(Damage)
  1628. showDamage(hit.Parent,Damage,.5)
  1629. end
  1630. vp=Instance.new("BodyVelocity")
  1631. vp.P=500
  1632. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  1633. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  1634. vp.velocity=RootPart.CFrame.lookVector*Knockback+RootPart.Velocity/1.05
  1635. if Knockback>0 then
  1636. vp.Parent=hit.Parent.Torso
  1637. end
  1638. game:GetService("Debris"):AddItem(vp,.25)
  1639. game:GetService("Debris"):AddItem(r,.5)
  1640. c=Instance.new("ObjectValue")
  1641. c.Name="creator"
  1642. c.Value=Player
  1643. c.Parent=h
  1644. game:GetService("Debris"):AddItem(c,.5)
  1645. CRIT=false
  1646. hitDeb=true
  1647. AttackPos=6
  1648. end
  1649. end
  1650. end
  1651.  
  1652. showDamage=function(Char,Dealt,du)
  1653. m=Instance.new("Model")
  1654. m.Name=tostring(Dealt)
  1655. h=Instance.new("Humanoid")
  1656. h.Health=0
  1657. h.MaxHealth=0
  1658. h.Parent=m
  1659. c=Instance.new("Part")
  1660. c.Transparency=0
  1661. c.BrickColor=BrickColor:Red()
  1662. if CRIT==true then
  1663. c.BrickColor=BrickColor.new("Really red")
  1664. end
  1665. c.Name="Head"
  1666. c.TopSurface=0
  1667. c.BottomSurface=0
  1668. c.formFactor="Plate"
  1669. c.Size=Vector3.new(1,.4,1)
  1670. ms=Instance.new("CylinderMesh")
  1671. ms.Scale=Vector3.new(.8,.8,.8)
  1672. if CRIT==true then
  1673. ms.Scale=Vector3.new(1,1.25,1)
  1674. end
  1675. ms.Parent=c
  1676. c.Reflectance=0
  1677. Instance.new("BodyGyro").Parent=c
  1678. c.Parent=m
  1679. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1680. f=Instance.new("BodyPosition")
  1681. f.P=2000
  1682. f.D=100
  1683. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1684. f.position=c.Position+Vector3.new(0,3,0)
  1685. f.Parent=c
  1686. game:GetService("Debris"):AddItem(m,.5+du)
  1687. c.CanCollide=false
  1688. m.Parent=workspace
  1689. c.CanCollide=false
  1690. end
  1691.  
  1692. function ob1d(mouse)
  1693. if attack == true then return end
  1694. hold=true
  1695. if Mode=="Robot" then
  1696. if idle==false then
  1697. MovingPunch()
  1698. end
  1699. Humanoid.WalkSpeed=0
  1700. if idle==true then
  1701. canidle=false
  1702. attackone()
  1703. attacktwo()
  1704. canidle=true
  1705. end
  1706. attack=false
  1707. Humanoid.WalkSpeed=16
  1708. elseif Mode=="Battle" then
  1709. canidle=false
  1710. punchone()
  1711. punchtwo()
  1712. wait(1)
  1713. LW.C0 = cf(-1.5,0.5,0) * euler(0,0,-0.2)
  1714. RW.C0 = cf(1.5,0.5,0) * euler(0,0,0.2)
  1715. RootJoint.C0=euler(-1.57,0,3.14)
  1716. attack=false
  1717. canidle=true
  1718. end
  1719. end
  1720.  
  1721. function ob1u(mouse)
  1722. hold = false
  1723. end
  1724.  
  1725. buttonhold = false
  1726.  
  1727. function key(key)
  1728. if key=="x" then
  1729. if debouncerockets==true then return end
  1730. debouncerockets=true
  1731. Rockets()
  1732. debouncerockets=false
  1733. end
  1734. if key=="c" then
  1735. if debounceorb==true then return end
  1736. debounceorb=true
  1737. LightningOrb()
  1738. debounceorb=false
  1739. end
  1740. if attack == true then return end
  1741. if key=="q" then
  1742. if aiming==false then
  1743. Aim()
  1744. elseif aiming==true then
  1745. NoAim()
  1746. end
  1747. end
  1748. if key=="z" then
  1749. canidle=false
  1750. RocketPunch()
  1751. canidle=true
  1752. end
  1753. if key=="f" then
  1754. print("RESTART LMAO")
  1755. restarted=true
  1756. RootJoint.Part1=Torso
  1757. RootJoint.C0=euler(-1.57,0,3.14)
  1758. RW.Parent = nil
  1759. LW.Parent = nil
  1760. RWL.Parent = nil
  1761. LWL.Parent = nil
  1762. RSH.Parent = player.Character.Torso
  1763. LSH.Parent = player.Character.Torso
  1764. RH.Parent = player.Character.Torso
  1765. LH.Parent = player.Character.Torso
  1766. Neck.C0=necko
  1767. modelzorz.Parent=nil
  1768. workspace.CurrentCamera.CameraSubject=Humanoid
  1769. workspace.CurrentCamera.CameraType = "Custom"
  1770. end
  1771. if key=="g" then
  1772. ModeChange()
  1773. end
  1774. if key=="h" then
  1775. so("http://roblox.com/asset/?id=133489855",Torso,1,1)
  1776. wait(0.7)
  1777. so("http://roblox.com/asset/?id=144844438",Torso,1,1)
  1778. print("SOUND")
  1779. end
  1780. end
  1781.  
  1782. function key2(key)
  1783. if key=="e" then
  1784. holdrockets=false
  1785. end
  1786. end
  1787.  
  1788. function s(mouse)
  1789. mouse.Button1Down:connect(function() ob1d(mouse) end)
  1790. mouse.Button1Up:connect(function() ob1u(mouse) end)
  1791. mouse.KeyDown:connect(key)
  1792. mouse.KeyUp:connect(key2)
  1793. unsheathed = true
  1794. player = Player
  1795. ch = Character
  1796. MMouse = mouse
  1797. equipanim()
  1798. end
  1799.  
  1800. function ds(mouse)
  1801. hideanim()
  1802. wait(0)
  1803. end
  1804.  
  1805. Bin.Selected:connect(s)
  1806. Bin.Deselected:connect(ds)
  1807. print("Roi loaded.")
  1808. while restarted==false do
  1809. if Mode=="Robot" then
  1810. wait()
  1811. if canidle==true then
  1812. if (Torso.Velocity*Vector3.new(1,0,1)).magnitude < 0.2 then
  1813. idle=true
  1814. armwalk=false
  1815. if doingidle==false then
  1816. RootCF=euler(-1.57,0,3.14)*cf(0,0,2.4)
  1817. coroutine.resume(coroutine.create(function()
  1818. doingidle=true
  1819. if math.random(1,5)==1 then
  1820. idlefistr()
  1821. end
  1822. if math.random(1,5)==1 then
  1823. idlefistl()
  1824. end
  1825. for i=0,1,0.01 do
  1826. if idle==true then
  1827. wait()
  1828. RootJoint.C0=RootCF*cf(0,0,-0.5*i)
  1829. llegwld2.C0=euler(0,0,1.57)*cf(0,-0.5*i,0)
  1830. rlegwld2.C0=euler(0,0,1.57)*cf(0,-0.5*i,0)
  1831. larmwld11.C0=euler(-0.5+0.2*i,0,0.2)*cf(0,0.8,0)
  1832. rarmwld11.C0=euler(-0.5+0.2*i,0,-0.2)*cf(0,0.8,0)
  1833. end
  1834. end
  1835. if math.random(1,5)==1 then
  1836. idlefistr()
  1837. end
  1838. if math.random(1,5)==1 then
  1839. idlefistl()
  1840. end
  1841. for i=0,1,0.01 do
  1842. if idle==true then
  1843. wait()
  1844. RootJoint.C0=RootCF*cf(0,0,-0.5+0.5*i)
  1845. llegwld2.C0=euler(0,0,1.57)*cf(0,-0.5+0.5*i,0)
  1846. rlegwld2.C0=euler(0,0,1.57)*cf(0,-0.5+0.5*i,0)
  1847. larmwld11.C0=euler(-0.5+0.2-0.2*i,0,0.2)*cf(0,0.8,0)
  1848. rarmwld11.C0=euler(-0.5+0.2-0.2*i,0,-0.2)*cf(0,0.8,0)
  1849. end
  1850. end
  1851. if math.random(1,5)==1 then
  1852. idlefistr()
  1853. end
  1854. if math.random(1,5)==1 then
  1855. idlefistl()
  1856. end
  1857. doingidle=false
  1858. end))
  1859. end
  1860. end
  1861. if (Torso.Velocity*Vector3.new(1,0,1)).magnitude > 0.2 then
  1862. idle=false
  1863. if armwalk==false then
  1864. armwalk=true
  1865. coroutine.resume(coroutine.create(function()
  1866. for i=0,1,0.05 do
  1867. wait()
  1868. larmwld11.C0=euler(-0.5,0,0.2+1*i)*cf(1*i,0.8-0.1*i,0)
  1869. rarmwld11.C0=euler(-0.5,0,-0.2-1*i)*cf(-1*i,0.8-0.1*i,0)
  1870. end
  1871. while armwalk==true do
  1872. wait()
  1873. end
  1874. larmwld11.C0=euler(-0.5,0,0.2)*cf(0,0.8,0)
  1875. rarmwld11.C0=euler(-0.5,0,-0.2)*cf(0,0.8,0)
  1876. end))
  1877. end
  1878. if doingwalk==false then
  1879. coroutine.resume(coroutine.create(function()
  1880. doingwalk=true
  1881. for i=0,1,0.1 do
  1882. if idle==false then
  1883. wait()
  1884. RootJoint.C0=RootCF*cf(0,0,-0.7*i)*euler(0.1*i,0,-0.2*i)
  1885. llegwld2.C0=euler(0.5*i,1*i,1.57)*cf(0,0,0)
  1886. rlegwld2.C0=euler(0,-1*i,1.57)*cf(0,0,0)
  1887. end
  1888. end
  1889. for i=0,1,0.1 do
  1890. if idle==false then
  1891. wait()
  1892. RootJoint.C0=RootCF*cf(0,0,-0.7+0.7*i)*euler(0.1-0.1*i,0,-0.2+0.2*i)
  1893. llegwld2.C0=euler(0.5-0.5*i,1-1*i,1.57)*cf(0,0,0)
  1894. rlegwld2.C0=euler(0,-1+1*i,1.57)*cf(0,0,0)
  1895. end
  1896. end
  1897. for i=0,1,0.1 do
  1898. if idle==false then
  1899. wait()
  1900. RootJoint.C0=RootCF*cf(0,0,-0.7*i)*euler(0.1*i,0,0.2*i)
  1901. llegwld2.C0=euler(0,-1*i,1.57)*cf(0,0,0)
  1902. rlegwld2.C0=euler(-0.5*i,1*i,1.57)*cf(0,0,0)
  1903. end
  1904. end
  1905. for i=0,1,0.1 do
  1906. if idle==false then
  1907. wait()
  1908. RootJoint.C0=RootCF*cf(0,0,-0.7+0.7*i)*euler(0.1-0.1*i,0,0.2-0.2*i)
  1909. llegwld2.C0=euler(0,-1+1*i,1.57)*cf(0,0,0)
  1910. rlegwld2.C0=euler(-0.5+0.5*i,1-1*i,1.57)*cf(0,0,0)
  1911. end
  1912. end
  1913. doingwalk=false
  1914. end))
  1915. end
  1916. --RootJoint.C0=RootCF
  1917. --llegwld2.C0=euler(0,0,1.57)*cf(0,0,0)
  1918. --rlegwld2.C0=euler(0,0,1.57)*cf(0,0,0)
  1919. --larmwld11.C0=euler(-0.5,0,0.2)*cf(0,0.8,0)
  1920. --rarmwld11.C0=euler(-0.5,0,-0.2)*cf(0,0.8,0)
  1921. end
  1922. end
  1923. elseif Mode=="Battle" then
  1924. wait()
  1925. if canidle==true then
  1926. idle=true
  1927. armwalk=false
  1928. if doingidle==false then
  1929. RootCF=euler(-1.57,0,3.14)*cf(0,0,2.4)
  1930. coroutine.resume(coroutine.create(function()
  1931. doingidle=true
  1932. for i=0,1,0.01 do
  1933. if idle==true then
  1934. wait()
  1935. rfistwld1.C0=euler(-0.6+0.1*i,-0.2,0)*cf(-4,-2+0.1*i,1)
  1936. lfistwld1.C0=euler(-0.6+0.1*i,0.2,0)*cf(4,-2+0.1*i,1)
  1937. end
  1938. end
  1939. if math.random(1,5)==1 then
  1940. idlefistr()
  1941. end
  1942. if math.random(1,5)==1 then
  1943. idlefistl()
  1944. end
  1945. for i=0,1,0.01 do
  1946. if idle==true then
  1947. wait()
  1948. rfistwld1.C0=euler(-0.6+0.1-0.1*i,-0.2,0)*cf(-4,-2+0.1-0.1*i,1)
  1949. lfistwld1.C0=euler(-0.6+0.1-0.1*i,0.2,0)*cf(4,-2+0.1-0.1*i,1)
  1950. end
  1951. end
  1952. if math.random(1,5)==1 then
  1953. idlefistr()
  1954. end
  1955. if math.random(1,5)==1 then
  1956. idlefistl()
  1957. end
  1958. doingidle=false
  1959. end))
  1960. end
  1961. end
  1962. end
  1963. end
  1964. -- mediafire
  1965. --[[
  1966. Copyrighted (C) Fenrier 2014
  1967. ]]
Add Comment
Please, Sign In to add comment