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