simplistic27

Gauntlets

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