AvaiIabIe

Untitled

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