Advertisement
RobloxScripty

Untitled

Jul 8th, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 45.19 KB | None | 0 0
  1.  
  2. Player = game:GetService("Players").Mr_Anonymous1st
  3. Character = Player.Character
  4. PlayerGui = Player.PlayerGui
  5. Backpack = Player.Backpack
  6. Torso = Character.Torso
  7. Head = Character.Head
  8. Humanoid = Character.Humanoid
  9. LeftArm = Character["Left Arm"]
  10. LeftLeg = Character["Left Leg"]
  11. RightArm = Character["Right Arm"]
  12. RightLeg = Character["Right Leg"]
  13. LS = Torso["Left Shoulder"]
  14. LH = Torso["Left Hip"]
  15. RS = Torso["Right Shoulder"]
  16. RH = Torso["Right Hip"]
  17. Neck = Torso.Neck
  18. it=Instance.new
  19. vt=Vector3.new
  20. cf=CFrame.new
  21. euler=CFrame.fromEulerAnglesXYZ
  22. angles=CFrame.Angles
  23. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  24. necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  25. RootPart=Character.HumanoidRootPart
  26. RootJoint=RootPart.RootJoint
  27. RootCF=euler(-1.57,0,3.14)
  28. attack = false
  29. attackdebounce = false
  30. MMouse=nil
  31. combo=0
  32. Mode="Normal"
  33. throwcube=false
  34. --player
  35. player = nil
  36. --save shoulders
  37. RSH, LSH = nil, nil
  38. --welds
  39. RW, LW = Instance.new("Weld"), Instance.new("Weld")
  40. RW.Name="Right Shoulder" LW.Name="Left Shoulder"
  41. local AnimJoints = {}
  42. table.insert(AnimJoints,RW)
  43. table.insert(AnimJoints,LW)
  44.  
  45.  
  46. if Character:findFirstChild("Mechanic Gauntlets",true) ~= nil then
  47. Character:findFirstChild("Mechanic Gauntlets",true).Parent = nil
  48. end
  49.  
  50.  
  51. function part(formfactor,parent,reflectance,transparency,brickcolor,name,size)
  52. local fp = it("Part")
  53. fp.formFactor = formfactor
  54. fp.Parent = parent
  55. fp.Reflectance = reflectance
  56. fp.Transparency = transparency
  57. fp.CanCollide = false
  58. fp.Locked=true
  59. fp.BrickColor = brickcolor
  60. fp.Name = name
  61. fp.Size = size
  62. fp.Position = Torso.Position
  63. fp.BottomSurface="Smooth"
  64. fp.TopSurface="Smooth"
  65. fp:BreakJoints()
  66. return fp
  67. end
  68.  
  69. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  70. local mesh = it(Mesh)
  71. mesh.Parent = part
  72. if Mesh=="SpecialMesh" then
  73. mesh.MeshType = meshtype
  74. mesh.MeshId = meshid
  75. end
  76. mesh.Offset=offset
  77. mesh.Scale=scale
  78. return mesh
  79. end
  80.  
  81. function weld(parent,part0,part1,c0)
  82. local weld = it("Weld")
  83. weld.Parent = parent
  84. weld.Part0 = part0
  85. weld.Part1 = part1
  86. weld.C0 = c0
  87. return weld
  88. end
  89.  
  90. function SetWeld(weld, i, loops, origpos,origangle, nextpos,nextangle,smooth)
  91. smooth = smooth or 1
  92. local obj
  93. for i, v in pairs(AnimJoints) do
  94. if v[1] == weld then
  95. obj = v
  96. break
  97. end
  98. end
  99. if not obj then
  100. obj = {weld,NV}
  101. table.insert(AnimJoints,obj)
  102. end
  103.  
  104. local perc = (smooth == 1 and math.sin((math.pi/2)/loops*i)) or i/loops
  105.  
  106. local tox,toy,toz = 0,0,0
  107. tox = math.abs(origangle.x - nextangle.x) *perc
  108. toy = math.abs(origangle.y - nextangle.y) *perc
  109. toz = math.abs(origangle.z - nextangle.z) *perc
  110. tox = (origangle.x > nextangle.x and -tox) or tox
  111. toy = (origangle.y > nextangle.y and -toy) or toy
  112. toz = (origangle.z > nextangle.z and -toz) or toz
  113.  
  114. local tox2,toy2,toz2 = 0,0,0
  115. tox2 = math.abs(origpos.x - nextpos.x) *perc
  116. toy2 = math.abs(origpos.y - nextpos.y) *perc
  117. toz2 = math.abs(origpos.z - nextpos.z) *perc
  118. tox2 = (origpos.x > nextpos.x and -tox2) or tox2
  119. toy2 = (origpos.y > nextpos.y and -toy2) or toy2
  120. toz2 = (origpos.z > nextpos.z and -toz2) or toz2
  121.  
  122. obj[2] = Vector3.new(origangle.x + tox, origangle.y + toy, origangle.z + toz)
  123. weld.C0 = CFrame.new(origpos.x + tox2,origpos.y + toy2,origpos.z + toz2) * CFrame.Angles(origangle.x + tox,origangle.y + toy,origangle.z + toz)
  124. end
  125.  
  126. local Hitbox=part(3,nil,0,0,BrickColor.new("Really black"),"Hitbox",vt(1,1,1))
  127. Hitbox.Anchored=true
  128. Hitbox.Transparency=1
  129. local modelzorz = Instance.new("Model")
  130. modelzorz.Parent = Character
  131. modelzorz.Name = "Mechanic Gauntlets"
  132.  
  133. --[[LEFT GAUNTLET]]--
  134. local Lprt1=part(3,modelzorz,0,0,BrickColor.new("Really red"),"Left Part1",vt(1,1,1))
  135. local Lprt3=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Left Part3",vt(1,1,1))
  136. local Lprt5=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Left Part5",vt(1,1,1))
  137. local Lprt6=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Left Part6",vt(1,1,1))
  138. local Lprt7=part(3,modelzorz,0,0,BrickColor.new("Really red"),"Left Part7",vt(1,1,1))
  139. local Lprt8=part(3,modelzorz,0,0,BrickColor.new("Black"),"Left Part8",vt(1,1,1))
  140. local Lprt9=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Left Part9",vt(1,1,1))
  141. local Lprt10=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Left Part10",vt(1,1,1))
  142. local Lprt11=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Left Part11",vt(1,1,1))
  143.  
  144. Lmsh1=mesh("BlockMesh",Lprt1,"","",vt(0,0,0),vt(1.03,1,1.03))
  145. Lmsh3=mesh("BlockMesh",Lprt3,"","",vt(0,0,0),vt(0.1,1.05,1.06))
  146. Lmsh5=mesh("BlockMesh",Lprt5,"","",vt(0,0,0),vt(1.025,2,0.2))
  147. Lmsh6=mesh("BlockMesh",Lprt6,"","",vt(0,0,0),vt(0.2,2,1.025))
  148. Lmsh7=mesh("CylinderMesh",Lprt7,"","",vt(0,0,0),vt(0.4,0.2,0.4))
  149. Lmsh8=mesh("CylinderMesh",Lprt8,"","",vt(0,0,0),vt(0.3,0.21,0.3))
  150. Lmsh9=mesh("SpecialMesh",Lprt9,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(0.17,0.17,0.1))
  151. Lmsh10=mesh("SpecialMesh",Lprt10,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(0.07,0.07,0.1))
  152. Lmsh11=mesh("BlockMesh",Lprt11,"","",vt(0,0,0),vt(0.15,0.02,0.02))
  153.  
  154. local Lwld1=weld(Lprt1,Lprt1,LeftArm,euler(0,0,0)*cf(0,0.51,0))
  155. local Lwld3=weld(Lprt3,Lprt3,Lprt1,euler(0,0,0)*cf(0.3,0,0))
  156. local Lwld5=weld(Lprt5,Lprt5,Lprt1,euler(0,0,0)*cf(0,-0.55,0))
  157. local Lwld6=weld(Lprt6,Lprt6,Lprt1,euler(0,0,0)*cf(0,-0.55,0))
  158. local Lwld7=weld(Lprt7,Lprt7,Lprt1,euler(0,0,1.57)*cf(0.45,-1.2,0))
  159. local Lwld8=weld(Lprt8,Lprt8,Lprt7,euler(0,0,0)*cf(0,0,0))
  160. local Lwld9=weld(Lprt9,Lprt9,Lprt7,euler(1.57,0,0)*cf(-0.02,0.1,0))
  161. local Lwld10=weld(Lprt10,Lprt10,Lprt7,euler(1.57,0,0)*cf(0,0.1,0))
  162. local Lwld11=weld(Lprt11,Lprt11,Lprt7,euler(0,0,0)*cf(0.07,0.1,0))
  163.  
  164. numb=0.4
  165. for i=1,4 do
  166. local Lprt2=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Left Part2",vt(1,1,1))
  167. Lmsh2=mesh("BlockMesh",Lprt2,"","",vt(0,0,0),vt(1.06,1.05,0.1))
  168. local Lwld2=weld(Lprt2,Lprt2,Lprt1,euler(0,0,0)*cf(0,0,numb))
  169. local Lprt4=part(3,modelzorz,0,0,BrickColor.new("Really red"),"Left Part4",vt(1,1,1))
  170. Lmsh4=mesh("SpecialMesh",Lprt4,"Wedge","",vt(0,0,0),vt(0.09,0.1,0.3))
  171. local Lwld4=weld(Lprt4,Lprt4,Lprt2,euler(1.57,-1.57,0)*cf(0.54,0.5,0))
  172. numb=numb-0.275
  173. end
  174.  
  175. numb=0
  176. for i=1,4 do
  177. local Lprt7=part(3,modelzorz,0,0,BrickColor.new("Really red"),"Left Part7",vt(1,1,1))
  178. Lmsh7=mesh("SpecialMesh",Lprt7,"Wedge","",vt(0,0,0),vt(0.2,0.1,0.3))
  179. local Lwld7=weld(Lprt7,Lprt7,Lprt1,euler(1.57,0,3.14)*cf(0,-0.5,0.54)*euler(0,numb,0))
  180. numb=numb+1.57
  181. end
  182.  
  183. --[[RIGHT GAUNTLET]]--
  184. local Rprt1=part(3,modelzorz,0,0,BrickColor.new("Really red"),"Right Part1",vt(1,1,1))
  185. local Rprt3=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Right Part3",vt(1,1,1))
  186. local Rprt5=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Right Part5",vt(1,1,1))
  187. local Rprt6=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Right Part6",vt(1,1,1))
  188. local Rprt7=part(3,modelzorz,0,0,BrickColor.new("Really red"),"Right Part7",vt(1,1,1))
  189. local Rprt8=part(3,modelzorz,0,0,BrickColor.new("Black"),"Right Part8",vt(1,1,1))
  190. local Rprt9=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Right Part9",vt(1,1,1))
  191. local Rprt10=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Right Part10",vt(1,1,1))
  192. local Rprt11=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Right Part11",vt(1,1,1))
  193.  
  194. Rmsh1=mesh("BlockMesh",Rprt1,"","",vt(0,0,0),vt(1.03,1,1.03))
  195. Rmsh3=mesh("BlockMesh",Rprt3,"","",vt(0,0,0),vt(0.1,1.05,1.06))
  196. Rmsh5=mesh("BlockMesh",Rprt5,"","",vt(0,0,0),vt(1.025,2,0.2))
  197. Rmsh6=mesh("BlockMesh",Rprt6,"","",vt(0,0,0),vt(0.2,2,1.025))
  198. Rmsh7=mesh("CylinderMesh",Rprt7,"","",vt(0,0,0),vt(0.4,0.2,0.4))
  199. Rmsh8=mesh("CylinderMesh",Rprt8,"","",vt(0,0,0),vt(0.3,0.21,0.3))
  200. Rmsh9=mesh("SpecialMesh",Rprt9,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(0.17,0.17,0.1))
  201. Rmsh10=mesh("SpecialMesh",Rprt10,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(0.07,0.07,0.1))
  202. Rmsh11=mesh("BlockMesh",Rprt11,"","",vt(0,0,0),vt(0.15,0.02,0.02))
  203.  
  204. local Rwld1=weld(Rprt1,Rprt1,RightArm,euler(0,3.14,0)*cf(0,0.51,0))
  205. local Rwld3=weld(Rprt3,Rprt3,Rprt1,euler(0,0,0)*cf(0.3,0,0))
  206. local Rwld5=weld(Rprt5,Rprt5,Rprt1,euler(0,0,0)*cf(0,-0.55,0))
  207. local Rwld6=weld(Rprt6,Rprt6,Rprt1,euler(0,0,0)*cf(0,-0.55,0))
  208. local Rwld7=weld(Rprt7,Rprt7,Rprt1,euler(0,0,1.57)*cf(0.45,-1.2,0))
  209. local Rwld8=weld(Rprt8,Rprt8,Rprt7,euler(0,0,0)*cf(0,0,0))
  210. local Rwld9=weld(Rprt9,Rprt9,Rprt7,euler(1.57,0,0)*cf(-0.02,0.1,0))
  211. local Rwld10=weld(Rprt10,Rprt10,Rprt7,euler(1.57,0,0)*cf(0,0.1,0))
  212. local Rwld11=weld(Rprt11,Rprt11,Rprt7,euler(0,0,0)*cf(0.07,0.1,0))
  213.  
  214. numb=0.4
  215. for i=1,4 do
  216. local Rprt2=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Right Part2",vt(1,1,1))
  217. Rmsh2=mesh("BlockMesh",Rprt2,"","",vt(0,0,0),vt(1.06,1.05,0.1))
  218. local Rwld2=weld(Rprt2,Rprt2,Rprt1,euler(0,0,0)*cf(0,0,numb))
  219. local Rprt4=part(3,modelzorz,0,0,BrickColor.new("Really red"),"Right Part4",vt(1,1,1))
  220. Rmsh4=mesh("SpecialMesh",Rprt4,"Wedge","",vt(0,0,0),vt(0.09,0.1,0.3))
  221. local Rwld4=weld(Rprt4,Rprt4,Rprt2,euler(1.57,-1.57,0)*cf(0.54,0.5,0))
  222. numb=numb-0.275
  223. end
  224.  
  225. numb=0
  226. for i=1,4 do
  227. local Rprt7=part(3,modelzorz,0,0,BrickColor.new("Really red"),"Right Part7",vt(1,1,1))
  228. Rmsh7=mesh("SpecialMesh",Rprt7,"Wedge","",vt(0,0,0),vt(0.2,0.1,0.3))
  229. local Rwld7=weld(Rprt7,Rprt7,Rprt1,euler(1.57,0,3.14)*cf(0,-0.5,0.54)*euler(0,numb,0))
  230. numb=numb+1.57
  231. end
  232.  
  233. if (script.Parent.className ~= "HopperBin") then
  234. Tool = Instance.new("HopperBin")
  235. Tool.Parent = Backpack
  236. Tool.Name = "Mechanic Gauntlets"
  237. script.Parent = Tool
  238. end
  239. Bin = script.Parent
  240.  
  241. local Bg = it("BodyGyro")
  242. Bg.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
  243. Bg.P = 20e+003
  244. Bg.Parent = nil
  245.  
  246. so = function(id,par,vol,pit)
  247. coroutine.resume(coroutine.create(function()
  248. local sou = Instance.new("Sound",par or workspace)
  249. sou.Volume=vol
  250. sou.Pitch=pit or 1
  251. sou.SoundId=id
  252. wait()
  253. sou:play()
  254. wait(6)
  255. sou:Remove()
  256. end))
  257. end
  258.  
  259. function hideanim()
  260. equipped=false
  261. end
  262.  
  263. function equipanim()
  264. equipped=true
  265. Neck.C0=necko
  266. for i = 0,1,0.1 do
  267. wait()
  268. LW.C0=cf(-1.5,0.5,0)*euler(0.2*i,1.57*i,0)
  269. LW.C1=cf(0, 0.5, 0)*euler(-0.2*i,0,0)
  270. RW.C0=cf(1.5,0.5,0)*euler(0.1*i,0,-0.2*i)
  271. end
  272. end
  273.  
  274. function attackone()
  275. attack=true
  276. local armprt=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Part",vt(1,1,1))
  277. armprt.Transparency=1
  278. local armprtwld=weld(armprt,armprt,LeftArm,euler(0,0,0)*cf(0,1,0))
  279. for i=0,1,0.2 do
  280. wait()
  281. ElecEffect(armprt.CFrame,1,1,1)
  282. RootJoint.C0=RootCF*euler(0,0,0.2*i)
  283. LW.C0=cf(-1.5,0.5,0)*euler((walkoffset1-walkoffset1*i)+.2,1.57,0)
  284. LW.C1=cf(0, 0.5, 0)*euler(-0.2-0.4*i,0,0)
  285. RW.C0=cf(1.5,0.5,0)*euler((walkoffset1-walkoffset1*i)+.1,0,-0.2+0.8*i)
  286. end
  287. local boom=part(3,workspace,0,0,BrickColor.new("Really black"),"Part",vt(1,1,1))
  288. boom.Transparency=1
  289. boom.Anchored=true
  290. boom.CFrame=Head.CFrame*cf(0,-1,-4)
  291. so("http://www.roblox.com/asset/?id=153092315",boom,1,0.5)
  292. for i=0,1,0.2 do
  293. wait()
  294. ElecEffect(armprt.CFrame,1,1,1)
  295. Neck.C0=necko*euler(0,0,0.6*i)
  296. RootJoint.C0=RootCF*euler(0,0,0.2-0.8*i)
  297. LW.C0=cf(-1.5,0.5,0)*euler(0.2+1.37*i,1.57,0)
  298. LW.C1=cf(0, 0.5, 0)*euler(-0.6+0.2*i,0,0)
  299. RW.C0=cf(1.5,0.5,0)*euler(0.1,0,0.6)
  300. end
  301. boommsh=mesh("SpecialMesh",boom,"Sphere","",vt(0,0,0),vt(2.5,2.5,2.5))
  302. boom.Transparency=0.5
  303. boom.Anchored=true
  304. boom.CFrame=Head.CFrame*cf(0,-1,-4)
  305. Hitbox.Parent=workspace
  306. Hitbox.CFrame=boom.CFrame
  307. con1=Hitbox.Touched:connect(function(hit) Damagefunc1(hit,1,5,0) end)
  308. coroutine.resume(coroutine.create(function(Part,Mesh)
  309. while Part.Parent~=nil do
  310. wait()
  311. derp=math.random()
  312. Mesh.Scale=vt(2.5+derp,2.5+derp,2.5+derp)
  313. ElecEffect(Part.CFrame,2,2,2)
  314. MagicBlock(BrickColor.new("Really black"),Part.CFrame,1,1,1,0.1,0.1,0.1)
  315. Hitbox.CFrame=boom.CFrame*cf(math.random(-1,0)+math.random(),math.random(-1,0)+math.random(),math.random(-1,0)+math.random())
  316. end
  317. end),boom,boommsh)
  318. for i=0,1,0.2 do
  319. wait()
  320. LW.C0=cf(-1.5,0.5,0)*euler(1.57,1.57,0)
  321. LW.C1=cf(0, 0.5, 0)*euler(-0.4+0.1*i,0,0)
  322. end
  323. coroutine.resume(coroutine.create(function(Part1,Part2,Part3,Con)
  324. wait(2)
  325. Con:disconnect()
  326. Part2.Parent=nil
  327. Part3.Parent=nil
  328. Part1.Parent=nil
  329. wait(1)
  330. end),Hitbox,boom,armprt,con1)
  331. --[[Hitbox.Parent=nil
  332. con1:disconnect()
  333. boom.Parent=nil
  334. armprt.Parent=nil]]
  335. attack=false
  336. end
  337.  
  338. function attacktwo()
  339. attack=true
  340. for i=0,1,0.2 do
  341. wait()
  342. Neck.C0=necko*euler(0,0,0.6-0.6*i)
  343. RootJoint.C0=RootCF*euler(0,0,-0.6+0.6*i)
  344. LW.C0=cf(-1.5,0.5,0)*euler(1.57,1.57-1.57*i,0)
  345. LW.C1=cf(0, 0.5, 0)*euler(-0.3+0.3*i,0,0)
  346. RW.C0=cf(1.5,0.5,0)*euler(0.1+1.47*i,0,0.6-0.6*i)
  347. end
  348. local boom=part(3,modelzorz,0,0,BrickColor.new("Really black"),"Part",vt(1,1,1))
  349. boom.Transparency=0.5
  350. boommsh=mesh("SpecialMesh",boom,"Sphere","",vt(0,0,0),vt(0,0,0))
  351. local boomwld=weld(boom,boom,Head,euler(0,0,0)*cf(0,1,4))
  352. con1=Hitbox.Touched:connect(function(hit) Damagefunc1(hit,5,10,20) end)
  353. for i=0,1,0.2 do
  354. wait()
  355. ElecEffect(boom.CFrame,3,3,3)
  356. LW.C0=cf(-1.5,0.5,0)*euler(1.57,0,0.1*i)
  357. RW.C0=cf(1.5,0.5,0)*euler(1.57,0,-0.1*i)
  358. boommsh.Scale=vt(0.5*(i*3),0.5*(i*3),0.5*(i*3))
  359. Hitbox.CFrame=boom.CFrame
  360. end
  361. con1:disconnect()
  362. boomwld.Parent=nil
  363. boom.Anchored=true
  364. coroutine.resume(coroutine.create(function(Part)
  365. local c=game.Workspace:GetChildren()
  366. for i=1,#c do
  367. local hum=c[i]:findFirstChild("Humanoid")
  368. if hum~=nil and hum.Health~=0 then
  369. local head=c[i]:findFirstChild("Head")
  370. if head~=nil then
  371. local targ=head.Position - Part.Position
  372. local mag=targ.magnitude
  373. if mag<=10 and c[i].Name~=Player.Name then
  374. attackdebounce=false
  375. Damagefunc1(head,10,20,70)
  376. end
  377. end
  378. end
  379. end
  380. so("http://www.roblox.com/asset/?id=2974249",Part,1,1)
  381. so("http://www.roblox.com/asset/?id=1369158",Part,1,2)
  382. numb=0
  383. for i=0,20 do
  384. wait()
  385. MagicBlock(BrickColor.new("Really black"),Part.CFrame,0.5,0.5,0.5,1,1,1)
  386. if numb>=8 then
  387. MagicRing(BrickColor.new("Really black"),Part.CFrame,1,1,1,math.random(-50,50),math.random(-50,50),math.random(-50,50),0.5,0.5,0.5)
  388. numb=0
  389. end
  390. numb=numb+1
  391. end
  392. end),boom)
  393. for i=0,1,0.2 do
  394. wait()
  395. LW.C0=cf(-1.5,0.5,0)*euler(1.57,0,0.1-0.7*i)
  396. RW.C0=cf(1.5,0.5,0)*euler(1.57,0,-0.1+0.7*i)
  397. end
  398. wait(0.2)
  399. boom.Parent=nil
  400. attack=false
  401. end
  402.  
  403. function attackthree()
  404. attack=true
  405. for i=0,1,0.1 do
  406. wait()
  407. LW.C0=cf(-1.5,0.5,0)*euler(1.57-1.57*i,0,-0.6)
  408. RW.C0=cf(1.5,0.5,0)*euler(1.57-1.57*i,0,0.6)
  409. end
  410. so("http://www.roblox.com/asset/?id=153092348",Torso,1,1)
  411. vel=Instance.new("BodyVelocity")
  412. vel.Parent=RootPart
  413. vel.maxForce=vt(4e+005,4e+005,4e+005)*1
  414. vel.velocity=Head.CFrame.lookVector*50
  415. ArmHit=false
  416. armcon=RightArm.Touched:connect(function(hit)
  417. if hit~=nil and hit.Parent:findFirstChild("Humanoid")~=nil and ArmHit==false then
  418. armcon:disconnect()
  419. vel.Parent=nil
  420. ArmHit=true
  421. print("HITTED")
  422. Damagefunc1(hit,10,30,20)
  423. MagicBlock(BrickColor.new("Really black"),hit.CFrame*cf(0,-1,0),0.5,0.5,0.5,1,1,1)
  424. for i=1,3 do
  425. Lightning(hit.Position,hit.Position+vt(math.random(-10,10),math.random(-10,10),math.random(-10,10)),5,1,"Really black",0.3,0.1,0.5)
  426. end
  427. so("http://www.roblox.com/asset/?id=153092334",Torso,1,1)
  428. for i=0,1,0.2 do
  429. wait()
  430. Neck.C0=necko*euler(0,0,-1+2*i)
  431. RootJoint.C0=RootCF*euler(0,0,1-2*i)
  432. LW.C0=cf(-1.5,0.5,0)*euler(-0.2,0,-0.6)
  433. RW.C0=cf(1.5,0.5,0)*euler(1.57-1.77*i,0,1)
  434. end
  435. wait(0.4)
  436. if Anim=="Idle" then
  437. for i=0,1,0.1 do
  438. wait()
  439. Neck.C0=necko*euler(0,0,1-1*i)
  440. RootJoint.C0=RootCF*euler(0,0,-1+1*i)
  441. LW.C0=cf(-1.5,0.5,0)*euler(-0.2+0.4*i,1.57*i,-0.6+0.6*i)
  442. LW.C1=cf(0, 0.5, 0)*euler(-0.2*i,0,0)
  443. RW.C0=cf(1.5,0.5,0)*euler(-0.2+0.3*i,0,1-1.2*i)
  444. end
  445. end
  446. end
  447. end)
  448. for i=0,1,0.2 do
  449. wait()
  450. MagicBlock(BrickColor.new("Really black"),RightArm.CFrame*cf(0,-2.5,0),0.5,0.5,0.5,0.6,0.6,0.6)
  451. Neck.C0=necko*euler(0,0,-1*i)
  452. RootJoint.C0=RootCF*euler(0,0,1*i)
  453. LW.C0=cf(-1.5,0.5,0)*euler(-0.2*i,0,-0.6)
  454. RW.C0=cf(1.5,0.5,0)*euler(1.57*i,0,0.6+0.4*i)
  455. end
  456. for i=0,1,0.1 do
  457. wait()
  458. MagicBlock(BrickColor.new("Really black"),RightArm.CFrame*cf(0,-2.5,0),0.5,0.5,0.5,0.6,0.6,0.6)
  459. end
  460. vel.Parent=nil
  461. wait(0.5)
  462. if ArmHit==false then
  463. armcon:disconnect()
  464. if Anim=="Idle" then
  465. for i=0,1,0.1 do
  466. wait()
  467. Neck.C0=necko*euler(0,0,-1+1*i)
  468. RootJoint.C0=RootCF*euler(0,0,1-1*i)
  469. LW.C0=cf(-1.5,0.5,0)*euler(-0.2+0.4*i,1.57*i,-0.6+0.6*i)
  470. LW.C1=cf(0, 0.5, 0)*euler(-0.2*i,0,0)
  471. RW.C0=cf(1.5,0.5,0)*euler(1.57-1.47*i,0,1-1.2*i)
  472. end
  473. end
  474. end
  475. attack=false
  476. end
  477.  
  478. function Electra()
  479. attack=true
  480. Mode="Electra"
  481. Anim="Switching"
  482. for i=0,1,0.1 do
  483. wait()
  484. LW.C0=cf(-1.5,0.5,0)*euler(0.2-0.4*i,1.57-1.57*i,-0.2*i)
  485. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  486. RW.C0=cf(1.5,0.5,0)*euler(0.1-0.3*i,0,-0.2+0.4*i)
  487. RootJoint.C0=RootCF*cf(0,2*i,0)*euler(0,0,0)
  488. end
  489. wait(1)
  490. attack=false
  491. end
  492.  
  493. function Normal()
  494. attack=true
  495. Mode="Normal"
  496. RootJoint.C0=RootCF
  497. wait(1)
  498. attack=false
  499. end
  500.  
  501. function MakeCube()
  502. attack=true
  503. for i=0,1,0.1 do
  504. wait()
  505. MagicBlock(BrickColor.new("Really black"),Torso.CFrame*cf(0,0.5,-2),0.5,0.5,0.5,0.3,0.3,0.3)
  506. ElecEffect(Torso.CFrame*cf(0,0.5,-2),1,1,1)
  507. Neck.C0=necko*euler(0.1*i,0,0)
  508. LW.C0=cf(-1.5,0.5,0)*euler(0.2+1.27*i,1.57-1.57*i,0.4*i)
  509. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  510. RW.C0=cf(1.5,0.5,0)*euler(0.1+1.37*i,0,-0.2-0.2*i)
  511. end
  512. numb=2
  513. for i=0,1,0.1 do
  514. MagicBlock(BrickColor.new("Really black"),Torso.CFrame*cf(0,0.5,-2),0.5,0.5,0.5,0.3,0.3,0.3)
  515. ElecEffect(Torso.CFrame*cf(0,0.5,-2),1,1,1)
  516. Neck.C0=necko*euler(0.1+0.1*(i*numb),0,0)
  517. LW.C0=cf(-1.5,0.5,0)*euler(1.47+0.1*(i*numb),0,0.4+0.1*(i*numb))
  518. RW.C0=cf(1.5,0.5,0)*euler(1.47+0.1*(i*numb),0,-0.4-0.1*(i*numb))
  519. numb=numb-0.1
  520. wait()
  521. end
  522. NewCube()
  523. wait(0.5)
  524. for i=0,1,0.1 do
  525. wait()
  526. Neck.C0=necko*euler(0.2-0.2*i,0,0)
  527. LW.C0=cf(-1.5,0.5,0)*euler(1.57-1.37*i,1.57*i,0.5-0.5*i)
  528. LW.C1=cf(0, 0.5, 0)*euler(-0.2*i,0,0)
  529. RW.C0=cf(1.5,0.5,0)*euler(1.57-1.47*i,0,-0.5+0.3*i)
  530. end
  531. Neck.C0=necko
  532. attack=false
  533. end
  534.  
  535. function GetCube()
  536. if MMouse.Target~=nil and MMouse.Target.Name=="Cube Vertex2" and MMouse.Target.Parent:findFirstChild("Cube Vertex1")~=nil then
  537. attack=true
  538. throwcube=false
  539. print("GOT CUBE")
  540. mainpart=MMouse.Target
  541. coroutine.resume(coroutine.create(function(Model)
  542. while holdz==true do
  543. wait()
  544. Model["Cube Vertex1"].CFrame=Torso.CFrame*cf(0,0.5,-2)
  545. end
  546. end),mainpart.Parent)
  547. for i=0,1,0.1 do
  548. wait()
  549. ElecEffect(mainpart.CFrame,1,1,1)
  550. Neck.C0=necko*euler(0.1*i,0,0)
  551. LW.C0=cf(-1.5,0.5,0)*euler(0.2+1.27*i,1.57-1.57*i,0.4*i)
  552. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  553. RW.C0=cf(1.5,0.5,0)*euler(0.1+1.37*i,0,-0.2-0.2*i)
  554. end
  555. while holdz==true do
  556. wait()
  557. ElecEffect(mainpart.CFrame,1,1,1)
  558. end
  559. if throwcube==false then
  560. for i=0,1,0.1 do
  561. wait()
  562. Neck.C0=necko*euler(0.1-0.1*i,0,0)
  563. LW.C0=cf(-1.5,0.5,0)*euler(1.47-1.27*i,1.57*i,0.4-0.4*i)
  564. LW.C1=cf(0, 0.5, 0)*euler(0.2*i,0,0)
  565. RW.C0=cf(1.5,0.5,0)*euler(1.47-1.37*i,0,-0.4+0.4*i)
  566. end
  567. end
  568. attack=false
  569. end
  570. end
  571.  
  572. function ThrowCube()
  573. attack=true
  574. Main=mainpart.Parent["Cube Vertex1"]
  575. --[[CF=Main.CFrame
  576. for i=0,20 do
  577. wait()
  578. Main.CFrame=CF*cf(0,0,-i)
  579. end
  580. numb=1
  581. for i=0,1,0.1 do
  582. wait()
  583. Main.CFrame=CF*cf(0,0,-20-10*(i*numb))
  584. numb=numb-0.05
  585. end]]
  586. wait()
  587. Main.CFrame=CFrame.new(MMouse.Hit.p)*cf(math.random(-1,1),math.random(0,1),math.random(-1,1))
  588. attack=false
  589. end
  590.  
  591. function GatherCubes()
  592. attack=true
  593. c=workspace:children()
  594. for i=1,#c do
  595. if c[i].Name=="Cube" then
  596. rand1=math.random(-5,5)
  597. rand2=math.random(0,5)
  598. rand3=math.random(-5,5)
  599. coroutine.resume(coroutine.create(function(Model,Rand1,Rand2,Rand3)
  600. while holdx==true do
  601. wait()
  602. Model["Cube Vertex1"].CFrame=Torso.CFrame*cf(Rand1,Rand2,Rand3)
  603. ElecEffect(Model["Cube Vertex2"].CFrame,1,1,1)
  604. end
  605. end),c[i],rand1,rand2,rand3)
  606. end
  607. end
  608. for i=0,1,0.1 do
  609. wait()
  610. LW.C0=cf(-1.5,0.5,0)*euler(0.2+1.37*i,1.57-1.57*i,-1.57*i)
  611. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  612. RW.C0=cf(1.5,0.5,0)*euler(0.1+1.47*i,0,-0.2+1.77*i)
  613. end
  614. while holdx==true do
  615. wait()
  616. end
  617. attack=false
  618. end
  619.  
  620. function ThrowCube2()
  621. wait()
  622. if MMouse.Target~=nil then
  623. TargetHit=MMouse.Target
  624. if TargetHit.Anchored==false then
  625. c=workspace:children()
  626. for i=1,#c do
  627. coroutine.resume(coroutine.create(function(Model)
  628. if Model.Name=="Cube" then
  629. while attack==false do
  630. wait(0.1)
  631. MainPrt=Model["Cube Vertex1"]
  632. MainPrt.CFrame=TargetHit.CFrame*cf(math.random(-2,2),math.random(-2,2),math.random(-2,2))
  633. end
  634. end
  635. end),c[i])
  636. end
  637. else
  638. c=workspace:children()
  639. for i=1,#c do
  640. if c[i].Name=="Cube" then
  641. CubModel=c[i]
  642. MainPrt=CubModel["Cube Vertex1"]
  643. MainPrt.CFrame=CFrame.new(MMouse.Hit.p)*cf(math.random(-5,5),math.random(0,5),math.random(-5,5))
  644. end
  645. end
  646. end
  647. end
  648. end
  649.  
  650. function TeleCube()
  651. if MMouse.Target~=nil and MMouse.Target.Name=="Cube Vertex2" and MMouse.Target.Parent:findFirstChild("Cube Vertex1")~=nil then
  652. attack=true
  653. MainPart=MMouse.Target
  654. so("http://www.roblox.com/asset/?id=2101137",Torso,0.7,1)
  655. for i=0,1,0.1 do
  656. wait()
  657. ElecEffect(MainPart.CFrame,1,1,1)
  658. ElecEffect(Torso.CFrame,4,2,4)
  659. Neck.C0=necko*euler(0,0,1.57*i)
  660. RootJoint.C0=RootCF*euler(0,0,-1.57*i)
  661. LW.C0=cf(-1.5,0.5,0)*euler(0.2+1.37*i,1.57-1.57*i,-1.57*i)
  662. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  663. RW.C0=cf(1.5,0.5,0)*euler(0.1+1.47*i,0,-0.2+1.77*i)
  664. end
  665. for i=0,1,0.1 do
  666. wait()
  667. ElecEffect(MainPart.CFrame,1,1,1)
  668. ElecEffect(Torso.CFrame,4,2,4)
  669. end
  670. for i=1,2 do
  671. MagicBlock(BrickColor.new("Really black"),Torso.CFrame,0.5,0.5,0.5,2,2,2)
  672. end
  673. so("http://roblox.com/asset/?id=2101144",Torso,1,2)
  674. Torso.CFrame=MainPart.CFrame
  675. for i=1,2 do
  676. MagicBlock(BrickColor.new("Really black"),Torso.CFrame,0.5,0.5,0.5,2,2,2)
  677. end
  678. Neck.C0=necko
  679. RootJoint.C0=RootCF
  680. attack=false
  681. end
  682. end
  683.  
  684. function Apocalypse()
  685. attack=true
  686. c=workspace:children()
  687. for i=1,#c do
  688. if c[i].Name=="Cube" then
  689. so("http://www.roblox.com/asset/?id=2974249",c[i]["Cube Vertex2"],1,1)
  690. coroutine.resume(coroutine.create(function(Model)
  691. while Model.Parent~=nil do
  692. MagicBlock(BrickColor.new("Really black"),Model["Cube Vertex2"].CFrame,0.5,0.5,0.5,0.5,0.5,0.5)
  693. wait()
  694. end
  695. end),c[i])
  696. end
  697. end
  698. for i=0,1,0.2 do
  699. wait()
  700. LW.C0=cf(-1.5+0.5*i,0.5,-0.5*i)*euler(0.2+0.2*i,1.57-1.57*i,0.6*i)
  701. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  702. RW.C0=cf(1.5-0.5*i,0.5,-0.5*i)*euler(0.1+0.3*i,0,-0.2-0.4*i)
  703. end
  704. numb=2
  705. for i=0,1,0.1 do
  706. wait()
  707. Neck.C0=necko*euler(0.1*(i*numb),0,0)
  708. LW.C0=cf(-1,0.5,-0.5)*euler(0.4+0.2*(i*numb),0,0.6+0.4*(i*numb))
  709. RW.C0=cf(1,0.5,-0.5)*euler(0.4+0.2*(i*numb),0,-0.6-0.4*(i*numb))
  710. numb=numb-0.1
  711. end
  712. c3=workspace:children()
  713. for i=1,#c3 do
  714. if c3[i].Name=="Cube" then
  715. CubeMod=c3[i]
  716. for i=1,2 do
  717. MagicRing(BrickColor.new("Really black"),CubeMod["Cube Vertex2"].CFrame,1,1,1,math.random(-50,50),math.random(-50,50),math.random(-50,50),3,3,0.5)
  718. end
  719. for i=1,3 do
  720. Lightning(CubeMod["Cube Vertex2"].Position,CubeMod["Cube Vertex2"].Position+vt(math.random(-10,10),math.random(-10,10),math.random(-10,10)),5,1,"Really black",0.3,0.1,0.8)
  721. end
  722. MagicCircle(BrickColor.new("Blue"),CubeMod["Cube Vertex2"].CFrame,1,1,1,3,3,3,0.05)
  723. local c2=game.Workspace:GetChildren()
  724. for i=1,#c2 do
  725. local hum=c2[i]:findFirstChild("Humanoid")
  726. if hum~=nil and hum.Health~=0 then
  727. local head=c2[i]:findFirstChild("Head")
  728. if head~=nil then
  729. local targ=head.Position - CubeMod["Cube Vertex2"].Position
  730. local mag=targ.magnitude
  731. if mag<=15 and c2[i].Name~=Player.Name then
  732. attackdebounce=false
  733. Damagefunc1(head,10,20,0)
  734. end
  735. end
  736. end
  737. end
  738. local cubesoundprt=part(3,workspace,0,1,BrickColor.new("Really black"),"Cube Sound Part",vt(1,1,1))
  739. cubesoundprt.Anchored=true
  740. cubesoundprt.CFrame=CubeMod["Cube Vertex2"].CFrame
  741. game.Debris:AddItem(cubesoundprt,3)
  742. --so("http://www.roblox.com/asset/?id=2974249",Part,1,1)
  743. so("http://www.roblox.com/asset/?id=1369158",cubesoundprt,1,2)
  744. CubeMod:Destroy()
  745. end
  746. end
  747. for i=0,1,0.2 do
  748. wait()
  749. Neck.C0=necko*euler(0.1+0.05*i,0,0)
  750. LW.C0=cf(-1-0.5*i,0.5,-0.5+0.5*i)*euler(0.6+0.87*i,0,1-2.47*i)
  751. RW.C0=cf(1+0.5*i,0.5,-0.5+0.5*i)*euler(0.6+0.87*i,0,-1+2.47*i)
  752. end
  753. numb=2
  754. for i=0,1,0.1 do
  755. wait()
  756. Neck.C0=necko*euler(0.15+0.05*i,0,0)
  757. LW.C0=cf(-1.5,0.5,0)*euler(1.47+0.1*(i*numb),0,-1.47-0.1*(i*numb))
  758. RW.C0=cf(1.5,0.5,0)*euler(1.47+0.1*(i*numb),0,1.47+0.1*(i*numb))
  759. numb=numb-0.1
  760. end
  761. for i=0,1,0.1 do
  762. wait()
  763. Neck.C0=necko*euler(0.2-0.2*i,0,0)
  764. LW.C0=cf(-1.5,0.5,0)*euler(1.57-1.37*i,1.57*i,-1.57+1.57*i)
  765. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  766. RW.C0=cf(1.5,0.5,0)*euler(1.57-1.47*i,0,1.57-1.37*i)
  767. end
  768. attack=false
  769. end
  770.  
  771. function Turbine()
  772. if MMouse.Target~=nil and MMouse.Target.Name=="Cube Vertex2" and MMouse.Target.Parent:findFirstChild("Cube Vertex1")~=nil then
  773. BoomCube=MMouse.Target
  774. TargetPart=BoomCube.Parent["Cube Vertex1"]
  775. attack=true
  776. bg=Instance.new("BodyGyro")
  777. bg.maxTorque = vt(0,math.huge,0)
  778. bg.P = 3000
  779. bg.cframe = cf(RootPart.Position,BoomCube.Position)
  780. bg.Parent = RootPart
  781. so("http://www.roblox.com/asset/?id=2101137",BoomCube,1,1)
  782. for i=0,1,0.2 do
  783. wait()
  784. Neck.C0=necko*euler(0,0,1*i)
  785. RootJoint.C0=RootCF*euler(0,0,-1*i)
  786. LW.C0=cf(-1.5,0.5,0)*euler(0.2+1.37*i,1.57-1.57*i,-1*i)
  787. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  788. RW.C0=cf(1.5,0.5,0)*euler(0.1+1.47*i,0,-0.2+1.77*i)
  789. Lightning(LeftArm.Position,BoomCube.Position,5,1,"Really black",0.3,0.1,0.1)
  790. end
  791. for i=1,10 do
  792. wait()
  793. Lightning(LeftArm.Position,BoomCube.Position,5,1,"Really black",0.3,0.1,0.1)
  794. end
  795. for i=1,2 do
  796. MagicBlock(BrickColor.new("Really black"),BoomCube.CFrame,0.5,0.5,0.5,2,2,2)
  797. end
  798. MagicCircle(BrickColor.new("Blue"),BoomCube.CFrame,1,1,1,2,2,2,0.08)
  799. so("http://www.roblox.com/asset/?id=2697431",BoomCube,1,0.2)
  800. local c2=game.Workspace:GetChildren()
  801. for i=1,#c2 do
  802. local hum=c2[i]:findFirstChild("Humanoid")
  803. if hum~=nil and hum.Health~=0 then
  804. local head=c2[i]:findFirstChild("Head")
  805. if head~=nil then
  806. local targ=head.Position - BoomCube.Position
  807. local mag=targ.magnitude
  808. if mag<=12 and c2[i].Name~=Player.Name then
  809. attackdebounce=false
  810. Damagefunc2(head,10,20,0,BoomCube)
  811. end
  812. end
  813. end
  814. end
  815. TargetPart.CFrame=LeftArm.CFrame*cf(0,-3,0)
  816. wait(0.5)
  817. for i=0,1,0.1 do
  818. wait()
  819. Neck.C0=necko*euler(0,0,1-1*i)
  820. RootJoint.C0=RootCF*euler(0,0,-1+1*i)
  821. LW.C0=cf(-1.5,0.5,0)*euler(1.57-1.37*i,1.57*i,-1+1*i)
  822. LW.C1=cf(0, 0.5, 0)*euler(0.2*i,0,0)
  823. RW.C0=cf(1.5,0.5,0)*euler(1.57-1.47*i,0,1.57-1.77*i)
  824. end
  825. bg.Parent=nil
  826. attack=false
  827. end
  828. end
  829.  
  830. function NewCube()
  831. Cube=Instance.new("Model")
  832. Cube.Parent=workspace
  833. Cube.Name="Cube"
  834. local cubevertex=part(3,Cube,0,0.6,BrickColor.new("Really black"),"Cube Vertex1",vt(1,1,1))
  835. cubevertex.Anchored=true
  836. cubevertex.CFrame=Torso.CFrame*cf(0,0.5,-2)
  837. cubevertexmsh=mesh("SpecialMesh",cubevertex,"Sphere","",vt(0,0,0),vt(0.3,0.3,0.3))
  838. local cube=part(3,Cube,0,0.2,BrickColor.new("Really black"),"Cube Vertex2",vt(1.5,1.5,1.5))
  839. cube.CFrame=Torso.CFrame
  840. cubemsh=mesh("BlockMesh",cube,"","",vt(0,0,0),vt(0.4,0.4,0.4))
  841. cubemsh=mesh("SpecialMesh",cube,"Sphere","",vt(0,0,0),vt(0.2,0.2,0.2))
  842. local actualcube=part(3,Cube,0,0.3,BrickColor.new("Really red"),"Cube",vt(1,1,1))
  843. actualcube.CFrame=Torso.CFrame
  844. --actualcubemsh=mesh("SpecialMesh",actualcube,"Sphere","",vt(0,0,0),vt(0.4,0.4,0.4))
  845. actualcubemsh=mesh("BlockMesh",actualcube,"","",vt(0,0,0),vt(0.7,0.7,0.7))
  846. local cubewld=weld(actualcube,actualcube,cube,cf(0,0,0))
  847. coroutine.resume(coroutine.create(function(Part,Model)
  848. while Part.Parent~=nil do
  849. wait()
  850. end
  851. Model.Parent=nil
  852. end),actualcube,Cube)
  853. local spark=Instance.new("Sparkles")
  854. spark.Parent=cube
  855. spark.Color=Color3.new(1,0,0)
  856. spark.Enabled=true
  857. light=Instance.new("PointLight")
  858. light.Brightness=20
  859. light.Color=Color3.new(1,0,0)
  860. light.Range=10
  861. light.Parent=cube
  862. coroutine.resume(coroutine.create(function(Part,Weld)
  863. numb1=0
  864. numb2=0
  865. numb3=0
  866. while Part.Parent~=nil do
  867. wait()
  868. Weld.C0=Weld.C0*angles(numb1,numb2,numb3)
  869. numb1=math.pi/math.random(10,20)
  870. numb2=math.pi/math.random(20,30)
  871. numb3=math.pi/math.random(20,30)
  872. end
  873. end),actualcube,cubewld)
  874. prop=Instance.new("RocketPropulsion")
  875. prop.MaxSpeed=5000
  876. prop.CartoonFactor=0
  877. prop.MaxThrust=10000
  878. prop.Parent=cube
  879. prop.Target=cubevertex
  880. prop.ThrustD=1.5
  881. prop.TurnD=0
  882. prop.TurnP=0
  883. print(prop.ThrustD)
  884. prop:Fire()
  885. end
  886.  
  887. function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants
  888. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  889. end
  890.  
  891. function Lightning(p0,p1,tym,ofs,col,th,tra,last)
  892. local magz = (p0 - p1).magnitude local curpos = p0 local trz = {-ofs,ofs}
  893. for i=1,tym do
  894. local li = Instance.new("Part",workspace) li.TopSurface =0 li.BottomSurface = 0 li.Anchored = true li.Transparency = tra or 0.4 li.BrickColor = BrickColor.new(col)
  895. 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)])
  896. light1=Instance.new("PointLight")
  897. light1.Brightness=.8
  898. light1.Color=Color3.new(.2,255,.2)
  899. light1.Range=8
  900. light1.Parent=li
  901. local trolpos = CFrame.new(curpos,p1)*CFrame.new(0,0,magz/tym).p+ofz
  902. if tym == i then
  903. local magz2 = (curpos - p1).magnitude li.Size = Vector3.new(th,th,magz2)
  904. li.CFrame = CFrame.new(curpos,p1)*CFrame.new(0,0,-magz2/2)
  905. else
  906. li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/tym/2)
  907. end
  908. curpos = li.CFrame*CFrame.new(0,0,magz/tym/2).p game.Debris:AddItem(li,last)
  909. end
  910. end
  911.  
  912. function ElecEffect(cff,x,y,z)
  913. local prt=part(3,workspace,0,0,BrickColor.new("Really black"),"Part",vt(1,1,1))
  914. prt.Anchored=true
  915. xval=math.random()
  916. yval=math.random()
  917. zval=math.random()
  918. msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(xval,yval,zval))
  919. coroutine.resume(coroutine.create(function(Part,Mesh,Frame,xvaal,yvaal,zvaal)
  920. Part.CFrame=Frame*cf(math.random(-x,x),math.random(-y,y),math.random(-z,z))
  921. for i=1,8 do
  922. wait()
  923. xvaal=xvaal-0.1
  924. yvaal=yvaal-0.1
  925. zvaal=zvaal-0.1
  926. Mesh.Scale=vt(xvaal,yvaal,zvaal)
  927. Part.Transparency=Part.Transparency+0.09
  928. end
  929. Part.Parent=nil
  930. end),prt,msh,cff,xval,yval,zval)
  931. end
  932.  
  933. function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3)
  934. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  935. prt.Anchored=true
  936. prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))
  937. local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1))
  938. coroutine.resume(coroutine.create(function(Part,Mesh)
  939. for i=0,1,0.1 do
  940. wait()
  941. Part.CFrame=Part.CFrame
  942. Part.Transparency=i
  943. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  944. end
  945. Part.Parent=nil
  946. end),prt,msh)
  947. end
  948.  
  949. function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay)
  950. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  951. prt.Anchored=true
  952. prt.CFrame=cframe
  953. local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1))
  954. coroutine.resume(coroutine.create(function(Part,Mesh)
  955. for i=0,1,delay do
  956. wait()
  957. Part.CFrame=Part.CFrame
  958. Part.Transparency=i
  959. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  960. end
  961. Part.Parent=nil
  962. end),prt,msh)
  963. end
  964.  
  965. function MagicRing(brickcolor,cframe,x1,y1,z1,x2,y2,z2,x3,y3,z3)
  966. local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5))
  967. prt.Anchored=true
  968. prt.CFrame=cframe*euler(x2,y2,z2)
  969. local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1))
  970. coroutine.resume(coroutine.create(function(Part,Mesh)
  971. for i=0,1,0.03 do
  972. wait()
  973. Part.CFrame=Part.CFrame
  974. Part.Transparency=i
  975. Mesh.Scale=Mesh.Scale+vt(x3,y3,z3)
  976. end
  977. Part.Parent=nil
  978. end),prt,msh)
  979. end
  980.  
  981. so = function(id,par,vol,pit)
  982. coroutine.resume(coroutine.create(function()
  983. local sou = Instance.new("Sound",par or workspace)
  984. sou.Volume=vol
  985. sou.Pitch=pit or 1
  986. sou.SoundId=id
  987. wait()
  988. sou:play()
  989. wait(6)
  990. sou:Remove()
  991. end))
  992. end
  993.  
  994. function findNearestTorso(pos)
  995. local list = game:service("Workspace"):children()
  996. local torso = nil
  997. local dist = 50
  998. local temp = nil
  999. local human = nil
  1000. local temp2 = nil
  1001. for x = 1, #list do
  1002. temp2 = list[x]
  1003. if (temp2.className == "Model") and (temp2 ~= Character) and (temp2.Name ~= "Fenrier") then
  1004. temp = temp2:findFirstChild("Torso")
  1005. human = temp2:findFirstChild("Humanoid")
  1006. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  1007. if (temp.Position - pos).magnitude < dist then
  1008. torso = temp
  1009. dist = (temp.Position - pos).magnitude
  1010. end
  1011. end
  1012. end
  1013. end
  1014. return torso
  1015. end
  1016.  
  1017. Damagefunc1=function(hit,minim,maxim,Knockback)
  1018. if hit.Parent==nil then
  1019. return
  1020. end
  1021. CPlayer=Bin
  1022. h=hit.Parent:FindFirstChild("Humanoid")
  1023. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  1024. if attackdebounce == false then
  1025. attackdebounce = true
  1026. coroutine.resume(coroutine.create(function()
  1027. wait(0.2)
  1028. attackdebounce = false
  1029. end))
  1030. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  1031. return
  1032. end]]
  1033. -- hs(hit,1.2)
  1034. c=Instance.new("ObjectValue")
  1035. c.Name="creator"
  1036. c.Value=game:service("Players").LocalPlayer
  1037. c.Parent=h
  1038. game:GetService("Debris"):AddItem(c,.5)
  1039. Damage=math.random(minim,maxim)
  1040. -- h:TakeDamage(Damage)
  1041. blocked=false
  1042. block=hit.Parent:findFirstChild("Block")
  1043. if block~=nil then
  1044. print("herp")
  1045. if block.Value>0 then
  1046. blocked=true
  1047. block.Value=block.Value-1
  1048. print(block.Value)
  1049. end
  1050. end
  1051. if blocked==false then
  1052. -- h:TakeDamage(Damage)
  1053. h.Health=h.Health-Damage
  1054. showDamage(hit.Parent,Damage,.5,BrickColor:Red())
  1055. else
  1056. h.Health=h.Health-(Damage/2)
  1057. showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Really red"))
  1058. end
  1059. vp=Instance.new("BodyVelocity")
  1060. vp.P=500
  1061. vp.maxForce=Vector3.new(math.huge,0,math.huge)
  1062. -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback
  1063. vp.velocity=Head.CFrame.lookVector*Knockback+Head.Velocity/1.05
  1064. if Knockback>0 then
  1065. vp.Parent=hit.Parent.Torso
  1066. end
  1067. game:GetService("Debris"):AddItem(vp,.25)
  1068. c=Instance.new("ObjectValue")
  1069. c.Name="creator"
  1070. c.Value=Player
  1071. c.Parent=h
  1072. game:GetService("Debris"):AddItem(c,.5)
  1073. CRIT=false
  1074. hitDeb=true
  1075. AttackPos=6
  1076. end
  1077. end
  1078. end
  1079.  
  1080. Damagefunc2=function(hit,minim,maxim,Knockback,MainPart)
  1081. if hit.Parent==nil then
  1082. return
  1083. end
  1084. CPlayer=Bin
  1085. h=hit.Parent:FindFirstChild("Humanoid")
  1086. if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then
  1087. if attackdebounce == false then
  1088. attackdebounce = true
  1089. coroutine.resume(coroutine.create(function()
  1090. wait(0.2)
  1091. attackdebounce = false
  1092. end))
  1093. --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then
  1094. return
  1095. end]]
  1096. -- hs(hit,1.2)
  1097. c=Instance.new("ObjectValue")
  1098. c.Name="creator"
  1099. c.Value=game:service("Players").LocalPlayer
  1100. c.Parent=h
  1101. game:GetService("Debris"):AddItem(c,.5)
  1102. Damage=math.random(minim,maxim)
  1103. -- h:TakeDamage(Damage)
  1104. blocked=false
  1105. block=hit.Parent:findFirstChild("Block")
  1106. if block~=nil then
  1107. print("herp")
  1108. if block.Value>0 then
  1109. blocked=true
  1110. block.Value=block.Value-1
  1111. print(block.Value)
  1112. end
  1113. end
  1114. if blocked==false then
  1115. -- h:TakeDamage(Damage)
  1116. h.Health=h.Health-Damage
  1117. showDamage(hit.Parent,Damage,.5,BrickColor:Red())
  1118. else
  1119. h.Health=h.Health-(Damage/2)
  1120. showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Really red"))
  1121. end
  1122. newpos2=MainPart.Position
  1123. local angle = (hit.Position-(newpos2+Vector3.new(0,-3,0))).unit
  1124. print(angle)
  1125. hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0)
  1126. rl=Instance.new("BodyAngularVelocity")
  1127. rl.P=3000
  1128. rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000
  1129. rl.angularvelocity=Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5))
  1130. rl.Parent=hit
  1131. game:GetService("Debris"):AddItem(rl,1)
  1132. --end
  1133. local bodyVelocity=Instance.new("BodyVelocity")
  1134. bodyVelocity.velocity=angle*40+Vector3.new(0,35,0)
  1135. bodyVelocity.P=5000
  1136. bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003)
  1137. bodyVelocity.Parent=hit
  1138. game:GetService("Debris"):AddItem(bodyVelocity,.7)
  1139. c=Instance.new("ObjectValue")
  1140. c.Name="creator"
  1141. c.Value=Player
  1142. c.Parent=h
  1143. game:GetService("Debris"):AddItem(c,.5)
  1144. CRIT=false
  1145. hitDeb=true
  1146. AttackPos=6
  1147. end
  1148. end
  1149. end
  1150.  
  1151. showDamage=function(Char,Dealt,du,Color)
  1152. m=Instance.new("Model")
  1153. m.Name=tostring(Dealt)
  1154. h=Instance.new("Humanoid")
  1155. h.Health=0
  1156. h.MaxHealth=0
  1157. h.Parent=m
  1158. c=Instance.new("Part")
  1159. c.Transparency=0
  1160. c.BrickColor=Color
  1161. c.Name="Head"
  1162. c.TopSurface=0
  1163. c.BottomSurface=0
  1164. c.formFactor="Plate"
  1165. c.Size=Vector3.new(1,.4,1)
  1166. ms=Instance.new("CylinderMesh")
  1167. ms.Scale=Vector3.new(.8,.8,.8)
  1168. if CRIT==true then
  1169. ms.Scale=Vector3.new(1,1.25,1)
  1170. end
  1171. ms.Parent=c
  1172. c.Reflectance=0
  1173. Instance.new("BodyGyro").Parent=c
  1174. c.Parent=m
  1175. c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0))
  1176. f=Instance.new("BodyPosition")
  1177. f.P=2000
  1178. f.D=100
  1179. f.maxForce=Vector3.new(math.huge,math.huge,math.huge)
  1180. f.position=c.Position+Vector3.new(0,3,0)
  1181. f.Parent=c
  1182. game:GetService("Debris"):AddItem(m,.5+du)
  1183. c.CanCollide=false
  1184. m.Parent=workspace
  1185. c.CanCollide=false
  1186. end
  1187.  
  1188. function ob1d(mouse)
  1189. if holdz==true then
  1190. throwcube=true
  1191. holdz=false
  1192. ThrowCube()
  1193. return end
  1194. if holdx==true then
  1195. throwcube=true
  1196. holdx=false
  1197. ThrowCube2()
  1198. return end
  1199. if attack == true then return end
  1200. hold=true
  1201. if combo==0 then
  1202. combo=1
  1203. attackone()
  1204. elseif combo==1 then
  1205. combo=2
  1206. attacktwo()
  1207. elseif combo==2 then
  1208. combo=3
  1209. attackthree()
  1210. end
  1211. coroutine.resume(coroutine.create(function()
  1212. wait(0.5)
  1213. if attack==false then
  1214. combo=0
  1215. Neck.C0=necko
  1216. RootJoint.C0=RootCF
  1217. LW.C0=cf(-1.5,0.5,0)*euler(0.2,1.57,0)
  1218. LW.C1=cf(0, 0.5, 0)*euler(-0.2,0,0)
  1219. RW.C0=cf(1.5,0.5,0)*euler(0.1,0,-0.2)
  1220. end
  1221. end))
  1222. end
  1223.  
  1224. function ob1u(mouse)
  1225. hold = false
  1226. end
  1227.  
  1228. buttonhold = false
  1229. holdz=false
  1230. holdx=false
  1231.  
  1232. eul=0
  1233. function key(key)
  1234. if attack == true then return end
  1235. --[[if key=="f" then
  1236. if Mode=="Normal" then
  1237. Electra()
  1238. elseif Mode=="Electra" then
  1239. Normal()
  1240. end
  1241. end]]
  1242. if key=="q" then
  1243. Apocalypse()
  1244. end
  1245. if key=="e" then
  1246. Turbine()
  1247. end
  1248. if key=="f" then
  1249. MakeCube()
  1250. end
  1251. if key=="z" then
  1252. holdz=true
  1253. GetCube()
  1254. end
  1255. if key=="x" then
  1256. holdx=true
  1257. GatherCubes()
  1258. end
  1259. if key=="c" then
  1260. TeleCube()
  1261. end
  1262. end
  1263.  
  1264. function key2(key)
  1265. if key=="z" then
  1266. holdz=false
  1267. end
  1268. if key=="x" then
  1269. holdx=false
  1270. end
  1271. end
  1272.  
  1273. function s(mouse)
  1274. mouse.Button1Down:connect(function() ob1d(mouse) end)
  1275. mouse.Button1Up:connect(function() ob1u(mouse) end)
  1276. mouse.KeyDown:connect(key)
  1277. mouse.KeyUp:connect(key2)
  1278. unsheathed = true
  1279. player = Player
  1280. ch = Character
  1281. MMouse = mouse
  1282. RSH = ch.Torso["Right Shoulder"]
  1283. LSH = ch.Torso["Left Shoulder"]
  1284. --
  1285. RSH.Parent = nil
  1286. LSH.Parent = nil
  1287. --
  1288. RW.Part0 = ch.Torso
  1289. RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  1290. RW.C1 = CFrame.new(0, 0.5, 0)
  1291. RW.Part1 = ch["Right Arm"]
  1292. RW.Parent = ch.Torso
  1293. --_G.R = RW
  1294. --
  1295. LW.Part0 = ch.Torso
  1296. LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  1297. LW.C1 = CFrame.new(0, 0.5, 0)
  1298. LW.Part1 = ch["Left Arm"]
  1299. LW.Parent = ch.Torso
  1300. --_G.L = LW
  1301. --
  1302. equipanim()
  1303. end
  1304.  
  1305. function ds(mouse)
  1306. hideanim()
  1307. wait(0)
  1308. RW.Parent = nil
  1309. LW.Parent = nil
  1310. RSH.Parent = player.Character.Torso
  1311. LSH.Parent = player.Character.Torso
  1312. end
  1313.  
  1314. Bin.Selected:connect(s)
  1315. Bin.Deselected:connect(ds)
  1316. Humanoid.Died:connect(function()
  1317. c=workspace:children()
  1318. for i=1,#c do
  1319. if c[i].Name=="Cube" then
  1320. c[i]:Remove()
  1321. end
  1322. end
  1323. end)
  1324. --[[function onRunning(speed)
  1325. if attack==true then return end
  1326. if speed>0 then
  1327. walking = true
  1328. for i = 0,1,0.1 do
  1329. wait()
  1330. LW.C0=cf(-1.5,0.5,0)*euler(0.2-0.4*i,1.57,0)
  1331. end
  1332. else
  1333. walking = false
  1334. for i = 0,1,0.1 do
  1335. wait()
  1336. LW.C0=cf(-1.5,0.5,0)*euler(-0.2+0.4*i,1.57,0)
  1337. end
  1338. end
  1339. end
  1340. Character.Humanoid.Running:connect(onRunning) ]]
  1341. Anim="Idle"
  1342. walkoffset1=0
  1343. walkoffset2=0
  1344. Switching=false
  1345. while true do
  1346. wait()
  1347. if Mode=="Normal" then
  1348. local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude
  1349. if RootPart.Velocity.y > 2 then
  1350. if Anim~="Jump" then
  1351. Anim="Jump"
  1352. coroutine.resume(coroutine.create(function()
  1353. for i=0,1,0.2 do
  1354. wait()
  1355. LW.C0=cf(-1.5,0.5,0)*euler(0.2-0.6*i,1.57-1.57*i,0)
  1356. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  1357. RW.C0=cf(1.5,0.5,0)*euler(0.1-0.1*i,0,-0.2)
  1358. end
  1359. end))
  1360. end
  1361. elseif RootPart.Velocity.y < -2 then
  1362. if Anim~="Fall" then
  1363. Anim="Fall"
  1364. coroutine.resume(coroutine.create(function()
  1365. for i=0,1,0.2 do
  1366. wait()
  1367. LW.C0=cf(-1.5,0.5,0)*euler(-0.4+2.8*i,0,0)
  1368. RW.C0=cf(1.5,0.5,0)*euler(0,0,-0.2)
  1369. end
  1370. end))
  1371. end
  1372. elseif torvel < 1 then
  1373. if Anim~="Idle" then
  1374. Anim="Idle"
  1375. coroutine.resume(coroutine.create(function()
  1376. wait(0.1)
  1377. while Switching==true do
  1378. wait()
  1379. end
  1380. while Anim=="Idle" do
  1381. for i = 0,1,0.02 do
  1382. if Anim=="Idle" and attack==false then
  1383. wait()
  1384. LW.C0=cf(-1.5,0.5,0)*euler(0.2-0.1*i,1.57-0.05*i,0)
  1385. RW.C0=cf(1.5,0.5-0.1*i,0)*euler(0.1+0.1*i,0,-0.2)
  1386. end
  1387. end
  1388. for i = 0,1,0.02 do
  1389. if Anim=="Idle" and attack==false then
  1390. wait()
  1391. LW.C0=cf(-1.5,0.5,0)*euler(0.1+0.1*i,1.52+0.05*i,0)
  1392. RW.C0=cf(1.5,0.4+0.1*i,0)*euler(0.2-0.1*i,0,-0.2)
  1393. end
  1394. end
  1395. wait(0)
  1396. end
  1397. if Anim=="Walk" and attack==false then
  1398. print("Switch to Walk")
  1399. Switching=true
  1400. walkoffset1=0
  1401. walkoffset2=0
  1402. for i=0,1,0.15 do
  1403. wait()
  1404. walkoffset1=0.2+0.8*i
  1405. walkoffset2=0.1-0.9*i
  1406. LW.C0=cf(-1.5,0.5,0)*euler(walkoffset1,1.57-1.57*i,0)
  1407. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  1408. RW.C0=cf(1.5,0.5,0)*euler(walkoffset2,0,-0.2+0.2*i)
  1409. end
  1410. Switching=false
  1411. elseif Anim=="Run" and attack==false then
  1412. print("Switch to Run")
  1413. Switching=true
  1414. for i=0,1,0.1 do
  1415. wait()
  1416. if Anim=="Run" and attack==false then
  1417. print("runnin")
  1418. RootJoint.C0=RootCF*euler(0.5*i,0,0)
  1419. Neck.C0=necko*euler(-0.3*i,0,0)
  1420. LW.C0=cf(-1.5,0.5,0)*euler(0.2-1.2*i,1.57-1.57*i,0)
  1421. LW.C1=cf(0, 0.5, 0)*euler(-0.2+0.2*i,0,0)
  1422. RW.C0=cf(1.5,0.5,0)*euler(0.1-1.1*i,0,-0.2+0.2*i)
  1423. end
  1424. end
  1425. Switching=false
  1426. end
  1427. end))
  1428. end
  1429. elseif torvel < 19 then
  1430. if Anim~="Walk" then
  1431. Anim="Walk"
  1432. coroutine.resume(coroutine.create(function()
  1433. wait(0.1)
  1434. while Switching==true do
  1435. wait()
  1436. end
  1437. while Anim=="Walk" do
  1438. for i=0,1,0.15 do
  1439. if Anim=="Walk" and attack==false then
  1440. wait()
  1441. walkoffset1=1-2*i
  1442. walkoffset2=-1+2*i
  1443. LW.C0=cf(-1.5,0.5,0)*euler(walkoffset1,0,0)
  1444. RW.C0=cf(1.5,0.5,0)*euler(walkoffset2,0,0)
  1445. end
  1446. end
  1447. for i=0,1,0.15 do
  1448. if Anim=="Walk" and attack==false then
  1449. wait()
  1450. walkoffset1=-1+2*i
  1451. walkoffset2=1-2*i
  1452. LW.C0=cf(-1.5,0.5,0)*euler(walkoffset1,0,0)
  1453. RW.C0=cf(1.5,0.5,0)*euler(walkoffset2,0,0)
  1454. end
  1455. end
  1456. wait(0)
  1457. end
  1458. if Anim=="Idle" and attack==false then
  1459. print("Switch to Idle")
  1460. Switching=true
  1461. for i=0,1,0.1 do
  1462. wait()
  1463. if Anim=="Idle" and attack==false then
  1464. LW.C0=cf(-1.5,0.5,0)*euler((walkoffset1-walkoffset1*i)+(0.2*i),1.57*i,0)
  1465. LW.C1=cf(0, 0.5, 0)*euler(-0.2*i,0,0)
  1466. RW.C0=cf(1.5,0.5,0)*euler((walkoffset2-walkoffset2*i)+(0.1*i),0,-0.2*i)
  1467. end
  1468. end
  1469. walkoffset1=0
  1470. walkoffset2=0
  1471. Switching=false
  1472. end
  1473. end))
  1474. end
  1475. elseif torvel >= 30 then
  1476. if Anim~="Run" then
  1477. Anim="Run"
  1478. coroutine.resume(coroutine.create(function()
  1479. while Anim=="Run" do
  1480. wait()
  1481. if Anim=="Run" and attack==false then
  1482. LW.C0=cf(-1.5,0.5,0)*euler(-1,0,0)
  1483. LW.C1=cf(0, 0.5, 0)*euler(0,0,0)
  1484. RW.C0=cf(1.5,0.5,0)*euler(-1,0,0)
  1485. end
  1486. end
  1487. if Anim=="Idle" and attack==false then
  1488. print("Switch to Idle")
  1489. Switching=true
  1490. for i=0,1,0.1 do
  1491. wait()
  1492. RootJoint.C0=RootCF*euler(0.5-0.5*i,0,0)
  1493. Neck.C0=necko*euler(-0.3+0.3*i,0,0)
  1494. LW.C0=cf(-1.5,0.5,0)*euler(-1+1.2*i,1.57*i,0)
  1495. LW.C1=cf(0, 0.5, 0)*euler(-0.2*i,0,0)
  1496. RW.C0=cf(1.5,0.5,0)*euler(-1+1.1*i,0,-0.2*i)
  1497. end
  1498. Switching=false
  1499. end
  1500. end))
  1501. end
  1502. end
  1503. elseif Mode=="Electra" then
  1504. end
  1505. end
  1506. print("Mechanic Gauntlets loaded.")
  1507.  
  1508. --[[
  1509. Copyrighted (C) Fenrier 2014
  1510. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement