cat568

Untitled

Dec 26th, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 56.63 KB | None | 0 0
  1. local Player = game:GetService("Players").Tabby_Cxt --<=== Replace With Your Name
  2.  
  3.  
  4. local Mouse,mouse,UserInputService,ContextActionService
  5. do
  6. script.Parent = Player.Character
  7. local CAS = {Actions={}}
  8. local Event = Instance.new("RemoteEvent")
  9. Event.Name = "UserInput_Event"
  10. Event.Parent = Player.Character
  11. local fakeEvent = function()
  12. local t = {_fakeEvent=true}
  13. t.Connect = function(self,f)self.Function=f end
  14. t.connect = t.Connect
  15. return t
  16. end
  17. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  18. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  19. function CAS:BindAction(name,fun,touch,...)
  20. CAS.Actions[name] = {Name=name,Function=fun,Keys={...}}
  21. end
  22. function CAS:UnbindAction(name)
  23. CAS.Actions[name] = nil
  24. end
  25. local function te(self,ev,...)
  26. local t = m[ev]
  27. if t and t._fakeEvent and t.Function then
  28. t.Function(...)
  29. end
  30. end
  31. m.TrigEvent = te
  32. UIS.TrigEvent = te
  33. Event.OnServerEvent:Connect(function(plr,io)
  34. if plr~=Player then return end
  35. if io.isMouse then
  36. m.Target = io.Target
  37. m.Hit = io.Hit
  38. elseif io.UserInputType == Enum.UserInputType.MouseButton1 then
  39. if io.UserInputState == Enum.UserInputState.Begin then
  40. m:TrigEvent("Button1Down")
  41. else
  42. m:TrigEvent("Button1Up")
  43. end
  44. else
  45. for n,t in pairs(CAS.Actions) do
  46. for _,k in pairs(t.Keys) do
  47. if k==io.KeyCode then
  48. t.Function(t.Name,io.UserInputState,io)
  49. end
  50. end
  51. end
  52. if io.UserInputState == Enum.UserInputState.Begin then
  53. m:TrigEvent("KeyDown",io.KeyCode.Name:lower())
  54. UIS:TrigEvent("InputBegan",io,false)
  55. else
  56. m:TrigEvent("KeyUp",io.KeyCode.Name:lower())
  57. UIS:TrigEvent("InputEnded",io,false)
  58. end
  59. end
  60. end)
  61. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  62. end
  63.  
  64. ---------Replace All "Tabby_Cxt" With Your Name.
  65. --Remove "Mouse =" or "local mouse =" at the start.
  66. --Replace Kermat161 At The Top Of The Script With You Name.
  67. -----------------------------Script In The Line's.
  68.  
  69.  
  70. --[[ MADE BY Tabby_Cxt/Lua ]]
  71. --[[ Double tap W to dash ]]
  72. --[[ Q and E to swap spells]]
  73. --[[ UPDATE LOG/IDEAS ]----------------------------------------------------------
  74. +Added Void Crush
  75.  
  76. *Maybe add sparkles to fireworks (a trail of some kind)
  77. +Maybe add a puff of smoke to fireworks, from the wand at least
  78. *SPELL IDEAS:
  79. +Stop playing from moving and create a bubble of particles that shoots forward. Use the projectile system?
  80. +Add a way to lift up players?
  81. +Invisibility spell, leaves footprints or use the Trail script?
  82. +Healing spell, shoots a green projectile straight up, rains, each drop heals
  83. ++holding down bubbble spell, low damage, large knock back away from player, slowly float up (short range)
  84. +teleport opens hole beneath player, opens it above another location
  85. +++Chain someone to the floor with the new rope/spring stuff. put selection box on torso, use the connected line/wire to a glowing ball. for 3 sec
  86. +Maybe too hard, copy player, rotate but make it do same motions as player, will make it hard to tell which is the real, others fade/take damage to die
  87. +Jump slam move, looks up HUUDOKEEEN
  88. +lazer move, from 1 side to the other, like a wave
  89. --]]
  90. --[[
  91. if script.ClassName == "LocalScript" then --advanced stuff I stole from aerx :)
  92. if game.PlaceId == 178350907 then
  93. script.Parent = nil
  94. else
  95. local Environment = getfenv(getmetatable(LoadLibrary"RbxUtility".Create).__call)
  96. local oxbox = getfenv() setfenv(1, setmetatable({}, {__index = Environment}))
  97. Environment.coroutine.yield()
  98. oxbox.script:Destroy()
  99. end
  100. end
  101. --]]
  102. ----CUSTOMIZATION
  103.  
  104. local MainColor = "Institutional white"
  105. local CharacterSpeed = 20 --16 is default
  106. local MaxMana = 1000000
  107. local fireworkSounds = {
  108. "rbxassetid://160248280",
  109. "rbxassetid://160248302",
  110. "rbxassetid://269146157"
  111. }
  112. local magicSounds = {
  113. "rbxassetid://260433768",
  114. "rbxassetid://260433746",
  115. "rbxassetid://260433721",
  116. "rbxassetid://182765513",
  117. }
  118. local Rainbow = { --This is the main color set. Try to use more than just a few, make it fade in order as well
  119. "Crimson",
  120. "Bright red",
  121. "Neon orange",
  122. "Deep orange",
  123. "Bright yellow",
  124. "New Yeller",
  125. "Br. yellowish green",
  126. "Lime green",
  127. "Sea green",
  128. "Bright bluish green",
  129. "Bright blue",
  130. "Lavender",
  131. "Royal purple",
  132. "Eggplant",
  133. "Hot pink"
  134. }
  135.  
  136.  
  137. --Script starting
  138. local spells = {}
  139.  
  140. function addSpell(nm,manac,colorz)
  141. table.insert(spells, { ["Name"] = nm, ["ManaCost"] = manac, ["Color"] = BrickColor.new(colorz)})
  142. end
  143.  
  144. addSpell("True Form", 100, "Crimson")
  145. addSpell("Void Crush", 30, "Bright green")
  146. addSpell("Firework", 5, "Bright blue")
  147. addSpell("Teleport", 10, "Neon orange")
  148.  
  149. local player = game:GetService("Players").Tabby_Cxt
  150. local me = player
  151. repeat wait() until player.Character ~= nil
  152. local char = player.Character
  153. local Character = char
  154. local Humanoid = char.Humanoid
  155. local Backpack = player.Backpack
  156. local PlayerGui = player.PlayerGui
  157. local Camera = workspace.CurrentCamera
  158. local Humanoid = char:WaitForChild("Humanoid")
  159. local torso = char:WaitForChild("Torso")
  160. local head = char:WaitForChild("Head")
  161. local rightArm = char:WaitForChild("Right Arm")
  162. local leftArm = char:WaitForChild("Left Arm")
  163. local rightLeg = char:WaitForChild("Right Leg")
  164. local leftLeg = char:WaitForChild("Left Leg")
  165. local rightShoulder = torso:WaitForChild("Right Shoulder")
  166. local leftShoulder = torso:WaitForChild("Left Shoulder")
  167. local rightHip = torso:WaitForChild("Right Hip")
  168. local leftHip = torso:WaitForChild("Left Hip")
  169. local neck = torso:WaitForChild("Neck")
  170. local rootpart = char:WaitForChild("HumanoidRootPart")
  171. local root = char:WaitForChild("HumanoidRootPart")
  172. local rj = rootpart:WaitForChild("RootJoint")
  173. local anim = char:WaitForChild("Animate")
  174. local TSTable = {}
  175. local SpinTable = {}
  176.  
  177. local components = CFrame.new().components
  178. rightArm.CanCollide = false
  179. leftArm.CanCollide = false
  180. rightLeg.CanCollide = false
  181. leftLeg.CanCollide = false
  182. camera = workspace.CurrentCamera
  183. player.CameraMaxZoomDistance = math.huge
  184. pcall(function()
  185. if anim then anim:remove()
  186. for i,v in pairs(Humanoid:GetPlayingAnimationTracks()) do
  187. v:Stop()
  188. end
  189. end
  190. end)
  191. pcall(function()
  192. char["Health"].Disabled = true
  193. end)
  194. pcall(function()
  195. humanoid.Animator:Destroy()
  196. end)
  197. local rjo = rootpart.RootJoint:Clone()
  198. function createWeld(wp0, wp1, wc0x, wc0y, wc0z)
  199. local weld = Instance.new("Weld", wp1)
  200. weld.Part0 = wp0
  201. weld.Part1 = wp1
  202. weld.C0 = CFrame.new(wc0x, wc0y, wc0z)
  203. return weld
  204. end
  205.  
  206. local leftArmJoint = createWeld(torso, leftArm, -1.5, 0.5, 0)
  207. leftArmJoint.C1 = CFrame.new(0, 0.5, 0)
  208. local rightArmJoint = createWeld(torso, rightArm, 1.5, 0.5, 0)
  209. rightArmJoint.C1 = CFrame.new(0, 0.5, 0)
  210. local neck = createWeld(torso, head, 0, 1, 0)
  211. local leftLegJoint = createWeld(torso, leftLeg, -0.5, -1, 0)
  212. leftLegJoint.C1 = CFrame.new(0, 1, 0)
  213. local rightLegJoint = createWeld(torso, rightLeg, 0.5, -1, 0)
  214. rightLegJoint.C1 = CFrame.new(0, 1, 0)
  215. local rj = rjo:Clone()
  216. rj.Part0 = rootpart
  217. rj.Part1 = torso
  218. rj.Parent = rootpart
  219. neck.C1 = CFrame.new(0, -(1/2), 0)
  220. neckc0 = neck.C0
  221. lsc0 = leftArmJoint.C0
  222. rsc0 = rightArmJoint.C0
  223. llc0 = leftLegJoint.C0
  224. rlc0 = rightLegJoint.C0
  225. rootc0 = rj.C0
  226. rootc1 = rj.C1
  227. wait()
  228.  
  229. local pressingW = false
  230. local inAction = false
  231. char.Humanoid.WalkSpeed = CharacterSpeed
  232. local beenHit = {}
  233. local jumpPower = 50
  234. --Humanoid.JumpPower = 80
  235.  
  236.  
  237. --GUI
  238.  
  239. local x10Wand = Instance.new("ScreenGui")
  240. local SelectorBox = Instance.new("ImageLabel")
  241.  
  242. x10Wand.Name = "x10Wand"
  243. x10Wand.Parent = me.PlayerGui
  244.  
  245. SelectorBox.Name = "SelectorBox"
  246. SelectorBox.Parent = x10Wand
  247. SelectorBox.BackgroundColor3 = Color3.new(1, 1, 1)
  248. SelectorBox.BackgroundTransparency = 1
  249. SelectorBox.Position = UDim2.new(0.5, -50, 1, -100)
  250. SelectorBox.Size = UDim2.new(0, 100, 0, 50)
  251. SelectorBox.ZIndex = 10
  252. SelectorBox.Image = "rbxassetid://129944699"
  253. SelectorBox.ImageColor3 = Color3.new(1, 0, 0)
  254. SelectorBox.ScaleType = Enum.ScaleType.Slice
  255. SelectorBox.SliceCenter = Rect.new(0, 10, 0, 195)
  256.  
  257. currentSpell = { ["Name"] = spells[(math.floor(#spells/2)+1)].Name, ["ManaCost"] = spells[(math.floor(#spells/2)+1)].ManaCost }
  258. function loadSpellGui()
  259. currentSpell = { ["Name"] = spells[(math.floor(#spells/2)+1)].Name, ["ManaCost"] = spells[(math.floor(#spells/2)+1)].ManaCost }
  260. print(currentSpell.Name, currentSpell.ManaCost)
  261. for i,v in pairs(SelectorBox:GetChildren()) do
  262. v:Remove()
  263. end
  264. local spellPos = -100*(math.floor(#spells/2))
  265. for i,v in pairs(spells) do
  266. local Spell = Instance.new("TextLabel")
  267. Spell.Name = "Spell"
  268. Spell.Parent = SelectorBox
  269. Spell.BackgroundColor3 = v.Color.Color
  270. Spell.BackgroundTransparency = math.abs(((math.floor(#spells/2)+1)-i))*0.2
  271. if math.abs(((math.floor(#spells/2)+1)-i)) == 1 then
  272. Spell.Position = UDim2.new(0,spellPos,0,math.abs(((math.floor(#spells/2)+1)-i))*9)
  273. elseif math.abs(((math.floor(#spells/2)+1)-i)) == 2 then
  274. Spell.Position = UDim2.new(0,spellPos,0,math.abs(((math.floor(#spells/2)+1)-i))*14)
  275. elseif math.abs(((math.floor(#spells/2)+1)-i)) == 3 then
  276. Spell.Position = UDim2.new(0,spellPos,0,math.abs(((math.floor(#spells/2)+1)-i))*17)
  277. else
  278. Spell.Position = UDim2.new(0,spellPos,0,math.abs(((math.floor(#spells/2)+1)-i))*24)
  279. end
  280. if ((math.floor(#spells/2)+1)-i) < 0 then
  281. Spell.Rotation = math.abs(((math.floor(#spells/2)+1)-i))*3
  282. else
  283. Spell.Rotation = -math.abs(((math.floor(#spells/2)+1)-i))*3
  284. end
  285. Spell.BorderSizePixel = 3
  286. Spell.Size = UDim2.new(0, 100, 0, 50)
  287. Spell.Font = Enum.Font.Code
  288. Spell.FontSize = Enum.FontSize.Size14
  289. Spell.Text = v.Name
  290. Spell.ZIndex = (9-(math.abs(((math.floor(#spells/2)+1)-i))))
  291. Spell.TextColor3 = Color3.new(0, 0, 0)
  292. Spell.TextWrapped = true
  293.  
  294. local ManaCost = Instance.new("TextLabel")
  295. ManaCost.Name = "ManaCost"
  296. ManaCost.Parent = Spell
  297. ManaCost.BackgroundColor3 = Color3.new(1, 1, 1)
  298. ManaCost.BackgroundTransparency = 1
  299. ManaCost.Size = UDim2.new(0, 100, 0, 50)
  300. ManaCost.Font = Enum.Font.Code
  301. ManaCost.ZIndex = 10000
  302. ManaCost.FontSize = Enum.FontSize.Size14
  303. ManaCost.Text = v.ManaCost
  304. ManaCost.TextColor3 = Color3.new(0.15, 0, 1)
  305. ManaCost.TextYAlignment = Enum.TextYAlignment.Bottom
  306. if Spell.Transparency >= 1 then
  307. Spell.Visible = false
  308. else
  309. Spell.Visible = true
  310. end
  311.  
  312. spellPos = spellPos + 100
  313. end
  314. end
  315. loadSpellGui()
  316.  
  317. local Q = Instance.new("TextLabel")
  318. Q.Name = "Q"
  319. Q.Parent = x10Wand
  320. Q.BackgroundColor3 = Color3.new(1, 1, 1)
  321. Q.BackgroundTransparency = 1
  322. Q.Position = UDim2.new(0.5, -350, 1, -100)
  323. Q.Size = UDim2.new(0, 100, 0, 50)
  324. Q.Font = Enum.Font.Cartoon
  325. Q.FontSize = Enum.FontSize.Size42
  326. Q.Text = "Q"
  327. Q.TextColor3 = Color3.new(1, 1, 1)
  328. Q.TextStrokeTransparency = 0
  329.  
  330. local E = Instance.new("TextLabel")
  331. E.Name = "E"
  332. E.Parent = x10Wand
  333. E.BackgroundColor3 = Color3.new(1, 1, 1)
  334. E.BackgroundTransparency = 1
  335. E.Position = UDim2.new(0.5, 250, 1, -100)
  336. E.Size = UDim2.new(0, 100, 0, 50)
  337. E.Font = Enum.Font.Cartoon
  338. E.FontSize = Enum.FontSize.Size42
  339. E.Text = "E"
  340. E.TextColor3 = Color3.new(1, 1, 1)
  341. E.TextStrokeTransparency = 0
  342.  
  343. local Info = Instance.new("TextLabel")
  344. Info.Name = "Info"
  345. Info.Parent = x10Wand
  346. Info.BackgroundColor3 = Color3.new(1, 1, 1)
  347. Info.BackgroundTransparency = 1
  348. Info.Draggable = true
  349. Info.Position = UDim2.new(0.5, -200, 1, -30)
  350. Info.Size = UDim2.new(0, 400, 0, 10)
  351. Info.ZIndex = 10
  352. Info.Font = Enum.Font.SourceSans
  353. Info.FontSize = Enum.FontSize.Size18
  354. Info.Text = "B" .. "y | " .. "Th" .. "un" .. "de" .. "r" .. "x" .. tostring(10)
  355. Info.TextColor3 = Color3.new(1, 1, 1)
  356.  
  357. local ManaFrame = Instance.new("Frame")
  358. ManaFrame.Name = "ManaFrame"
  359. ManaFrame.Parent = x10Wand
  360. ManaFrame.BackgroundColor3 = Color3.new(0, 0, 0)
  361. ManaFrame.BorderSizePixel = 0
  362. ManaFrame.Position = UDim2.new(0.5, 10, 1, -145)
  363. ManaFrame.Size = UDim2.new(0, 204, 0, 24)
  364.  
  365. local ManaBar = Instance.new("Frame")
  366. ManaBar.Name = "ManaBar"
  367. ManaBar.Parent = ManaFrame
  368. ManaBar.BackgroundColor3 = Color3.new(0, 0.317647, 1)
  369. ManaBar.BorderSizePixel = 0
  370. ManaBar.Position = UDim2.new(0, 2, 0, 2)
  371. ManaBar.Size = UDim2.new(0, 200, 0, 20)
  372. ManaBar.ZIndex = 2
  373.  
  374. local ManaText = Instance.new("TextLabel")
  375. ManaText.Name = "ManaText"
  376. ManaText.Parent = ManaFrame
  377. ManaText.BackgroundColor3 = Color3.new(1, 1, 1)
  378. ManaText.BackgroundTransparency = 1
  379. ManaText.Size = UDim2.new(0, 204, 0, 24)
  380. ManaText.ZIndex = 4
  381. ManaText.Font = Enum.Font.SciFi
  382. ManaText.FontSize = Enum.FontSize.Size18
  383. ManaText.Text = MaxMana
  384. ManaText.TextColor3 = Color3.new(1, 1, 1)
  385.  
  386. local HealthFrame = Instance.new("Frame")
  387. HealthFrame.Name = "HealthFrame"
  388. HealthFrame.Parent = x10Wand
  389. HealthFrame.BackgroundColor3 = Color3.new(0, 0, 0)
  390. HealthFrame.BorderSizePixel = 0
  391. HealthFrame.Position = UDim2.new(0.5, -214, 1, -145)
  392. HealthFrame.Size = UDim2.new(0, 204, 0, 24)
  393.  
  394. local HealthBar = Instance.new("Frame")
  395. HealthBar.Name = "HealthBar"
  396. HealthBar.Parent = HealthFrame
  397. HealthBar.BackgroundColor3 = Color3.new(0, 0.8, 0.02)
  398. HealthBar.BorderSizePixel = 0
  399. HealthBar.Position = UDim2.new(0, 2, 0, 2)
  400. HealthBar.Size = UDim2.new(0, char.Humanoid.Health*2, 0, 20)
  401. HealthBar.ZIndex = 2
  402.  
  403. local HealthText = Instance.new("TextLabel")
  404. HealthText.Name = "HealthText"
  405. HealthText.Parent = HealthFrame
  406. HealthText.BackgroundColor3 = Color3.new(1, 1, 1)
  407. HealthText.BackgroundTransparency = 1
  408. HealthText.Size = UDim2.new(0, 204, 0, 24)
  409. HealthText.ZIndex = 4
  410. HealthText.Font = Enum.Font.SciFi
  411. HealthText.FontSize = Enum.FontSize.Size18
  412. HealthText.Text = "health"
  413. HealthText.TextColor3 = Color3.new(1, 1, 1)
  414.  
  415. --WEAPON
  416.  
  417. local model = Instance.new("Model", char)
  418. model.Name = "x10Wand"
  419.  
  420. local wm = Instance.new("Part", model)
  421. wm.Material = "SmoothPlastic"
  422. wm.BrickColor = BrickColor.new("Really black")
  423. wm.Size = Vector3.new(0,0,0)
  424. wm.CFrame = CFrame.new(0,5,0)
  425. wm.CanCollide = false
  426. wm.TopSurface = "Smooth"
  427. wm.BottomSurface = "Smooth"
  428. local Mesh = Instance.new("CylinderMesh", wm)
  429. Mesh.Scale = Vector3.new(1,9,1)
  430.  
  431. local wmt = Instance.new("Part", model)
  432. wmt.Material = "SmoothPlastic"
  433. wmt.BrickColor = BrickColor.new(MainColor)
  434. wmt.Size = Vector3.new(0,0,0)
  435. wmt.CanCollide = false
  436. wmt.CFrame = CFrame.new(0,5,0)
  437. wmt.Material = "Neon"
  438. wmt.TopSurface = "Smooth"
  439. wmt.BottomSurface = "Smooth"
  440. local Mesh = Instance.new("CylinderMesh", wmt)
  441. Mesh.Scale = Vector3.new(1.1,1.8,1.1)
  442.  
  443. local weld = Instance.new("Weld", wmt)
  444. weld.Part0 = wmt
  445. weld.Part1 = wm
  446. weld.C0 = CFrame.new(0, 0.8, 0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  447.  
  448. local weaponWeld = Instance.new("Weld")
  449. weaponWeld.Parent = wm
  450. weaponWeld.Part0 = wm
  451. weaponWeld.Part1 = char["Right Arm"]
  452. weaponWeld.C0 = CFrame.new(0, 0.3, -1)*CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))
  453. local weaponWeldc0 = weaponWeld.C0
  454.  
  455. --FUNCTIONS
  456. print("v2")
  457. function takeDamage(position, damage, distance, platformStand)
  458. playersHit = {}
  459. for i,v in pairs(workspace:GetChildren()) do
  460. currentPlayer = nil
  461. if v.Name == "Dummy" then
  462. currentPlayer = v
  463. else
  464. if game:GetService("Players"):GetPlayerFromCharacter(v) ~= nil and v.Name ~= me.Name and v:IsA("Model") and v.Name ~= "Script" then
  465. if v.Name == game:GetService("Players"):GetPlayerFromCharacter(v).Name then
  466. currentPlayer = v
  467. end
  468. end
  469. end
  470. if currentPlayer ~= nil then
  471. if currentPlayer:findFirstChild("Torso") and currentPlayer:findFirstChild("Humanoid") and (currentPlayer.Torso.Position - position).magnitude < distance then
  472. dealDamage(currentPlayer.Humanoid, damage)
  473. table.insert(playersHit, currentPlayer)
  474. currentPlayer.Humanoid.PlatformStand = platformStand
  475. print(v.Name)
  476. end
  477. end
  478. end
  479. for i,v in pairs(playersHit) do
  480. print(i,v)
  481. end
  482. return playersHit
  483. end
  484.  
  485. function freeze(time)
  486. local g = Instance.new("BodyGyro", root)
  487. g.Name = "BodyMovement"
  488. g.D = 0
  489. g.CFrame = root.CFrame
  490. g.MaxTorque = Vector3.new(1000000000, 1000000000, 1000000000)
  491. g.P = 10000000000
  492. if time ~= nil then
  493. game:GetService("Debris"):AddItem(g,time)
  494. end
  495. end
  496.  
  497. function unfreeze()
  498. for i,v in pairs(root:GetChildren()) do
  499. if v.Name == "BodyMovement" then
  500. v:Remove()
  501. end
  502. end
  503. end
  504.  
  505. function moveVelocity(direction, speed, time)
  506. local g = Instance.new("BodyGyro", root)
  507. g.D = 0
  508. g.CFrame = root.CFrame
  509. g.MaxTorque = Vector3.new(1000000000, 1000000000, 1000000000)
  510. g.P = 10000000000
  511. local e = Instance.new("BodyVelocity", root)
  512. e.Velocity = dir.unit * speed
  513. e.P = 10000
  514. e.MaxForce = Vector3.new(100000000, 100000000, 100000000)
  515. game:GetService("Debris"):AddItem(e,time)
  516. end
  517.  
  518. local SpikeCount = 0
  519. function createPath()
  520. SpikeCount = SpikeCount + 1
  521. if SpikeCount >= 10 then
  522. SpikeCount = 0
  523. local spike = Instance.new("Part", model)
  524. table.insert(TSTable, spike)
  525. spike.Size = Vector3.new(0,0,0)
  526. spike.Name = "Ring"
  527. spike.Material = "Neon"
  528. spike.BrickColor = BrickColor.new(Rainbow[rainbowNumber])
  529. spike.Anchored = true
  530. spike.Transparency = 0.3
  531. spike.CanCollide = false
  532. spike.CFrame = torso.CFrame*CFrame.new(0,0,3)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  533. local spikemesh = Instance.new("SpecialMesh", spike)
  534. spikemesh.Name = "SpikeMesh"
  535. spikemesh.Scale = Vector3.new(5,5,5)
  536. spikemesh.MeshId = "http://www.roblox.com/asset/?id=3270017"
  537. end
  538.  
  539. local spike1 = Instance.new("Part", model)
  540. table.insert(TSTable, spike1)
  541. spike1.Size = Vector3.new(0,0,0)
  542. spike1.Material = "Neon"
  543. spike1.BrickColor = BrickColor.new(Rainbow[rainbowNumber])
  544. spike1.Anchored = true
  545. spike1.Transparency = 0
  546. spike1.CanCollide = false
  547. spike1.CFrame = torso.CFrame*CFrame.new(0,0,1.5)*CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))
  548. local spikemesh1 = Instance.new("CylinderMesh", spike1)
  549. spikemesh1.Name = "SpikeMesh"
  550. spikemesh1.Scale = Vector3.new(6,10,6)
  551. end
  552.  
  553. local function CreateRegion3FromLocAndSize(Position, Size)
  554. local SizeOffset = Size/2
  555. local Point1 = Position - SizeOffset
  556. local Point2 = Position + SizeOffset
  557. return Region3.new(Point1, Point2)
  558. end
  559.  
  560. function dealDamage(targetHumanoid, damage)
  561. if targetHumanoid.Health > 100 then
  562. targetHumanoid.MaxHealth = 100
  563. targetHumanoid.Health = 100
  564. end
  565. targetHumanoid.Health = targetHumanoid.Health - damage
  566. end
  567.  
  568. function makeParticles()
  569. local p = Instance.new("Part", char)
  570. p.CanCollide = false
  571. p.BrickColor = BrickColor.new(Rainbow[math.random(1,#Rainbow)])
  572. p.Material = "Neon"
  573. p.Name = "Particle"
  574. p.Size = Vector3.new(0,0,0)
  575. p.CFrame = wmt.CFrame*CFrame.new(math.random(-1,1), math.random(-1,1), math.random(-1,1))*CFrame.Angles(math.rad(math.random(0,360)), math.rad(math.random(0,360)), math.rad(math.random(0,360)))
  576. game:GetService("Debris"):AddItem(p,3)
  577. table.insert(currentTable, p)
  578. local bbp = Instance.new("BodyPosition", p)
  579. bbp.Name = "forceinward"
  580. bbp.MaxForce = Vector3.new(math.random(1000, 2000), math.random(1000, 2000), math.random(1000, 2000))
  581. bbp.P = math.random(3000, 5000)
  582. if isCharging then
  583. bbp.Position = wmt.Position
  584. bbp.D = 1000
  585. else
  586. bbp.Position = p.Position + Vector3.new(math.random(-1,1), 1, math.random(-1,1))
  587. bbp.D = 2000
  588. end
  589. table.insert(allbps, bbp)
  590. end
  591.  
  592. function OriginalProjectile(loc)
  593. local proj = Instance.new("Part", model)
  594. proj.CanCollide = false
  595. proj.Name = "projectile"
  596. proj.CFrame = wmt.CFrame
  597. proj.Anchored = true
  598. proj.Material = "Neon"
  599. proj.BrickColor = BrickColor.new(Rainbow[rainbowNumber])
  600. proj.CFrame = CFrame.new(proj.Position, loc)
  601. proj.Size = Vector3.new(0.3, 0.3, 2)
  602. local s = Instance.new("Sound", wmt)
  603. s.SoundId = fireworkSounds[math.random(1,#fireworkSounds)]
  604. s.EmitterSize = 10
  605. s.Volume = math.random(80,100)/10
  606. s:Play()
  607. game:GetService("Debris"):AddItem(s,5)
  608. local s = Instance.new("Sound", proj)
  609. s.SoundId = "rbxassetid://84903136"
  610. s.EmitterSize = 10
  611. s.Volume = math.random(80,100)/10
  612. s:Play()
  613. game:GetService("Debris"):AddItem(s, 5)
  614. table.insert(projectiles, proj)
  615. end
  616.  
  617. function createHole(location, height)
  618. if (torso.Position - location).magnitude < 2000 then
  619. local hole = Instance.new("Part", model)
  620. hole.BrickColor = BrickColor.new("Really black")
  621. hole.Size = Vector3.new(0,0,0)
  622. hole.Anchored = true
  623. hole.CFrame = CFrame.new(location.X,location.Y,location.Z)*CFrame.new(0,height,0)
  624. hole.Material = "SmoothPlastic"
  625. local cm = Instance.new("CylinderMesh",hole)
  626. cm.Name = "HoleMesh"
  627. cm.Scale = Vector3.new(0,0,0)
  628. table.insert(holeTable, hole)
  629. local s = Instance.new("Sound", hole) --whole opening
  630. s.SoundId = magicSounds[math.random(1,#magicSounds)]
  631. s.EmitterSize = 50
  632. s.Volume = 100
  633. s:Play()
  634. game:GetService("Debris"):AddItem(s,5)
  635. end
  636. end
  637.  
  638. function freeze(who)
  639. for i,v in pairs(who:GetChildren()) do
  640. if v:IsA("Part") and v.Name ~= "HumanoidRootPart" then
  641. v.Anchored = true
  642. end
  643. end
  644. end
  645.  
  646. function unfreeze(who)
  647. for i,v in pairs(who:GetChildren()) do
  648. if v:IsA("Part") and v.Name ~= "HumanoidRootPart" then
  649. v.Anchored = false
  650. end
  651. end
  652. end
  653.  
  654. function castingStart(length)
  655. local s = Instance.new("Sound", wmt) --wavy noise
  656. s.SoundId = "rbxassetid://262327541"
  657. s.EmitterSize = 10
  658. s.Volume = 100
  659. s:Play()
  660. game:GetService("Debris"):AddItem(s,5)
  661. castRing = Instance.new("Part", model)
  662. castRing.Size = Vector3.new(0,0,0)
  663. castRing.Name = "CastingRing"
  664. castRing.Material = "Neon"
  665. castRing.BrickColor = BrickColor.new("Industrial white")
  666. castRing.Anchored = true
  667. castRing.Transparency = 0.5
  668. castRing.CanCollide = false
  669. castRing.CFrame = CFrame.new(Mouse.Hit.p.X,Mouse.Hit.p.Y+0.3,Mouse.Hit.p.Z)*CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))
  670. local ringmesh = Instance.new("SpecialMesh", castRing)
  671. ringmesh.Name = "RingMesh"
  672. ringmesh.Scale = Vector3.new(2,2,2)
  673. ringmesh.MeshId = "http://www.roblox.com/asset/?id=3270017"
  674. game:GetService("Debris"):AddItem(castRing, length) --casting time
  675. castCircle = Instance.new("Part", model)
  676. castCircle.Size = Vector3.new(0,0,0)
  677. castCircle.Name = "CastingCircle"
  678. castCircle.Material = "Neon"
  679. castCircle.Shape = "Cylinder"
  680. castCircle.BrickColor = BrickColor.new("Industrial white")
  681. castCircle.Anchored = true
  682. castCircle.Transparency = 0.2
  683. castCircle.CanCollide = false
  684. castCircle.CFrame = CFrame.new(Mouse.Hit.p.X,Mouse.Hit.p.Y+0.3,Mouse.Hit.p.Z)*CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0))
  685. local ringmesh = Instance.new("CylinderMesh", castCircle)
  686. ringmesh.Name = "RingMesh"
  687. ringmesh.Scale = Vector3.new(4,0.2,4)
  688. game:GetService("Debris"):AddItem(castCircle, length) --casting time
  689. game:GetService("Debris"):AddItem(s, length) --casting time
  690. end
  691.  
  692. --
  693.  
  694. rainbowNumber = 1
  695. statRegenNumber = 0
  696. holdingw = false
  697. Mana = 1000000
  698. currentTable = {}
  699. walkingAnimationSpeed = 3.5
  700. allbps = {}
  701. projectiles = {}
  702. holeTable = {}
  703. rainbowMode = false
  704. int = 0
  705. bodyparts = {}
  706. holdingMouse1 = false
  707. local currentAnim = "walk"
  708. local actionWalking = true
  709. local isCharging = false
  710. local slowingDown = 1
  711. local Smooth = 1
  712. local t = tick()
  713. game:GetService("RunService").Stepped:connect(function()
  714. t = t+0.5*Smooth
  715. statRegenNumber = statRegenNumber + 1
  716. if statRegenNumber >= 10 then
  717. if currentAnim == "Dashing" then
  718. if Mana > 0 then
  719. Mana = Mana - 1
  720. else
  721. holdingw = false
  722. end
  723. else
  724. if Mana < MaxMana then
  725. Mana = Mana + 100
  726. end
  727. end
  728. if char.Humanoid.Health < char.Humanoid.MaxHealth then
  729. char.Humanoid.Health = char.Humanoid.Health + 1
  730. end
  731. statRegenNumber = 0
  732. end
  733. HealthText.Text = math.ceil(char.Humanoid.Health)
  734. if char.Humanoid.Health <= 100 then
  735. HealthBar.Size = UDim2.new(0, math.ceil(char.Humanoid.Health)*2, 0, 20)
  736. end
  737. ManaText.Text = Mana
  738. if Mana <= 100 then
  739. ManaBar.Size = UDim2.new(0, Mana*2, 0, 20)
  740. end
  741. if not inAction then
  742. weaponWeld.C0 = weaponWeld.C0:lerp(weaponWeldc0,0.05)
  743. if rootpart.Velocity.y > 1 and Humanoid:GetState() == Enum.HumanoidStateType.Freefall then
  744. currentAnim = "jump"
  745. elseif rootpart.Velocity.y < -1 then
  746. currentAnim = "freefall"
  747. elseif (math.abs(rootpart.Velocity.x) > 2 or math.abs(rootpart.Velocity.z) > 2) and Humanoid:GetState() ~= Enum.HumanoidStateType.Freefall then
  748. currentAnim = "walk"
  749. elseif Vector3.new(rootpart.Velocity.x,0,rootpart.Velocity.y).magnitude < 1 and Humanoid:GetState() ~= Enum.HumanoidStateType.Freefall then
  750. currentAnim = "idle"
  751. end
  752.  
  753. if currentAnim == "idle" then
  754. animationSpeed = 0.1
  755. rightArmJoint.C0 = rightArmJoint.C0:lerp(rsc0*CFrame.Angles(math.rad(-1), math.rad(-1), -(math.sin(t/7)/20)+0.1), animationSpeed)
  756. leftArmJoint.C0 = leftArmJoint.C0:lerp(lsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-1), math.rad(0), (math.sin(t/7)/20)-0.1), animationSpeed)
  757. rightLegJoint.C0 = rightLegJoint.C0:lerp(rlc0*CFrame.new(0,math.sin(t/7)/30,0)*CFrame.Angles(math.rad(-2), math.rad(0), math.rad(1)), animationSpeed)
  758. leftLegJoint.C0 = leftLegJoint.C0:lerp(llc0*CFrame.new(0,math.sin(t/7)/30,0)*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-1), math.rad(0), math.rad(-1)), animationSpeed)
  759. neck.C0 = neck.C0:lerp(neckc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed)
  760. rj.C0 = rj.C0:lerp(rootc0*CFrame.new(0,0,-math.sin(t/7)/30)*CFrame.Angles(math.rad(-1), math.rad(0), math.rad(0)),animationSpeed)
  761. elseif currentAnim == "walk" then
  762. animationSpeed = 0.05
  763. rightArmJoint.C0 = rightArmJoint.C0:lerp(rsc0*CFrame.new(0,0,0)*CFrame.Angles((math.sin(t/5)/25)+math.rad(-30), math.rad(-42), math.rad(17)), animationSpeed)
  764. leftArmJoint.C0 = leftArmJoint.C0:lerp(lsc0*CFrame.new(0,0,0)*CFrame.Angles((math.sin(t/5)/25)+math.rad(-51), math.rad(42), math.rad(-11)), animationSpeed)
  765. rightLegJoint.C0 = rightLegJoint.C0:lerp(rlc0*CFrame.new(0,math.sin(t/5)/25,0)*CFrame.Angles((-math.sin(t/walkingAnimationSpeed)/1)+math.rad(0), math.rad(0), math.rad(0)), 0.4)
  766. leftLegJoint.C0 = leftLegJoint.C0:lerp(llc0*CFrame.new(0,math.sin(t/5)/25,0)*CFrame.Angles((math.sin(t/walkingAnimationSpeed)/1)+math.rad(0), math.rad(0), math.rad(0)), 0.4)
  767. neck.C0 = neck.C0:lerp(neckc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed)
  768. rj.C0 = rj.C0:lerp(rootc0*CFrame.new(0,0,-math.sin(t/5)/25)*CFrame.Angles(math.rad(10), math.rad(0), math.rad(0)),0.4)
  769. elseif currentAnim == "jump" then
  770. animationSpeed = 0.2
  771. rightArmJoint.C0 = rightArmJoint.C0:lerp(rsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-11), math.rad(-2), math.rad(12)), animationSpeed)
  772. leftArmJoint.C0 = leftArmJoint.C0:lerp(lsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-8), math.rad(2), math.rad(-17)), animationSpeed)
  773. rightLegJoint.C0 = rightLegJoint.C0:lerp(rlc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-11), math.rad(0), math.rad(4)), animationSpeed)
  774. leftLegJoint.C0 = leftLegJoint.C0:lerp(llc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-16), math.rad(1), math.rad(-4)), animationSpeed)
  775. neck.C0 = neck.C0:lerp(neckc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(8), math.rad(0), math.rad(0)),animationSpeed)
  776. rj.C0 = rj.C0:lerp(rootc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed)
  777. elseif currentAnim == "freefall" then
  778. animationSpeed = 0.15
  779. rightArmJoint.C0 = rightArmJoint.C0:lerp(rsc0*CFrame.new(0,0,0)*CFrame.Angles(-(math.sin(t/4)/7)+math.rad(-15), math.rad(0), -(math.sin(t/5)/10)+math.rad(10)), animationSpeed)
  780. leftArmJoint.C0 = leftArmJoint.C0:lerp(lsc0*CFrame.new(0,0,0)*CFrame.Angles((math.sin(t/4)/7)+math.rad(-12), math.rad(4), (math.sin(t/5)/10)+math.rad(-10)), animationSpeed)
  781. rightLegJoint.C0 = rightLegJoint.C0:lerp(rlc0*CFrame.new(0,0,0)*CFrame.Angles((math.sin(t/4)/7)+math.rad(-8), math.rad(0), (math.sin(t/5)/10)+math.rad(6)), animationSpeed)
  782. leftLegJoint.C0 = leftLegJoint.C0:lerp(llc0*CFrame.new(0,0,0)*CFrame.Angles(-(math.sin(t/4)/7)+math.rad(0), math.rad(1), (math.sin(t/5)/10)+math.rad(-6)), animationSpeed)
  783. neck.C0 = neck.C0:lerp(neckc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed)
  784. rj.C0 = rj.C0:lerp(rootc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed)
  785. end
  786. else --starting abilities
  787. if actionWalking then
  788. if (math.abs(rootpart.Velocity.x) > 2 or math.abs(rootpart.Velocity.z) > 2) and Humanoid:GetState() ~= Enum.HumanoidStateType.Freefall then
  789. rightLegJoint.C0 = rightLegJoint.C0:lerp(rlc0*CFrame.new(0,math.sin(t/5)/25,0)*CFrame.Angles((-math.sin(t/walkingAnimationSpeed)/1)+math.rad(0), math.rad(0), math.rad(0)), 0.4)
  790. leftLegJoint.C0 = leftLegJoint.C0:lerp(llc0*CFrame.new(0,math.sin(t/5)/25,0)*CFrame.Angles((math.sin(t/walkingAnimationSpeed)/1)+math.rad(0), math.rad(0), math.rad(0)), 0.4)
  791. else
  792. rightLegJoint.C0 = rightLegJoint.C0:lerp(rlc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.05)
  793. leftLegJoint.C0 = leftLegJoint.C0:lerp(llc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.05)
  794. end
  795. end
  796. if currentAnim == "ArmUp" then
  797. animationSpeed = 0.3
  798. rightArmJoint.C0 = rightArmJoint.C0:lerp(rsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(79), math.rad(-5), math.rad(1)), animationSpeed)
  799. leftArmJoint.C0 = leftArmJoint.C0:lerp(lsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(62), math.rad(-3), math.rad(-3)), 0.07)
  800. neck.C0 = neck.C0:lerp(neckc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(10)),0.07)
  801. rj.C0 = rj.C0:lerp(rootc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.07)
  802. elseif currentAnim == "Slash1" then
  803. animationSpeed = 0.15
  804. rightArmJoint.C0 = rightArmJoint.C0:lerp(rsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-150), math.rad(20), math.rad(40)), animationSpeed)
  805. leftArmJoint.C0 = leftArmJoint.C0:lerp(lsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(62), math.rad(-3), math.rad(-3)), 0.07)
  806. neck.C0 = neck.C0:lerp(neckc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(10)),0.07)
  807. rj.C0 = rj.C0:lerp(rootc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.07)
  808. makeParticles()
  809. elseif currentAnim == "SlashMini" then
  810. animationSpeed = 0.3
  811. rightArmJoint.C0 = rightArmJoint.C0:lerp(rsc0*CFrame.new(-0.3,0,-1)*CFrame.Angles(math.rad(23), math.rad(-20), math.rad(-62)), animationSpeed)
  812. leftArmJoint.C0 = leftArmJoint.C0:lerp(lsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-49), math.rad(7), math.rad(-1)), animationSpeed)
  813. neck.C0 = neck.C0:lerp(neckc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed)
  814. rj.C0 = rj.C0:lerp(rootc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed)
  815. weaponWeld.C0 = weaponWeld.C0:lerp(weaponWeldc0*CFrame.new(0, 0, 0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), animationSpeed)
  816. makeParticles()
  817. elseif currentAnim == "Slash2" then
  818. animationSpeed = 0.3
  819. rightArmJoint.C0 = rightArmJoint.C0:lerp(rsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(70), math.rad(3), math.rad(-13)), animationSpeed)
  820. leftArmJoint.C0 = leftArmJoint.C0:lerp(lsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-49), math.rad(7), math.rad(-1)), animationSpeed)
  821. neck.C0 = neck.C0:lerp(neckc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed)
  822. rj.C0 = rj.C0:lerp(rootc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed)
  823. weaponWeld.C0 = weaponWeld.C0:lerp(weaponWeldc0*CFrame.new(0, 0, 0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(-10)), animationSpeed)
  824. makeParticles()
  825. elseif currentAnim == "DashDown" then
  826. animationSpeed = 0.3
  827. rightArmJoint.C0 = rightArmJoint.C0:lerp(rsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-88), math.rad(-47), math.rad(24)), animationSpeed)
  828. leftArmJoint.C0 = leftArmJoint.C0:lerp(lsc0*CFrame.new(0,-0.5,0)*CFrame.Angles(math.rad(42), math.rad(-5), math.rad(-5)), animationSpeed)
  829. rightLegJoint.C0 = rightLegJoint.C0:lerp(rlc0*CFrame.new(0,1.5,-0.5)*CFrame.Angles(math.rad(24), math.rad(3), math.rad(1)), animationSpeed)
  830. leftLegJoint.C0 = leftLegJoint.C0:lerp(llc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-40), math.rad(1), math.rad(-3)), animationSpeed)
  831. neck.C0 = neck.C0:lerp(neckc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-11), math.rad(0), math.rad(0)),animationSpeed)
  832. rj.C0 = rj.C0:lerp(rootc0*CFrame.new(0,0,-1.3)*CFrame.Angles(math.rad(30), math.rad(0), math.rad(0)),animationSpeed)
  833. local spike = Instance.new("Part", model)
  834. table.insert(SpinTable, spike)
  835. spike.Size = Vector3.new(0,0,0)
  836. spike.Name = "spinnything"
  837. spike.Material = "Neon"
  838. spike.BrickColor = BrickColor.new(MainColor)
  839. spike.Anchored = true
  840. spike.Transparency = 0.5
  841. spike.CanCollide = false
  842. spike.CFrame = CFrame.new(torso.Position.x,(torso.Position.y - 2.5),torso.Position.z)*CFrame.Angles(math.rad(0), math.rad(math.random(0,180)), math.rad(0))
  843. local spikemesh = Instance.new("BlockMesh", spike)
  844. spikemesh.Name = "SpikeMesh"
  845. spikemesh.Scale = Vector3.new(5,5,5)
  846. local ball = Instance.new("Part", model)
  847. ball.Size = Vector3.new(0,0,0)
  848. ball.Name = "ballthing"
  849. ball.Material = "Neon"
  850. ball.BrickColor = BrickColor.new(MainColor)
  851. ball.Anchored = true
  852. ball.Transparency = 0.5
  853. ball.CanCollide = false
  854. ball.CFrame = CFrame.new(torso.Position.x,(torso.Position.y - 2.5),torso.Position.z)
  855. local spikemesh = Instance.new("SpecialMesh", ball)
  856. spikemesh.Name = "SpikeMesh"
  857. spikemesh.MeshType = "Sphere"
  858. spikemesh.Scale = Vector3.new(5,5,5)
  859. table.insert(SpinTable,ball)
  860. makeParticles()
  861. elseif currentAnim == "Dashing" then
  862. animationSpeed = 0.3
  863. rightArmJoint.C0 = rightArmJoint.C0:lerp(rsc0*CFrame.new(0,0,0)*CFrame.Angles((math.sin(t/4)/7)+math.rad(-66), math.rad(-24), (math.sin(t/5)/10)+math.rad(25)), animationSpeed)
  864. leftArmJoint.C0 = leftArmJoint.C0:lerp(lsc0*CFrame.new(0,0,0)*CFrame.Angles(-(math.sin(t/4)/7)+math.rad(-64), math.rad(31), -(math.sin(t/5)/10)+math.rad(-25)), animationSpeed)
  865. rightLegJoint.C0 = rightLegJoint.C0:lerp(rlc0*CFrame.new(0,0,0)*CFrame.Angles(-(math.sin(t/4)/7)+math.rad(-49), math.rad(-19), math.rad(20)), animationSpeed)
  866. leftLegJoint.C0 = leftLegJoint.C0:lerp(llc0*CFrame.new(0,0,0)*CFrame.Angles((math.sin(t/4)/7)+math.rad(-49), math.rad(13), math.rad(-12)), animationSpeed)
  867. neck.C0 = neck.C0:lerp(neckc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(5), math.rad(0), math.rad(0)),animationSpeed)
  868. rj.C0 = rj.C0:lerp(rootc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed)
  869. rootpart.CFrame = rootpart.CFrame*CFrame.new(0,0,-2)
  870. createPath()
  871. elseif currentAnim == "DashSlowing" then
  872. animationSpeed = 0.2
  873. rightArmJoint.C0 = rightArmJoint.C0:lerp(rsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(12), math.rad(0), math.rad(0)), animationSpeed)
  874. leftArmJoint.C0 = leftArmJoint.C0:lerp(lsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(28), math.rad(0), math.rad(0)), animationSpeed)
  875. rightLegJoint.C0 = rightLegJoint.C0:lerp(rlc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(21), math.rad(0), math.rad(3)), animationSpeed)
  876. leftLegJoint.C0 = leftLegJoint.C0:lerp(llc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(23), math.rad(-1), math.rad(-2)), animationSpeed)
  877. neck.C0 = neck.C0:lerp(neckc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(-5), math.rad(0), math.rad(0)),animationSpeed)
  878. rj.C0 = rj.C0:lerp(rootc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed)
  879. rootpart.CFrame = rootpart.CFrame*CFrame.new(0,0,-slowingDown)
  880. slowingDown = slowingDown - 0.05
  881. elseif currentAnim == "Casting" then
  882. animationSpeed = 0.3
  883. rightArmJoint.C0 = rightArmJoint.C0:lerp(rsc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(138), -(math.sin(t/4)/4)+math.rad(0), math.rad(13)), animationSpeed)
  884. leftArmJoint.C0 = leftArmJoint.C0:lerp(lsc0*CFrame.new(0,0,0)*CFrame.Angles((math.sin(t/5)/25)+math.rad(-21), math.rad(10), math.rad(-11)), animationSpeed)
  885. neck.C0 = neck.C0:lerp(neckc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed)
  886. rj.C0 = rj.C0:lerp(rootc0*CFrame.new(0,0,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),animationSpeed)
  887. weaponWeld.C0 = weaponWeld.C0:lerp(weaponWeldc0*CFrame.new(0, 0, 0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), animationSpeed)
  888. pcall(function()
  889. castRing.CFrame = CFrame.new(Mouse.Hit.p.X,Mouse.Hit.p.Y+0.3,Mouse.Hit.p.Z)*CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))
  890. castRing.BrickColor = BrickColor.new(Rainbow[rainbowNumber])
  891. castCircle.CFrame = CFrame.new(Mouse.Hit.p.X,Mouse.Hit.p.Y+0.3,Mouse.Hit.p.Z)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0))
  892. end)
  893. makeParticles()
  894. end
  895. end
  896. if #TSTable > 0 then
  897. for i,v in pairs(TSTable) do
  898. if v.Transparency <= 1 then
  899. v.Transparency = v.Transparency + 0.02
  900. if v.Name == "Ring" then
  901. pcall(function()
  902. v.SpikeMesh.Scale = v.SpikeMesh.Scale - Vector3.new(0.2,0.2,0)
  903. end)
  904. elseif v.Name == "SlamRing" then
  905. v.Transparency = v.Transparency - 0.01
  906. pcall(function()
  907. v.SpikeMesh.Scale = v.SpikeMesh.Scale + Vector3.new(3,3,3)
  908. end)
  909. elseif v.Name == "GRASS" then
  910. v.Transparency = v.Transparency - 0.016
  911. if v.Transparency > 0.5 then
  912. v.CanCollide = false
  913. end
  914. elseif v.Name == "firework" then
  915. v.Transparency = v.Transparency - 0.01
  916. pcall(function()
  917. v.SpikeMesh.Scale = v.SpikeMesh.Scale - Vector3.new(0.05,0.05,0.05)
  918. end)
  919. else
  920. pcall(function()
  921. v.SpikeMesh.Scale = v.SpikeMesh.Scale - Vector3.new(0.2,0,0.2)
  922. end)
  923. end
  924. else
  925. table.remove(TSTable, i)
  926. v:Remove()
  927. end
  928. end
  929. end
  930. if #currentTable > 0 then
  931. for i,v in pairs(currentTable) do
  932. if isCharging then
  933. v.forceinward.Position = wmt.Position
  934. end
  935. v.Transparency = v.Transparency + 0.05
  936. if v.Transparency >= 1 then
  937. table.remove(currentTable, i)
  938. table.remove(allbps, i)
  939. v:Remove()
  940. end
  941. end
  942. end
  943. if #holeTable > 0 then
  944. for i,hole in pairs(holeTable) do
  945. if hole.HoleMesh.Scale.X < 100 and hole:findFirstChild("BLOCK") == nil then
  946. hole.HoleMesh.Scale = hole.HoleMesh.Scale + Vector3.new(10,0,10)
  947. else
  948. if hole:findFirstChild("BLOCK") == nil then
  949. local block = Instance.new("Part", hole)
  950. block.Name = "BLOCK"
  951. block.Size = Vector3.new(9,0,9)
  952. block.Anchored = true
  953. block.CFrame = hole.CFrame*CFrame.new(0,-0.25,0)
  954. block.Material = "SmoothPlastic"
  955. block.Reflectance = 0.5
  956. block.BrickColor = BrickColor.new(Rainbow[rainbowNumber])
  957. local bv = Instance.new("IntValue", block)
  958. bv.Name = "goingUp"
  959. bv.Value = 0
  960. else
  961. hole:findFirstChild("BLOCK").goingUp.Value = hole:findFirstChild("BLOCK").goingUp.Value + 1
  962. if hole:findFirstChild("BLOCK").goingUp.Value <= 6 then
  963. local currentC = hole:findFirstChild("BLOCK").CFrame
  964. hole:findFirstChild("BLOCK").Size = hole:findFirstChild("BLOCK").Size + Vector3.new(0,5,0)
  965. hole:findFirstChild("BLOCK").CFrame = currentC*CFrame.new(0,-2.5,0)
  966. elseif hole:findFirstChild("BLOCK").goingUp.Value >= 20 and hole:findFirstChild("BLOCK").Size.Y > 0.3 then
  967. local currentC = hole:findFirstChild("BLOCK").CFrame
  968. hole:findFirstChild("BLOCK").Size = hole:findFirstChild("BLOCK").Size + Vector3.new(0,-5,0)
  969. hole:findFirstChild("BLOCK").CFrame = currentC*CFrame.new(0,2.5,0)
  970. elseif hole:findFirstChild("BLOCK").goingUp.Value == 7 then
  971. takeDamage((hole.Position - Vector3.new(0,30,0)), 30, 14, false)
  972. local e = Instance.new("Explosion", hole)
  973. e.Position = (hole.Position - Vector3.new(0,30,0))
  974. e.BlastPressure = 100000
  975. e.BlastRadius = 6
  976. e.ExplosionType = "CratersAndDebris"
  977. e.Visible = false
  978. local spike = Instance.new("Part", model)
  979. table.insert(TSTable, spike)
  980. spike.Size = Vector3.new(0,0,0)
  981. spike.Name = "SlamRing"
  982. spike.Material = "Neon"
  983. spike.BrickColor = BrickColor.new("Industrial white")
  984. spike.Anchored = true
  985. spike.Transparency = 0.3
  986. spike.CanCollide = false
  987. spike.CFrame = hole.CFrame*CFrame.new(0,-30,0)*CFrame.Angles(math.rad(90), math.rad(0), math.rad(0))
  988. local spikemesh = Instance.new("SpecialMesh", spike)
  989. spikemesh.Name = "SpikeMesh"
  990. spikemesh.Scale = Vector3.new(10,10,10)
  991. spikemesh.MeshId = "http://www.roblox.com/asset/?id=3270017"
  992. for ind = 1,8 do
  993. local pgrass = Instance.new("Part",model)
  994. pgrass.CanCollide = true
  995. pgrass.Name = "GRASS"
  996. pgrass.Anchored = true
  997. if workspace:findFirstChild("Base") ~= nil then
  998. pgrass.Material = workspace.Base.Material
  999. pgrass.BrickColor = workspace.Base.BrickColor
  1000. else
  1001. pgrass.Material = "Grass"
  1002. pgrass.BrickColor = BrickColor.new("Bright green")
  1003. end
  1004. pgrass.Size = Vector3.new(math.random(8,10),math.random(1,2),math.random(8,10))
  1005. pgrass.CFrame = hole.CFrame*CFrame.new(0,-30,0)*CFrame.Angles(math.rad(math.random(-40,40)),0,math.rad(math.random(-40,40)))
  1006. pgrass.CFrame = CFrame.new(hole.CFrame.X, hole.CFrame.Y-30, hole.CFrame.Z) --Start at the center of the circle
  1007. * CFrame.Angles(0, math.rad(ind*(360/8)), math.rad(0)) --Rotate the brick
  1008. * CFrame.new(0, 0, 6) --Move it out by 10 units
  1009. * CFrame.Angles(math.rad(math.random(-35,25)),math.rad(math.random(-10,10)),math.rad(math.random(-10,10)))
  1010. table.insert(TSTable, pgrass)
  1011. end
  1012. local s = Instance.new("Sound", pgrass)
  1013. s.SoundId = "rbxassetid://301184111"
  1014. s.EmitterSize = 10
  1015. s.Volume = 0.3
  1016. s:Play()
  1017. game:GetService("Debris"):AddItem(s, 5)
  1018. elseif hole:findFirstChild("BLOCK").goingUp.Value >= 30 then
  1019. hole:findFirstChild("BLOCK").Transparency = 1
  1020. hole.HoleMesh.Scale = hole.HoleMesh.Scale - Vector3.new(10,0,10)
  1021. if hole.HoleMesh.Scale.X < 0 then
  1022. table.remove(holeTable, i)
  1023. hole:Remove()
  1024. end
  1025. end
  1026. end
  1027. end
  1028. end
  1029. end
  1030. if #SpinTable > 0 then
  1031. for i,v in pairs(SpinTable) do
  1032. if v.Transparency <= 1 then
  1033. if v.Name == "spinnything" then
  1034. v.Transparency = v.Transparency + 0.005
  1035. v.BrickColor = BrickColor.new(Rainbow[rainbowNumber])
  1036. pcall(function()
  1037. v.SpikeMesh.Scale = v.SpikeMesh.Scale + Vector3.new(1,0,1)
  1038. end)
  1039. elseif v.Name == "firework" then
  1040. v.Transparency = v.Transparency + 0.01
  1041. v.BrickColor = BrickColor.new(Rainbow[math.random(1,#Rainbow)])
  1042. local sizeup = 3
  1043. pcall(function()
  1044. v.SpikeMesh.Scale = v.SpikeMesh.Scale + Vector3.new(sizeup,sizeup,sizeup)
  1045. end)
  1046. elseif v.Name == "firework1" then
  1047. v.Transparency = v.Transparency + math.random(7,10)/1000
  1048. v.BrickColor = BrickColor.new(Rainbow[math.random(1,#Rainbow)])
  1049. local sizeup = math.random(2,5)/10
  1050. pcall(function()
  1051. v.SpikeMesh.Scale = v.SpikeMesh.Scale + Vector3.new(sizeup,sizeup,sizeup)
  1052. end)
  1053. elseif v.Name == "teleball" then
  1054. v.Transparency = v.Transparency - 0.1
  1055. v.BrickColor = BrickColor.new(Rainbow[rainbowNumber])
  1056. local sizeup = 4
  1057. pcall(function()
  1058. v.SpikeMesh.Scale = v.SpikeMesh.Scale + Vector3.new(sizeup,sizeup,sizeup)
  1059. end)
  1060. elseif v.Name == "teleballsmall" then
  1061. v.Transparency = v.Transparency + 0.02
  1062. v.BrickColor = BrickColor.new(Rainbow[rainbowNumber])
  1063. local sizeup = -1
  1064. pcall(function()
  1065. v.SpikeMesh.Scale = v.SpikeMesh.Scale + Vector3.new(sizeup,sizeup,sizeup)
  1066. end)
  1067. elseif v.Name == "transRainbowPart" then
  1068. v.BrickColor = BrickColor.new(Rainbow[rainbowNumber])
  1069. v.Transparency = v.Transparency + 0.05
  1070. else
  1071. v.Transparency = v.Transparency + 0.005
  1072. v.BrickColor = BrickColor.new(Rainbow[rainbowNumber])
  1073. pcall(function()
  1074. v.SpikeMesh.Scale = v.SpikeMesh.Scale + Vector3.new(1,1,1)
  1075. end)
  1076. end
  1077. else
  1078. v:Remove()
  1079. table.remove(SpinTable, i)
  1080. end
  1081. end
  1082. end
  1083. if #projectiles > 0 then
  1084. for i,v in pairs(projectiles) do
  1085. if (v.Position - rootpart.Position).magnitude > 300 then
  1086. v:Remove()
  1087. table.remove(projectiles, i)
  1088. local ball1 = Instance.new("Part", model)
  1089. ball1.Size = Vector3.new(0,0,0)
  1090. ball1.Name = "firework"
  1091. ball1.Material = "Neon"
  1092. ball1.BrickColor = BrickColor.new(MainColor)
  1093. ball1.Anchored = true
  1094. ball1.Transparency = 0
  1095. ball1.CanCollide = false
  1096. ball1.CFrame = CFrame.new(v.Position.x,v.Position.y,v.Position.z)
  1097. local spikemesh = Instance.new("SpecialMesh", ball1)
  1098. spikemesh.Name = "SpikeMesh"
  1099. spikemesh.MeshType = "Sphere"
  1100. spikemesh.Scale = Vector3.new(5,5,5)
  1101. table.insert(SpinTable,ball1)
  1102. local s = Instance.new("Sound", ball1) --Crackle
  1103. s.SoundId = "rbxassetid://435195821"
  1104. s.EmitterSize = 100
  1105. s.Volume = 0.6
  1106. s:Play()
  1107. game:GetService("Debris"):AddItem(s, 2)
  1108. local s = Instance.new("Sound", ball1) --boom
  1109. s.SoundId = "rbxassetid://514867425"
  1110. s.EmitterSize = 100
  1111. s.Volume = 100
  1112. s:Play()
  1113. game:GetService("Debris"):AddItem(s, 2)
  1114. game:GetService("RunService").Stepped:wait()
  1115. for i = 1,12 do --THIS IS A GOOD POINT
  1116. local p = Instance.new("Part",ball1)
  1117. p.Name = "firework"
  1118. p.Size = Vector3.new(0,0,0)
  1119. p.Transparency = 0
  1120. p.CanCollide = true
  1121. p.CFrame = ball1.CFrame*CFrame.new(math.random(-4,4),i,math.random(-4,4))
  1122. p.Material = "Neon"
  1123. p.BrickColor = BrickColor.new(Rainbow[i])
  1124. local f = Instance.new("Fire",p)
  1125. f.Color = BrickColor.new(Rainbow[i]).Color
  1126. f.SecondaryColor = Color3.new(1,1,1)
  1127. local spikemesh = Instance.new("BlockMesh", p)
  1128. spikemesh.Name = "SpikeMesh"
  1129. spikemesh.Scale = Vector3.new(20,20,20)
  1130. table.insert(TSTable, p)
  1131. end
  1132. wait(0.1)
  1133. local e = Instance.new("Explosion", ball1)
  1134. e.Position = ball1.Position
  1135. e.BlastPressure = 100000
  1136. e.BlastRadius = 20
  1137. e.ExplosionType = "CratersAndDebris"
  1138. else
  1139. v.BrickColor = BrickColor.new(Rainbow[rainbowNumber])
  1140. local somethingWasHit = false
  1141. local Region = CreateRegion3FromLocAndSize(v.Position, Vector3.new(1,1,1))
  1142. for _,Part in pairs(workspace:FindPartsInRegion3WithIgnoreList(Region,{char},math.huge)) do
  1143. if not somethingWasHit and Part.Name ~= "firework" and Part.Name ~= "firework1" and Part.Name ~= "projectile" and Part.Name ~= "Particle" then
  1144. somethingWasHit = true
  1145. v:Remove()
  1146. table.remove(projectiles, i)
  1147. takeDamage(v.Position, math.random(10,20), 13, false)
  1148. for i = 1,6 do
  1149. local ball = Instance.new("Part", model)
  1150. ball.Size = Vector3.new(0,0,0)
  1151. ball.Name = "firework1"
  1152. ball.Material = "Neon"
  1153. ball.BrickColor = BrickColor.new(MainColor)
  1154. ball.Anchored = true
  1155. ball.Transparency = 0.5
  1156. ball.CanCollide = false
  1157. if i == 1 then
  1158. ball.CFrame = CFrame.new(v.Position.x,v.Position.y,v.Position.z)
  1159. ball.Transparency = 0
  1160. else
  1161. ball.CFrame = CFrame.new(v.Position.x+math.random(-3,3),(v.Position.y+math.random(-3,3)),v.Position.z+math.random(-3,3))
  1162. end
  1163. local spikemesh = Instance.new("SpecialMesh", ball)
  1164. spikemesh.Name = "SpikeMesh"
  1165. spikemesh.MeshType = "Sphere"
  1166. spikemesh.Scale = Vector3.new(1,1,1)
  1167. table.insert(SpinTable,ball)
  1168. if i == 1 then
  1169. local s = Instance.new("Sound", ball)
  1170. s.SoundId = "rbxassetid://435195821"
  1171. s.EmitterSize = 20
  1172. s.Volume = 0.5
  1173. s:Play()
  1174. game:GetService("Debris"):AddItem(s, 5)
  1175. local s = Instance.new("Sound", ball) --boom
  1176. s.SoundId = "rbxassetid://540926687"
  1177. s.EmitterSize = 50
  1178. s.Volume = 1
  1179. s:Play()
  1180. game:GetService("Debris"):AddItem(s, 3)
  1181. end
  1182. end
  1183. end
  1184. end
  1185. end
  1186. pcall(function()
  1187. v.CFrame = v.CFrame*CFrame.new(0,0,-3)
  1188. end)
  1189. end
  1190. end
  1191. if rainbowMode then
  1192. Mana = 1000000
  1193. ManaBar.BackgroundColor3 = BrickColor.new(Rainbow[rainbowNumber]).Color
  1194. HealthBar.BackgroundColor3 = BrickColor.new(Rainbow[rainbowNumber]).Color
  1195. Info.TextColor = BrickColor.new(Rainbow[rainbowNumber])
  1196. Q.TextColor = BrickColor.new(Rainbow[rainbowNumber])
  1197. E.TextColor = BrickColor.new(Rainbow[rainbowNumber])
  1198. for i,v in pairs(char:GetChildren()) do
  1199. if v:isA("Part") then
  1200. v.Transparency = 1
  1201. local cp = v:Clone()
  1202. cp.CanCollide = false
  1203. cp.Anchored = true
  1204. cp.Material = "SmoothPlastic"
  1205. cp.Transparency = 0
  1206. cp.BrickColor = BrickColor.new(Rainbow[rainbowNumber])
  1207. cp.CFrame = v.CFrame --*CFrame.new(0,0,0)*CFrame.Angles(math.rad(math.random(-20,20)),math.rad(math.random(-20,20)),math.rad(math.random(-20,20)))
  1208. for _,extra in pairs(cp:GetChildren()) do
  1209. if not extra:isA("SpecialMesh") then
  1210. extra:Remove()
  1211. end
  1212. end
  1213. if v.Name ~= "Head" then
  1214. local mesh = Instance.new("BlockMesh")
  1215. mesh.Parent = cp
  1216. mesh.Scale = Vector3.new(1,1,1)
  1217. end
  1218. cp.Parent = model
  1219. table.insert(bodyparts, cp)
  1220. end
  1221. end
  1222. end
  1223. if #bodyparts > 0 then
  1224. for i,v in pairs(bodyparts) do
  1225. if v.Transparency < 1 then
  1226. v.Transparency = v.Transparency + 0.05
  1227. --v.Mesh.Scale = v.Mesh.Scale-Vector3.new(0.05,0.05,0.05)
  1228. else
  1229. table.remove(bodyparts, i)
  1230. v:Remove()
  1231. end
  1232. end
  1233. end
  1234. if rainbowNumber >= #Rainbow then
  1235. rainbowNumber = 1
  1236. else
  1237. rainbowNumber = rainbowNumber + 1
  1238. end
  1239. end)
  1240.  
  1241. local wtap = false
  1242. Mouse.KeyDown:connect(function(key)
  1243. if key:lower() == "q" then
  1244. spellMover = spells[#spells]
  1245. table.remove(spells, #spells)
  1246. table.insert(spells, 1, spellMover)
  1247. loadSpellGui()
  1248. elseif key:lower() == "e" then
  1249. spellMover = spells[1]
  1250. table.remove(spells, 1)
  1251. table.insert(spells, #spells+1, spellMover)
  1252. loadSpellGui()
  1253. end
  1254. if not inAction then
  1255. if key:lower() == "w" then
  1256. if wtap then
  1257. if Mana > 0 then
  1258. holdingw = true
  1259. inAction = true
  1260. isCharging = true
  1261. char.Humanoid.WalkSpeed = 0
  1262. char.Humanoid.JumpPower = 0
  1263. actionWalking = false
  1264. currentAnim = "DashDown"
  1265. local dashs = Instance.new("Sound", torso) --whole opening
  1266. dashs.SoundId = "rbxassetid://551066808" --ADD DASHING SOUND
  1267. dashs.EmitterSize = 12
  1268. dashs.Volume = 100
  1269. dashs.Looped = true
  1270. dashs:Play()
  1271. wait(0.2)
  1272. isCharging = false
  1273. takeDamage(rootpart.Position, math.random(20,30), 10, false)
  1274. char.Humanoid.WalkSpeed = 1
  1275. currentAnim = "Dashing"
  1276. if holdingw then
  1277. repeat wait() until not holdingw
  1278. else
  1279. wait(0.3)
  1280. end
  1281. dashs:Remove()
  1282. currentAnim = "DashSlowing"
  1283. slowingDown = 1
  1284. wait(0.5)
  1285. char.Humanoid.JumpPower = jumpPower
  1286. wtap = false
  1287. actionWalking = true
  1288. inAction = false
  1289. char.Humanoid.WalkSpeed = CharacterSpeed
  1290. end
  1291. else
  1292. wtap = true
  1293. wait(0.2)
  1294. wtap = false
  1295. end
  1296. end
  1297. end
  1298. end)
  1299. Mouse.KeyUp:connect(function(key)
  1300. if key:lower() == "w" then
  1301. holdingw = false
  1302. end
  1303. end)
  1304. Mouse.Button1Down:connect(function()
  1305. holdingMouse1 = true
  1306. if not inAction then
  1307. if Mana >= currentSpell.ManaCost then
  1308. Mana = Mana - currentSpell.ManaCost
  1309. if currentSpell.Name == "Firework" then
  1310. inAction = true
  1311. currentAnim = "ArmUp"
  1312. wait(0.05)
  1313. currentAnim = "Slash1"
  1314. isCharging = true
  1315. wait(0.3)
  1316. currentAnim = "SlashMini"
  1317. wait(0.1)
  1318. currentAnim = "Slash2"
  1319. wait(0.08)
  1320. if holdingMouse1 then
  1321. repeat if Mana >= currentSpell.ManaCost then Mana = (Mana - currentSpell.ManaCost) else holdingMouse1 = false end OriginalProjectile(Mouse.Hit.p) wait(0.1) currentAnim = "SlashMini" wait(0.2) currentAnim = "Slash2" until not holdingMouse1
  1322. else
  1323. OriginalProjectile(Mouse.Hit.p)
  1324. end
  1325. isCharging = false
  1326. inAction = false
  1327. elseif currentSpell.Name == "Void Crush" then
  1328. inAction = true
  1329. currentAnim = "Casting"
  1330. char.Humanoid.WalkSpeed = CharacterSpeed/1.5
  1331. walkingAnimationSpeed = walkingAnimationSpeed*1.5
  1332. castingStart(1)
  1333. wait(1)
  1334. currentAnim = "SlashMini"
  1335. wait(0.1)
  1336. currentAnim = "Slash2"
  1337. wait(0.08)
  1338. createHole(Mouse.Hit.p, 30)
  1339. char.Humanoid.WalkSpeed = CharacterSpeed
  1340. walkingAnimationSpeed = walkingAnimationSpeed/1.5
  1341. isCharging = false
  1342. inAction = false
  1343. elseif currentSpell.Name == "Teleport" then
  1344. inAction = true
  1345. currentAnim = "Casting"
  1346. char.Humanoid.WalkSpeed = CharacterSpeed/1.5
  1347. walkingAnimationSpeed = walkingAnimationSpeed*1.5
  1348. castingStart(0.7)
  1349. wait(0.5)
  1350. if (torso.Position - Mouse.Hit.p).magnitude <= 3000 then
  1351. local tball1 = Instance.new("Part", model)
  1352. tball1.Size = Vector3.new(0,0,0)
  1353. tball1.Name = "teleball"
  1354. tball1.Material = "Neon"
  1355. tball1.BrickColor = BrickColor.new(MainColor)
  1356. tball1.Anchored = true
  1357. tball1.Transparency = 0.95
  1358. tball1.CanCollide = false
  1359. tball1.CFrame = CFrame.new(Mouse.Hit.p.X, Mouse.Hit.p.Y+3, Mouse.Hit.p.Z)
  1360. local spikemesh = Instance.new("SpecialMesh", tball1)
  1361. spikemesh.Name = "SpikeMesh"
  1362. spikemesh.MeshType = "Sphere"
  1363. spikemesh.Scale = Vector3.new(1,1,1)
  1364. table.insert(SpinTable,tball1)
  1365. local tball = Instance.new("Part", model)
  1366. tball.Size = Vector3.new(0,0,0)
  1367. tball.Name = "teleball"
  1368. tball.Material = "Neon"
  1369. tball.BrickColor = BrickColor.new(MainColor)
  1370. tball.Anchored = false
  1371. tball.Transparency = 0.95
  1372. tball.CanCollide = false
  1373. tball.CFrame = torso.CFrame
  1374. local spikemesh = Instance.new("SpecialMesh", tball)
  1375. spikemesh.Name = "SpikeMesh"
  1376. spikemesh.MeshType = "Sphere"
  1377. spikemesh.Scale = Vector3.new(1,1,1)
  1378. table.insert(SpinTable,tball)
  1379. local TWeld = Instance.new("Weld",tball)
  1380. TWeld.Part0 = tball
  1381. TWeld.Part1 = torso
  1382. TWeld.C0 = CFrame.new(0,0,0)
  1383. wait(0.1)
  1384. local s = Instance.new("Sound", torso)
  1385. s.SoundId = "rbxassetid://289556450"
  1386. s.EmitterSize = 5
  1387. s.Volume = 1
  1388. s:Play()
  1389. game:GetService("Debris"):AddItem(s, 3)
  1390. local laser2 = Instance.new("Part", model)
  1391. laser2.Color = BrickColor.White().Color
  1392. laser2.Transparency = 0.1
  1393. laser2.Name = "transRainbowPart"
  1394. laser2.Material = "Neon"
  1395. laser2.Anchored = true
  1396. laser2.CanCollide = false
  1397. laser2.CFrame = CFrame.new(((tball.Position.X + tball1.Position.X) / 2), ((tball.Position.Y + tball1.Position.Y) / 2), ((tball.Position.Z + tball1.Position.Z) / 2))
  1398. laser2.CFrame = CFrame.new(laser2.Position, tball1.Position)
  1399. laser2.Size = Vector3.new(0, 0, (tball.Position - tball1.Position).magnitude)
  1400. local bm = Instance.new("BlockMesh", laser2)
  1401. bm.Scale = Vector3.new(2, 2, 1)
  1402. table.insert(SpinTable,laser2)
  1403. wait(0.1)
  1404. TWeld:Remove()
  1405. tball.CFrame = torso.CFrame
  1406. tball.Anchored = true
  1407. tball.Name = "teleballsmall"
  1408. rootpart.CFrame = tball1.CFrame
  1409. tball1.Name = "teleballsmall"
  1410. end
  1411. char.Humanoid.WalkSpeed = CharacterSpeed
  1412. walkingAnimationSpeed = walkingAnimationSpeed/1.5
  1413. isCharging = false
  1414. inAction = false
  1415. elseif currentSpell.Name == "True Form" then
  1416. inAction = true
  1417. currentAnim = "Casting"
  1418. char.Humanoid.WalkSpeed = CharacterSpeed/1.5
  1419. walkingAnimationSpeed = walkingAnimationSpeed*1.5
  1420. wait(3)
  1421. if rainbowMode then
  1422. rainbowMode = false
  1423. pcall(function()
  1424. rainbows:Remove()
  1425. end)
  1426. for i,v in pairs(char:GetChildren()) do
  1427. if v:isA("Part") then
  1428. if v.Name ~= "HumanoidRootPart" then
  1429. v.Transparency = 0
  1430. end
  1431. elseif v:isA("Accessory") then
  1432. v.Handle.Transparency = 0
  1433. end
  1434. end
  1435. CharacterSpeed = CharacterSpeed/2
  1436. walkingAnimationSpeed = 3.5*1.5
  1437. model.face.Parent = char.Head
  1438. ManaBar.BackgroundColor3 = Color3.new(0, 0.317647, 1)
  1439. HealthBar.BackgroundColor3 = Color3.new(0, 0.8, 0.02)
  1440. Info.TextColor = BrickColor.new(MainColor)
  1441. Q.TextColor = BrickColor.new(MainColor)
  1442. E.TextColor = BrickColor.new(MainColor)
  1443. else
  1444. for i,v in pairs(char:GetChildren()) do
  1445. if v:isA("Part") then
  1446. if v.Name ~= "HumanoidRootPart" then
  1447. v.Transparency = 1
  1448. end
  1449. elseif v:isA("Accessory") then
  1450. v.Handle.Transparency = 1
  1451. end
  1452. end
  1453. CharacterSpeed = CharacterSpeed*2
  1454. walkingAnimationSpeed = 6*1.5
  1455. char.Humanoid.WalkSpeed = CharacterSpeed
  1456. char.Head.face.Parent = model
  1457. rainbowMode = true
  1458. rainbows = Instance.new("Sound", torso) --whole opening
  1459. rainbows.SoundId = "rbxassetid://554418756"
  1460. rainbows.EmitterSize = 6
  1461. rainbows.Volume = 3
  1462. rainbows:Play()
  1463. rainbows.Looped = true
  1464. end
  1465. char.Humanoid.WalkSpeed = CharacterSpeed
  1466. walkingAnimationSpeed = walkingAnimationSpeed/1.5
  1467. isCharging = false
  1468. inAction = false
  1469. end
  1470. else
  1471. print("Not enough mana")
  1472. end
  1473. end
  1474. end)
  1475. Mouse.Button1Up:connect(function()
  1476. holdingMouse1 = false
  1477. end)
Advertisement
Add Comment
Please, Sign In to add comment