creeperwill9

Untitled

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