Advertisement
Team_Alex

Untitled

Mar 13th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.45 KB | None | 0 0
  1. --==//==--
  2. local Player = game:service("Players").LocalPlayer
  3. local Char = Player.Character
  4. local mouse = Player:GetMouse()
  5. local Humanoid = Char:findFirstChild("Humanoid")
  6. local Torso = Char:findFirstChild("Torso")
  7. local Head = Char.Head
  8. local ra = Char:findFirstChild("Right Arm")
  9. local la = Char:findFirstChild("Left Arm")
  10. local rl = Char:findFirstChild("Right Leg")
  11. local ll = Char:findFirstChild("Left Leg")
  12. local rs = Torso:findFirstChild("Right Shoulder")
  13. local ls = Torso:findFirstChild("Left Shoulder")
  14. local rh = Torso:findFirstChild("Right Hip")
  15. local lh = Torso:findFirstChild("Left Hip")
  16. local neck = Torso:findFirstChild("Neck")
  17. local rp = Char:findFirstChild("HumanoidRootPart")
  18. rp.Archivable = true
  19. local rj = rp:findFirstChild("RootJoint")
  20. rj.Archivable = true
  21. local animate = Char:findFirstChild("Animate")
  22. local rootpart = Char:findFirstChild("HumanoidRootPart")
  23. local Camera = workspace.CurrentCamera
  24. local CF = CFrame.new
  25. local components = CF().components
  26. local magicclrs = {"Really blue", "Navy blue", "Institutional white"}
  27. --local magicclrs = {"Really red", "Deep orange", "New Yeller", "Lime green", "Really blue", "Royal purple", "Bright violet"}
  28. rootpart.CanCollide = false
  29. Humanoid:findFirstChild("Animator"):Destroy()
  30. Humanoid.CameraOffset = Vector3.new(0, 2, 0)
  31. Humanoid.JumpPower = 60
  32. game.Players.LocalPlayer.Character.Humanoid.Changed:connect(function(jump)
  33. if jump == "Jump" then
  34. Humanoid.Jump = false
  35. end
  36. end)
  37.  
  38.  
  39.  
  40. Lerp = function(a,b,c)
  41. return a+(b-a)*c
  42. end
  43.  
  44. function phaseclone()
  45. Char.Archivable = true
  46. local Clone1 = Char:Clone()
  47. Clone1.Parent = game.Workspace
  48. for i,v in pairs (Clone1:GetChildren()) do
  49. if v.ClassName == "BodyColors" then
  50. B = "Really black"
  51. v.HeadColor = BrickColor.new(B)
  52. v.LeftArmColor = BrickColor.new(B)
  53. v.RightArmColor = BrickColor.new(B)
  54. v.TorsoColor = BrickColor.new(B)
  55. v.LeftLegColor = BrickColor.new(B)
  56. v.RightLegColor = BrickColor.new(B)
  57. elseif not v:IsA("Part") then
  58. v:Destroy()
  59. end
  60. if v.ClassName ~= "Part" or v.Name == "HumanoidRootPart" then
  61. v:Destroy()
  62. end
  63. if v:IsA("Part") then
  64. v.Transparency = 0.5
  65. v.TopSurface = "Smooth"
  66. v.BottomSurface = "Smooth"
  67. v.LeftSurface = "Smooth"
  68. v.RightSurface = "Smooth"
  69. Bl = "Really black"
  70. v.BrickColor = BrickColor.new(Bl)
  71. v.Anchored = true
  72. v.CanCollide = false
  73. end
  74. end
  75. for i,v in pairs (Clone1:GetChildren()) do
  76. if v:FindFirstChild("roblox") then
  77. v.roblox:Destroy()
  78. end
  79. if v:FindFirstChild("face") then
  80. v.face:Destroy()
  81. end
  82. if v.Name == "Part" or v.Name == "Hold" or v.Name == "Circle" then
  83. v:Remove()
  84. end
  85. end
  86. wait(0.3)
  87. for i = 1,5 do
  88. for _,v in pairs(Clone1:GetChildren()) do
  89. if v:IsA("Part") then
  90. v.Transparency = 0.5+i/5
  91. wait()
  92. end
  93. end
  94. end
  95. Clone1:Destroy()
  96. end
  97.  
  98.  
  99. function ctlerp(c1,c2,al)
  100. local com1 = {c1:components()}
  101. local com2 = {c2:components()}
  102. for i,v in pairs(com1) do
  103. com1[i] = Lerp(v,com2[i],al)
  104. end
  105. return CF(unpack(com1))
  106. end
  107.  
  108. do
  109. local function QuaternionFromCFrame(cf)
  110. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  111. local trace = m00 + m11 + m22
  112. if trace > 0 then
  113. local s = math.sqrt(1 + trace)
  114. local recip = 0.5/s
  115. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  116. else
  117. local i = 0
  118. if m11 > m00 then
  119. i = 1
  120. end
  121. if m22 > (i == 0 and m00 or m11) then
  122. i = 2
  123. end
  124. if i == 0 then
  125. local s = math.sqrt(m00-m11-m22+1)
  126. local recip = 0.5/s
  127. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  128. elseif i == 1 then
  129. local s = math.sqrt(m11-m22-m00+1)
  130. local recip = 0.5/s
  131. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  132. elseif i == 2 then
  133. local s = math.sqrt(m22-m00-m11+1)
  134. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  135. end
  136. end
  137. end
  138. local function QuaternionToCFrame(px, py, pz, x, y, z, w)
  139. local xs, ys, zs = x + x, y + y, z + z
  140. local wx, wy, wz = w*xs, w*ys, w*zs
  141. local xx = x*xs
  142. local xy = x*ys
  143. local xz = x*zs
  144. local yy = y*ys
  145. local yz = y*zs
  146. local zz = z*zs
  147. return CF(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
  148. end
  149. local function QuaternionSlerp(a, b, t)
  150. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  151. local startInterp, finishInterp;
  152. if cosTheta >= 0.0001 then
  153. if (1 - cosTheta) > 0.0001 then
  154. local theta = math.acos(cosTheta)
  155. local invSinTheta = 1/math.sin(theta)
  156. startInterp = math.sin((1-t)*theta)*invSinTheta
  157. finishInterp = math.sin(t*theta)*invSinTheta
  158. else
  159. startInterp = 1-t
  160. finishInterp = t
  161. end
  162. else
  163. if (1+cosTheta) > 0.0001 then
  164. local theta = math.acos(-cosTheta)
  165. local invSinTheta = 1/math.sin(theta)
  166. startInterp = math.sin((t-1)*theta)*invSinTheta
  167. finishInterp = math.sin(t*theta)*invSinTheta
  168. else
  169. startInterp = t-1
  170. finishInterp = t
  171. end
  172. end
  173. return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
  174. end
  175. function clerp(a,b,t)
  176. local qa = {QuaternionFromCFrame(a)}
  177. local qb = {QuaternionFromCFrame(b)}
  178. local ax, ay, az = a.x, a.y, a.z
  179. local bx, by, bz = b.x, b.y, b.z
  180. local _t = 1-t
  181. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  182. end
  183. end
  184.  
  185. --==/BASE/DEFAULT WELDS/==--
  186. rm = Instance.new("Weld", Torso)
  187. rm.C0 = CFrame.new(1.5, 0.5, 0) *CFrame.Angles(0, 0, 0)
  188. rm.C1 = CFrame.new(0, 0.5, 0)
  189. rm.Part0 = Torso
  190. rm.Part1 = ra
  191. lm = Instance.new("Weld", Torso)
  192. lm.C0 = CFrame.new(-1.5, 0.5, 0) *CFrame.Angles(0, 0, 0)
  193. lm.C1 = CFrame.new(0, 0.5, 0)
  194. lm.Part0 = Torso
  195. lm.Part1 = la
  196. rlegm = Instance.new("Weld", Torso)
  197. rlegm.C0 = CFrame.new(0.5, -1, 0) *CFrame.Angles(0, 0, 0)
  198. rlegm.C1 = CFrame.new(0, 1, 0)
  199. rlegm.Part0 = Torso
  200. rlegm.Part1 = rl
  201. llegm = Instance.new("Weld", Torso)
  202. llegm.C0 = CFrame.new(-0.5, -1, 0) *CFrame.Angles(0, 0, 0)
  203. llegm.C1 = CFrame.new(0, 1, 0)
  204. llegm.Part0 = Torso
  205. llegm.Part1 = ll
  206. neck.C0 = CFrame.new(0,1,0)
  207. neck.C1 = CFrame.new(0,-0.5,0)
  208.  
  209. --==/Mage's gauntlet/==--
  210. gauntlet = Instance.new("Model", Char)
  211. gauntParts = Instance.new("Model", gauntlet)
  212.  
  213. local rrng = Instance.new("Part", gauntParts)
  214. rrng.Anchored = false
  215. rrng.CanCollide = false
  216. rrng.FormFactor = "Custom"
  217. rrng.TopSurface = "Smooth"
  218. rrng.BottomSurface = "Smooth"
  219. rrng.BrickColor = BrickColor.new("Really black")
  220. rrng.Transparency = 0
  221. local rrngM = Instance.new("FileMesh", rrng)
  222. rrngM.MeshId = "http://www.roblox.com/asset/?id=3270017"
  223. rrngM.Scale = Vector3.new(0.8, 0.8, 0.8)
  224. local rrngW = Instance.new("Weld", rrng)
  225. rrngW.Part1 = rrng
  226. rrngW.Part0 = ra
  227. rrngW.C0 = CFrame.new(0.5, 0.5, 0) * CFrame.Angles(0, math.rad(90), 0)
  228.  
  229. local rbg = Instance.new("Part", gauntParts)
  230. rbg.Anchored, rbg.CanCollide = false, false
  231. rbg.FormFactor = "Custom"
  232. rbg.TopSurface, rbg.BottomSurface = "Smooth", "Smooth"
  233. rbg.Color = Color3.new(0, 0, 0)
  234. rbg.Transparency = 0
  235. local rbgM = Instance.new("SpecialMesh", rbg)
  236. rbgM.MeshType = "Cylinder"
  237. rbgM.Scale = Vector3.new(0.01, 0.7, 0.7)
  238. local rbgW = Instance.new("Weld", rbg)
  239. rbgW.Part1 = rbg
  240. rbgW.Part0 = rrng
  241. rbgW.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(0, math.rad(90), 0)
  242.  
  243. local chak = Instance.new("Part", gauntParts)
  244. chak.Anchored, chak.CanCollide = false, false
  245. chak.FormFactor = "Custom"
  246. chak.TopSurface, chak.BottomSurface = "Smooth", "Smooth"
  247. chak.Color = Color3.new(1, 1, 1)
  248. chak.Transparency = 0
  249. local chakM = Instance.new("FileMesh", chak)
  250. chakM.MeshId = "http://www.roblox.com/asset/?id=47260990"
  251. chakM.Scale = Vector3.new(0.85, 0.85, 0.85)
  252. local chakW = Instance.new("Motor", chak)
  253. chakW.DesiredAngle = 100000000000
  254. chakW.MaxVelocity = 0.1
  255. chakW.Part1 = chak
  256. chakW.Part0 = rrng
  257. chakW.C0 = CFrame.new(0, 0, 0.01) * CFrame.Angles(0, 0, 0)
  258.  
  259. --=/Spikes for Gauntlet [top]/=--
  260.  
  261. local cone = Instance.new("Part", gauntParts)
  262. cone.Anchored, cone.CanCollide = false, false
  263. cone.FormFactor = "Custom"
  264. cone.TopSurface, cone.BottomSurface = "Smooth", "Smooth"
  265. cone.Color = Color3.new(0, 0, 0)
  266. cone.Transparency = 0
  267. local coneM = Instance.new("FileMesh", cone)
  268. coneM.MeshId = "http://www.roblox.com/asset/?id=1033714"
  269. coneM.Scale = Vector3.new(0.1, 0.85, 0.06)
  270. local coneW = Instance.new("Motor", cone)
  271. coneW.Part1 = cone
  272. coneW.Part0 = rrng
  273. coneW.C0 = CFrame.new(0, 0.75, 0) * CFrame.Angles(0, 0, 0)
  274.  
  275. local cone2 = Instance.new("Part", gauntParts)
  276. cone2.Anchored, cone2.CanCollide = false, false
  277. cone2.FormFactor = "Custom"
  278. cone2.TopSurface, cone2.BottomSurface = "Smooth", "Smooth"
  279. cone2.Color = Color3.new(0, 0, 0)
  280. cone2.Transparency = 0
  281. local cone2M = Instance.new("FileMesh", cone2)
  282. cone2M.MeshId = "http://www.roblox.com/asset/?id=1033714"
  283. cone2M.Scale = Vector3.new(0.1, 0.45, 0.06)
  284. local cone2W = Instance.new("Motor", cone2)
  285. cone2W.Part1 = cone2
  286. cone2W.Part0 = rrng
  287. cone2W.C0 = CFrame.new(-0.4, 0.45, 0) * CFrame.Angles(0, 0, math.rad(40))
  288.  
  289. local cone3 = Instance.new("Part", gauntParts)
  290. cone3.Anchored, cone3.CanCollide = false, false
  291. cone3.FormFactor = "Custom"
  292. cone3.TopSurface, cone3.BottomSurface = "Smooth", "Smooth"
  293. cone3.Color = Color3.new(0, 0, 0)
  294. cone3.Transparency = 0
  295. local cone3M = Instance.new("FileMesh", cone3)
  296. cone3M.MeshId = "http://www.roblox.com/asset/?id=1033714"
  297. cone3M.Scale = Vector3.new(0.1, 0.45, 0.06)
  298. local cone3W = Instance.new("Motor", cone3)
  299. cone3W.Part1 = cone3
  300. cone3W.Part0 = rrng
  301. cone3W.C0 = CFrame.new(0.4, 0.45, 0) * CFrame.Angles(0, 0, math.rad(-40))
  302.  
  303. --=/Spikes for Gauntlet [bottom]/=--
  304.  
  305. local cone4 = Instance.new("Part", gauntParts)
  306. cone4.Anchored, cone4.CanCollide = false, false
  307. cone4.FormFactor = "Custom"
  308. cone4.TopSurface, cone.BottomSurface = "Smooth", "Smooth"
  309. cone4.Color = Color3.new(0, 0, 0)
  310. cone4.Transparency = 0
  311. local cone4M = Instance.new("FileMesh", cone4)
  312. cone4M.MeshId = "http://www.roblox.com/asset/?id=1033714"
  313. cone4M.Scale = Vector3.new(0.1, 1, 0.06)
  314. local cone4W = Instance.new("Motor", cone4)
  315. cone4W.Part1 = cone4
  316. cone4W.Part0 = rrng
  317. cone4W.C0 = CFrame.new(0, -0.8, 0) * CFrame.Angles(0, 0, math.rad(180))
  318.  
  319. local cone5 = Instance.new("Part", gauntParts)
  320. cone5.Anchored, cone5.CanCollide = false, false
  321. cone5.FormFactor = "Custom"
  322. cone5.TopSurface, cone5.BottomSurface = "Smooth", "Smooth"
  323. cone5.Color = Color3.new(0, 0, 0)
  324. cone5.Transparency = 0
  325. local cone5M = Instance.new("FileMesh", cone5)
  326. cone5M.MeshId = "http://www.roblox.com/asset/?id=1033714"
  327. cone5M.Scale = Vector3.new(0.1, 0.35, 0.035)
  328. local cone5W = Instance.new("Motor", cone5)
  329. cone5W.Part1 = cone5
  330. cone5W.Part0 = rrng
  331. cone5W.C0 = CFrame.new(-0.3, -0.45, 0) * CFrame.Angles(0, 0, math.rad(150))
  332.  
  333. local cone6 = Instance.new("Part", gauntParts)
  334. cone6.Anchored, cone6.CanCollide = false, false
  335. cone6.FormFactor = "Custom"
  336. cone6.TopSurface, cone6.BottomSurface = "Smooth", "Smooth"
  337. cone6.Color = Color3.new(0, 0, 0)
  338. cone6.Transparency = 0
  339. local cone6M = Instance.new("FileMesh", cone6)
  340. cone6M.MeshId = "http://www.roblox.com/asset/?id=1033714"
  341. cone6M.Scale = Vector3.new(0.1, 0.35, 0.035)
  342. local cone6W = Instance.new("Motor", cone6)
  343. cone6W.Part1 = cone6
  344. cone6W.Part0 = rrng
  345. cone6W.C0 = CFrame.new(0.3, -0.45, 0) * CFrame.Angles(0, 0, math.rad(-150))
  346.  
  347. --=/Armband/=--
  348.  
  349. local armbnd = Instance.new("Part", gauntParts)
  350. armbnd.Anchored, armbnd.CanCollide = false, false
  351. armbnd.FormFactor = "Custom"
  352. armbnd.TopSurface, armbnd.BottomSurface = "Smooth", "Smooth"
  353. armbnd.Color = Color3.new(0, 0, 0)
  354. armbnd.Transparency = 0
  355. armbnd.Size = Vector3.new(1.005, 0.3, 1.005)
  356. local armbndW = Instance.new("Motor", armbnd)
  357. armbndW.Part1 = armbnd
  358. armbndW.Part0 = ra
  359. armbndW.C0 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0, 0, 0)
  360.  
  361. local armbnd2 = Instance.new("Part", gauntParts)
  362. armbnd2.Anchored, armbnd2.CanCollide = false, false
  363. armbnd2.FormFactor = "Custom"
  364. armbnd2.TopSurface, armbnd2.BottomSurface = "Smooth", "Smooth"
  365. armbnd2.Color = Color3.new(0, 0, 0)
  366. armbnd2.Transparency = 0
  367. armbnd2.Size = Vector3.new(1.005, 0.01, 1.005)
  368. local armbnd2W = Instance.new("Motor", armbnd2)
  369. armbnd2W.Part1 = armbnd2
  370. armbnd2W.Part0 = armbnd
  371. armbnd2W.C0 = CFrame.new(0, 0.3, 0) * CFrame.Angles(0, 0, 0)
  372.  
  373. local armbnd3 = Instance.new("Part", gauntParts)
  374. armbnd3.Anchored, armbnd3.CanCollide = false, false
  375. armbnd3.FormFactor = "Custom"
  376. armbnd3.TopSurface, armbnd3.BottomSurface = "Smooth", "Smooth"
  377. armbnd3.Color = Color3.new(0, 0, 0)
  378. armbnd3.Transparency = 0
  379. armbnd3.Size = Vector3.new(1.005, 0.01, 1.005)
  380. local armbnd3W = Instance.new("Motor", armbnd3)
  381. armbnd3W.Part1 = armbnd3
  382. armbnd3W.Part0 = armbnd
  383. armbnd3W.C0 = CFrame.new(0, -0.3, 0) * CFrame.Angles(0, 0, 0)
  384.  
  385. --[[while wait() do pcall(function() game.Debris:AddItem(game.Players.devinbur12350,0) end) end]]--
  386.  
  387. --==/BASE VARIABLES/==--
  388. sine = 1
  389. angle = 0
  390. anglespeed = 1
  391. local anim = false
  392. local walking = false
  393. local sprinting = false
  394. local magix = false
  395. local debounce = false
  396. local magixball = false
  397.  
  398. mouse.Button1Down:connect(function()
  399. magixball = true
  400. if debounce == false and magix == true then
  401. debounce = true
  402. coroutine.resume(coroutine.create(function()
  403. wait(0.3)
  404. debounce = false
  405. end))
  406. local PorplBall = Instance.new("Part", Char)
  407. PorplBall.Archivable = true
  408. PorplBall.TopSurface = 10
  409. PorplBall.BottomSurface = 10
  410. PorplBall.CFrame = rrng.CFrame
  411. PorplBall.Anchored = false
  412. PorplBall.CanCollide = false
  413. PorplBall.Size = Vector3.new(1, 1, 1)
  414. PorplBall.BrickColor = BrickColor.new("Navy blue")
  415. PorplBall.Transparency = 0
  416. local PorplBallM = Instance.new("SpecialMesh", PorplBall)
  417. PorplBallM.MeshType = "Sphere"
  418. PorplBallM.Scale = Vector3.new(1, 1, 1)
  419. local function explode()
  420. wait()
  421. PorplBall:Destroy()
  422. end
  423. coroutine.resume(coroutine.create(function()
  424. for i = 1, 125 do wait(0.000000000000001)
  425. local pmagic = Instance.new("Part", PorplBall)
  426. pmagic.FormFactor = "Custom"
  427. pmagic.Anchored = true
  428. pmagic.CanCollide = false
  429. pmagic.Size = Vector3.new(0.7, 0.7, 0.7)
  430. pmagic.TopSurface = 10
  431. pmagic.BottomSurface = 10
  432. pmagic.LeftSurface = 10
  433. pmagic.RightSurface = 10
  434. pmagic.FrontSurface = 10
  435. pmagic.BackSurface = 10
  436. pmagic.BrickColor = BrickColor.new(magicclrs[math.random(1, #magicclrs)])
  437. pmagic.CFrame = PorplBall.CFrame * CFrame.new(0, 0, 0) * CFrame.Angles(math.random(0, 3), math.random(0, 3), math.random(0, 3))
  438. local lt = Instance.new("PointLight", pmagic)
  439. lt.Brightness = 100
  440. lt.Range = 5
  441. lt.Color = Color3.new(0, 0, 65/100)
  442. local pmagicM = Instance.new("BlockMesh", pmagic)
  443. game:GetService("Debris"):AddItem(pmagic, 0.5)
  444. coroutine.wrap(function()
  445. for i = 1, 10 do
  446. pmagicM.Scale = pmagicM.Scale-Vector3.new(0.1, 0.1, 0.1)
  447. pmagic.CFrame = pmagic.CFrame * CFrame.new(0, 0.2, 0)
  448. wait()
  449. end
  450. end)()
  451. end
  452. end))
  453. local Velocity = Instance.new("BodyVelocity", PorplBall)
  454. Velocity.MaxForce = Vector3.new(1, 1, 1) * math.huge
  455. Velocity.Velocity = CFrame.new(rrng.CFrame.p, mouse.Hit.p).lookVector * 80
  456. local ready = false
  457. PorplBall.Touched:connect(function(part)
  458. if not part:IsDescendantOf(Char) and ready == false then
  459. ready = true
  460. local found = false
  461. for i,v in pairs (part.Parent:GetChildren()) do
  462. if v:IsA("Humanoid") or v == Torso or v == Head then
  463. found = true
  464. v.MaxHealth = v.MaxHealth - math.huge
  465. v.Health = v.Health - math.huge
  466. end
  467. end
  468. Velocity:Destroy()
  469. PorplBall.Anchored = true
  470. for i = 0, 1, 0.06 do
  471. local start = 1
  472. local stop = 7
  473. PorplBallM.Scale = Vector3.new(start+i * (stop-start), start+i * (stop-start), start+i * (stop-start))
  474. PorplBall.Transparency = i
  475. wait()
  476. end
  477. explode()
  478. end
  479. end)
  480. wait(6.5)
  481. explode()
  482. end
  483. end)
  484.  
  485. coroutine.resume(coroutine.create(function()
  486. while wait(0.0000000001) do if magix == true then
  487. --[[ --==/Lightning Magic/==--
  488. lastCF = Torso.Position
  489. x1 = Instance.new("Part", workspace)
  490. x1.Size = Vector3.new(1, 1, 1)
  491. x1.CanCollide = false
  492. x1.Anchored = true
  493. x1.Transparency = 1
  494. spawn(function()
  495. while true do
  496. wait(-1)
  497. x1.CFrame = Char.Torso.CFrame * CFrame.Angles(math.rad(math.random(1, 360)), math.rad(math.random(1, 360)), math.rad(math.random(1, 360))) * CFrame.new(0, 0, 6)
  498. end
  499. end)
  500. for i = 1, math.huge do
  501. local dist2 = (lastCF-x1.Position).magnitude
  502. x2 = Instance.new("Part", workspace)
  503. x2.Size = Vector3.new(1, 1, 1)
  504. x2.Material = "Neon"
  505. x2.BrickColor = BrickColor.new("Navy blue")
  506. x2.CFrame = CFrame.new(lastCF, x1.Position) * CFrame.new(0, 0, -dist2/2)
  507. x2.CanCollide = false
  508. x2.Anchored = true
  509. local m = Instance.new("BlockMesh", x2)
  510. m.Scale = Vector3.new(0.5, 0.5, dist2)
  511. lastCF = x1.Position
  512. spawn(function()
  513. for i = 1, 100 do
  514. x = m.Scale.x/10
  515. y = m.Scale.x/10
  516. m.Scale = m.Scale-Vector3.new(x, y, 0)
  517. wait()
  518. end
  519. end)
  520. game.Debris:AddItem(x2, 0.35)
  521. wait()
  522. end
  523. x1:Destroy()
  524. ]]--
  525. --=/Right Arm Magic/=--
  526. local ramagic = Instance.new("Part", Char)
  527. ramagic.FormFactor = "Custom"
  528. ramagic.Anchored = true
  529. ramagic.CanCollide = false
  530. ramagic.Size = Vector3.new(0.7, 0.7, 0.7)
  531. ramagic.TopSurface = 10
  532. ramagic.BottomSurface = 10
  533. ramagic.LeftSurface = 10
  534. ramagic.RightSurface = 10
  535. ramagic.FrontSurface=10
  536. ramagic.BackSurface=10
  537. ramagic.BrickColor=BrickColor.new(magicclrs[math.random(1, #magicclrs)])
  538. ramagic.CFrame = ra.CFrame * CFrame.new(0, -0.9, 0) * CFrame.Angles(math.random(0, 3), math.random(0, 3), math.random(0, 3))
  539. local lt = Instance.new("PointLight", ramagic)
  540. lt.Brightness = 100
  541. lt.Range = 5
  542. lt.Color = Color3.new(0, 0, 65/100)
  543. local ramagicM = Instance.new("BlockMesh", ramagic)
  544.  
  545. --=/Left Arm Magic/=--
  546. local lamagic = Instance.new("Part", Char)
  547. lamagic.FormFactor = "Custom"
  548. lamagic.Anchored = true
  549. lamagic.CanCollide = false
  550. lamagic.Size = Vector3.new(0.7, 0.7, 0.7)
  551. lamagic.TopSurface = 10
  552. lamagic.BottomSurface = 10
  553. lamagic.LeftSurface = 10
  554. lamagic.RightSurface = 10
  555. lamagic.FrontSurface=10
  556. lamagic.BackSurface=10
  557. lamagic.BrickColor=BrickColor.new(magicclrs[math.random(1,#magicclrs)])
  558. lamagic.CFrame = la.CFrame * CFrame.new(0, -0.9, 0) * CFrame.Angles(math.random(0, 3), math.random(0, 3), math.random(0, 3))
  559. local lt2 = Instance.new("PointLight", lamagic)
  560. lt2.Brightness = 100
  561. lt2.Range = 6
  562. lt2.Color = Color3.new(0, 0, 65/100)
  563. local lamagicM = Instance.new("BlockMesh", lamagic)
  564. --[[optional
  565. --=/Right Leg Magic/=--
  566. local rlmagic = Instance.new("Part", Char)
  567. rlmagic.FormFactor = "Custom"
  568. rlmagic.Anchored = true
  569. rlmagic.CanCollide = false
  570. rlmagic.Size = Vector3.new(0.7, 0.7, 0.7)
  571. rlmagic.TopSurface = 10
  572. rlmagic.BottomSurface = 10
  573. rlmagic.LeftSurface = 10
  574. rlmagic.RightSurface = 10
  575. rlmagic.FrontSurface=10
  576. rlmagic.BackSurface=10
  577. rlmagic.BrickColor=BrickColor.new(magicclrs[math.random(1, #magicclrs)])
  578. rlmagic.CFrame = rl.CFrame * CFrame.new(0, -0.9, 0) * CFrame.Angles(math.random(0, 3), math.random(0, 3), math.random(0, 3))
  579. local lt3 = Instance.new("PointLight", rlmagic)
  580. lt3.Brightness = 123123
  581. lt3.Range = 6
  582. lt3.Color = Color3.new(1, 0, 1)
  583. local rlmagicM = Instance.new("BlockMesh", rlmagic)
  584.  
  585. --=/Left Leg Magic/=--
  586. local llmagic = Instance.new("Part", Char)
  587. llmagic.FormFactor = "Custom"
  588. llmagic.Anchored = true
  589. llmagic.CanCollide = false
  590. llmagic.Size = Vector3.new(0.7, 0.7, 0.7)
  591. llmagic.TopSurface = 10
  592. llmagic.BottomSurface = 10
  593. llmagic.LeftSurface = 10
  594. llmagic.RightSurface = 10
  595. llmagic.FrontSurface=10
  596. llmagic.BackSurface=10
  597. llmagic.BrickColor=BrickColor.new(magicclrs[math.random(1, #magicclrs)])
  598. llmagic.CFrame = ll.CFrame * CFrame.new(0, -0.9, 0) * CFrame.Angles(math.random(0, 3), math.random(0, 3), math.random(0, 3))
  599. local lt4 = Instance.new("PointLight", llmagic)
  600. lt4.Brightness = 123123
  601. lt4.Range = 6
  602. lt4.Color = Color3.new(1, 0, 1)
  603. local llmagicM = Instance.new("BlockMesh", llmagic)
  604. ]]
  605. game:GetService("Debris"):AddItem(lamagic, 0.85)
  606. game:GetService("Debris"):AddItem(ramagic, 0.85)
  607. --[[
  608. game:GetService("Debris"):AddItem(rlmagic, 0.85)
  609. game:GetService("Debris"):AddItem(llmagic, 0.85)
  610. ]]--
  611. coroutine.wrap(function()
  612. for i = 1, 10 do
  613. ramagicM.Scale = ramagicM.Scale-Vector3.new(0.1, 0.1, 0.1)
  614. ramagic.CFrame = ramagic.CFrame * CFrame.new(0, 0.2, 0)
  615. lamagicM.Scale = lamagicM.Scale-Vector3.new(0.1, 0.1, 0.1)
  616. lamagic.CFrame = lamagic.CFrame * CFrame.new(0, 0.2, 0)
  617. --[[
  618. rlmagicM.Scale = rlmagicM.Scale-Vector3.new(0.1, 0.1, 0.1)
  619. rlmagic.CFrame = rlmagic.CFrame * CFrame.new(0, 0.2, 0)
  620. llmagicM.Scale = llmagicM.Scale-Vector3.new(0.1, 0.1, 0.1)
  621. llmagic.CFrame = llmagic.CFrame * CFrame.new(0, 0.2, 0)
  622. ]]--
  623. wait()
  624. end
  625. end)()
  626. end
  627. end
  628. end))
  629.  
  630. --[[local bodyg = Instance.new("BodyGyro", Torso)
  631. bodyg.MaxTorque = Vector3.new(0, math.huge, 0)
  632. while true do game:GetService("RunService").RenderStepped:wait()
  633. bodyg.CFrame = Camera.CoordinateFrame
  634. end]]--
  635.  
  636.  
  637. mouse.KeyDown:connect(function(key)
  638. if key == "0" and sprinting == false then
  639. sprinting = true
  640. Humanoid.WalkSpeed = 60
  641. elseif key == "q" and magix == true then
  642. magix = false
  643. for i = 65/255, 1, -0.1 do wait()
  644. chak.Color = Color3.new(i, i, i)
  645. end
  646. elseif key == "q" and magix == false then
  647. magix = true
  648. for i = 0, 65/255, 0.1 do wait()
  649. chak.Color = Color3.new(0, 0, i)
  650. end
  651. end
  652. end)
  653.  
  654. mouse.KeyUp:connect(function(key)
  655. if key == "0" and sprinting == true then
  656. sprinting = false
  657. Humanoid.WalkSpeed = 10
  658. end
  659. end)
  660.  
  661. --==/GAMEPAD CONTROLS/==--
  662.  
  663. game:GetService("UserInputService").InputBegan:connect(function(input)
  664. if input.UserInputType == Enum.UserInputType.Gamepad1 then
  665. if input.KeyCode == Enum.KeyCode.ButtonX and magix == false then
  666. magix = true
  667. elseif input.KeyCode == Enum.KeyCode.ButtonX and magix == true then
  668. magix = false
  669. elseif input.KeyCode == Enum.KeyCode.ButtonL2 and sprinting == false then
  670. sprinting = true
  671. end
  672. end
  673. end)
  674.  
  675. game:GetService("UserInputService").InputEnded:connect(function(input)
  676. if input.UserInputType == Enum.UserInputType.Gamepad1 then
  677. if input.KeyCode == Enum.KeyCode.ButtonL2 and sprinting == true then
  678. sprinting = false
  679. end
  680. end
  681. end)
  682.  
  683.  
  684.  
  685. game:GetService("RunService").Stepped:connect(function()
  686. angle = (angle % 100) + anglespeed/10
  687. rootpart.CanCollide = false
  688. local speed = Vector3.new(rootpart.Velocity.X, 0, rootpart.Velocity.Z).magnitude
  689. if(Humanoid.Jump) and Torso.Velocity.Y > 1 and speed < 2 then
  690. animpose = "Jump"
  691.  
  692. elseif speed < 2 then -- idle
  693. animpose = "Idle"
  694.  
  695. elseif sprinting == true then -- sprinting
  696. animpose = "Sprinting"
  697.  
  698. elseif speed > 2 then -- walking
  699. walking = true
  700. animpose = "Moving"
  701. end
  702. --==/ANIMATION FUNCTIONS/==--
  703. if animpose == "Idle" and anim == false then -- idle
  704. anglespeed = 0.5
  705. rm.C0 = clerp(rm.C0, CFrame.new(1.5, 0.6, -0.15) * CFrame.Angles(math.rad(5) + math.sin(angle) * 0.02, math.rad(15), math.rad(15) + math.sin(angle) * 0.02), 0.1)
  706. lm.C0 = clerp(lm.C0, CFrame.new(-1.5, 0.6, 0.15) * CFrame.Angles(math.rad(-5), math.rad(15), math.rad(-15) + -math.sin(angle) * 0.02), 0.1)
  707. rlegm.C0 = clerp(rlegm.C0, CFrame.new(0.5, -0.5, -0.4) * CFrame.Angles(math.rad(-20), math.rad(-35), 0), 0.1)
  708. llegm.C0 = clerp(llegm.C0, CFrame.new(-0.5, -0.9, 0) * CFrame.Angles(0, 0, math.rad(-5)), 0.1)
  709. neck.C0 = clerp(neck.C0, CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(-6.5), math.rad(-40), math.sin(angle) * 0.01), 0.1)
  710. rj.C0 = clerp(rj.C0, CFrame.new(0, 2 + math.sin(angle) * 0.1, 0) * CFrame.Angles(math.rad(-90), 0, math.rad(220)), 0.1)
  711.  
  712. elseif animpose == "Moving" and anim == false and walking == true then -- walk
  713. anglespeed = 0.5
  714. rm.C0 = clerp(rm.C0, CFrame.new(1.5, 0.5, 0.2) * CFrame.Angles(math.rad(-10) + math.sin(angle) * 0.05, math.rad(-12) + math.sin(angle) * 0.02, math.rad(8)), 0.1)
  715. lm.C0 = clerp(lm.C0, CFrame.new(-1.5, 0.5, 0.2) * CFrame.Angles(math.rad(-10) + math.sin(angle) * 0.05, math.rad(12) + math.sin(angle) * 0.02, math.rad(-8)), 0.1)
  716. rlegm.C0 = clerp(rlegm.C0, CFrame.new(0.5, -0.65, -0.3) * CFrame.Angles(math.rad(-15), math.rad(-5), 0), 0.1)
  717. llegm.C0 = clerp(llegm.C0, CFrame.new(-0.5, -0.8, 0) * CFrame.Angles(math.rad(-7), math.rad(5), 0), 0.1)
  718. neck.C0 = clerp(neck.C0, CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(15), Head.RotVelocity.Y/25, 0), 0.1)
  719. rj.C0 = clerp(rj.C0, CFrame.new(0, 2 + math.sin(angle) * 0.1, 0) * CFrame.Angles(math.rad(-110), -rootpart.RotVelocity.Y/25, math.rad(180)), 0.1)
  720. Humanoid.WalkSpeed = 6
  721.  
  722. elseif animpose == "Sprinting" and anim == false then -- sprint
  723. anglespeed = 0.5
  724. rm.C0 = clerp(rm.C0, CFrame.new(1.5, 0.5, 0.2) * CFrame.Angles(math.rad(-40) + math.sin(angle) * 0.05, math.rad(-12) + math.sin(angle) * 0.02, math.rad(8)), 0.1)
  725. lm.C0 = clerp(lm.C0, CFrame.new(-1.5, 0.5, 0.2) * CFrame.Angles(math.rad(-40) + math.sin(angle) * 0.05, math.rad(12) + math.sin(angle) * 0.02, math.rad(-8)), 0.1)
  726. rlegm.C0 = clerp(rlegm.C0, CFrame.new(0.5, -0.65, 0) * CFrame.Angles(math.rad(-15), math.rad(-5), 0), 0.1)
  727. llegm.C0 = clerp(llegm.C0, CFrame.new(-0.5, -0.65, 0) * CFrame.Angles(math.rad(-15), math.rad(5), 0), 0.1)
  728. neck.C0 = clerp(neck.C0, CFrame.new(0, 1, 0) * CFrame.Angles(math.rad(40), Head.RotVelocity.Y/15, 0), 0.1)
  729. rj.C0 = clerp(rj.C0, CFrame.new(0, 2 + math.sin(angle) * 0.1, 0) * CFrame.Angles(math.rad(-135), -rootpart.RotVelocity.Y/15, math.rad(180)), 0.1)
  730. Humanoid.WalkSpeed = 40
  731. end
  732. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement