Advertisement
DaOMEGAa32

fe firework guy

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