View difference between Paste ID: QLTKYzBa and 46Yaf5q2
SHOW: | | - or go back to the newest paste.
1
--[[
2
Script Version 1.4
3
4
Wand generation A3000, A.K.A. Wanda, was used by novice warlocks and witches to practice/use magic.
5
It was developed by the UMTAWC (United Magical Theory And Wizardry Comittee, abbreviation pronounced "um-talk")
6
Wood carved and infused with magic properties by DarkShadow6
7
--]]
8
--http://www.roblox.com/Asset/?id=22968437
9
10
if script == nil then return end
11
12
13-
Player = game.Players.lucasdrtty
13+
Player = game.Players.RoyalOOBatManOo
14
Char = Player.Character
15
animate = Char:findFirstChild("Animate")
16
if animate then
17
animate:Destroy()
18
end
19
Name = "Kruto"
20
selected = false
21
Button1Down = false
22
canFire = true
23
spell = 0
24
spellHotkey1 = 0
25
spellHotkey2 = 0
26
spellHotkey3 = 0
27
spellHotkey1Delay = 0
28
spellHotkey2Delay = 0
29
spellHotkey3Delay = 0
30
spellText = "None"
31
power = 1000000
32
33
34
spellGui = Instance.new("ScreenGui")
35
spellGui.Name = Name
36
local frame = Instance.new("Frame")
37
frame.Name = "Frame"
38
frame.Size = UDim2.new(0, 165, 0, 60)
39
frame.Position = UDim2.new(0, 0, 1, -60)
40
frame.BackgroundColor3 = Color3.new(1, 1, 1)
41
frame.BorderColor3 = Color3.new(0, 0, 0)
42
frame.Parent = spellGui
43
local label = Instance.new("TextLabel")
44
label.Name = "Weapon"
45
label.Text = "Weapon: " ..Name
46
label.Size = UDim2.new(1, 0, 0, 20)
47
label.Position = UDim2.new(0, 0, 0, 0)
48
label.BackgroundColor3 = Color3.new(1, 0, 0)
49
label.BorderColor3 = Color3.new(0, 0, 0)
50
label.Parent = frame
51
local label = Instance.new("TextLabel")
52
label.Name = "SpellPrefix"
53
label.Text = "    Spell:"
54
label.TextXAlignment = "Left"
55
label.Size = UDim2.new(1, 0, 0, 20)
56
label.Position = UDim2.new(0, 0, 0, 20)
57
label.BackgroundColor3 = Color3.new(1, 1, 1)
58
label.BorderColor3 = Color3.new(0, 0, 0)
59
label.Parent = frame
60
local label = Instance.new("TextLabel")
61
label.Name = "Spell"
62
label.Text = "None"
63
label.TextXAlignment = "Right"
64
label.Size = UDim2.new(1, 0, 0, 20)
65
label.Position = UDim2.new(0, -10, 0, 20)
66
label.BackgroundTransparency = 1
67
label.BorderSizePixel = 0
68
label.Parent = frame
69
local label = Instance.new("TextLabel")
70
label.Name = "PowerPrefix"
71
label.Text = "    Power:"
72
label.TextXAlignment = "Left"
73
label.Size = UDim2.new(1, 0, 0, 20)
74
label.Position = UDim2.new(0, 0, 0, 40)
75
label.BackgroundColor3 = Color3.new(1, 1, 1)
76
label.BorderColor3 = Color3.new(0, 0, 0)
77
label.Parent = frame
78
local label = Instance.new("TextLabel")
79
label.Name = "Power"
80
label.Text = "100"
81
label.TextXAlignment = "Right"
82
label.Size = UDim2.new(1, 0, 0, 20)
83
label.Position = UDim2.new(0, -10, 0, 40)
84
label.BackgroundTransparency = 1
85
label.BorderSizePixel = 0
86
label.Parent = frame
87
88
89
function updateGui(format)
90
	if selected == false then return end
91
	if Player:FindFirstChild("PlayerGui") == nil then Instance.new("PlayerGui").Parent = Player end
92
	if Player.PlayerGui:FindFirstChild(Name) == nil then
93
		spellGui:Clone().Parent = Player.PlayerGui
94
	end
95
	Player.PlayerGui[Name].Frame.Spell.Text = spellText
96
	if power <= 0 then
97
		Player.PlayerGui[Name].Frame.Power.Text = "OVERHEAT (" ..math.abs(power).. ")"
98
	else
99
		Player.PlayerGui[Name].Frame.Power.Text = power
100
	end
101
end
102
103
104
function updateSpellText()
105
	if spell == 1 then
106
		spellText = "Arefu Slash (1P)"
107
	elseif spell == 2 then
108
		spellText = "Arefu Metoria (50P)"
109
	elseif spell == 3 then
110
		spellText = "Eccrando Bolt (25P)"
111
	elseif spell == 4 then
112
		spellText = "Eccrando Strike (~60P)"
113
	elseif spell == 5 then
114
		spellText = "Thius Dae (1P/2ms)"
115
	elseif spell == 6 then
116
		spellText = "Thius Heed (1P/2ms)"
117
	elseif spell == 7 then
118
		spellText = "Combuscus Phore (75P)"
119
	elseif spell == 8 then
120
		spellText = "Combuscus Burn (10P)"
121
	elseif spell == 9 then
122
		spellText = "Combuscus Vortex (50P)"
123
	elseif spell == 10 then
124
		spellText = "C. Phore Nexus (100P)"
125
	elseif spell == 11 then
126
		spellText = "Kanamla Cysis (2P/1sec)"
127
	elseif spell == 12 then
128
		spellText = "Kanamla Tepidift (50P)"
129
	elseif spell == 13 then
130
		spellText = "Kruto Jump (5P)"
131
	elseif spell == 14 then
132
		spellText = "Candora Hide (2P/1sec)"
133
	elseif spell == 15 then
134
		spellText = "Duraen Control (1P/?ms)"
135
	elseif spell == 16 then
136
		spellText = "Duraen Switch (?P)"
137
	else
138
		spellText = "None"
139
	end
140
end
141
142
143
function makeParts(format)
144
	local model = Instance.new("Model")
145
	model.Name = Name
146
	model.Parent = Player.Character
147
	local pm = Instance.new("Part")
148
	pm.Name = "Handle"
149
	pm.FormFactor = "Custom"
150
	pm.Size = Vector3.new(1, 1, 1)
151
	pm.BrickColor = BrickColor.new("Deep red")
152
	pm.Locked = true
153
	pm.TopSurface = 0
154
	pm.BottomSurface = 0
155
	pm.Parent = model
156
	local m = Instance.new("SpecialMesh")
157
	m.MeshType = "Head"
158
	m.Scale = Vector3.new(0.3, 2, 0.3)
159
	m.Parent = pm
160
	if format ~= nil then
161
		local w = Instance.new("Weld")
162
		w.Part0 = pm
163
		if format == "hand" then
164
			w.Part1 = Player.Character:FindFirstChild("Right Arm")
165
			w.C0 = CFrame.new(0, -0.75, 0.9) * CFrame.fromEulerAnglesXYZ(math.rad(90), 0, 0)
166
			w.C1 = CFrame.new()
167
			w.Parent = pm
168
		elseif format == "holster" then
169
			w.Part1 = Player.Character:FindFirstChild("Right Leg")
170
			w.C0 = CFrame.new(0, 0.1, -0.55) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
171
			w.C1 = CFrame.new()
172
			w.Parent = pm
173
			model.Name = Name.. " (Holstered)"
174
		else
175
			print("Error: Incorrect format string!")
176
		end
177
	end
178
	local s = Instance.new("Sound")
179
	s.Name = "Shine"
180
	s.SoundId = "http://www.roblox.com/Asset/?id=2101144"
181
	s.Volume = 1
182
	s.Pitch = 1
183
	s.Looped = false
184
	s.Parent = pm
185
	local s = Instance.new("Sound")
186
	s.Name = "Bolt"
187
	s.SoundId = "http://www.roblox.com/Asset/?id=2974000"
188
	s.Volume = 1
189
	s.Pitch = 1
190
	s.Looped = false
191
	s.Parent = pm
192
	local s = Instance.new("Sound")
193
	s.Name = "Impact1"
194
	s.SoundId = "http://www.roblox.com/Asset/?id=10209596"
195
	s.Volume = 1
196
	s.Pitch = 1
197
	s.Looped = false
198
	s.Parent = pm
199
	local s = Instance.new("Sound")
200
	s.Name = "Charge1"
201
	s.SoundId = "http://www.roblox.com/Asset/?id=1369158"
202
	s.Volume = 1
203
	s.Pitch = 1
204
	s.Looped = false
205
	s.Parent = pm
206
	local s = Instance.new("Sound")
207
	s.Name = "Charge2"
208
	s.SoundId = "http://www.roblox.com/Asset/?id=2101137"
209
	s.Volume = 1
210
	s.Pitch = 1
211
	s.Looped = false
212
	s.Parent = pm
213
	local s = Instance.new("Sound")
214
	s.Name = "Charge3"
215
	s.SoundId = "http://www.roblox.com/Asset/?id=2785493"
216
	s.Volume = 1
217
	s.Pitch = 1
218
	s.Looped = false
219
	s.Parent = pm
220
	local s = Instance.new("Sound")
221
	s.Name = "Charge4"
222
	s.SoundId = "http://www.roblox.com/Asset/?id=35275769"
223
	s.Volume = 1
224
	s.Pitch = 1
225
	s.Looped = false
226
	s.Parent = pm
227
	local s = Instance.new("Sound")
228
	s.Name = "Fire1"
229
	s.SoundId = "http://www.roblox.com/Asset/?id=10209268"
230
	s.Volume = 1
231
	s.Pitch = 1
232
	s.Looped = false
233
	s.Parent = pm
234
	local s = Instance.new("Sound")
235
	s.Name = "Fire2"
236
	s.SoundId = "http://www.roblox.com/Asset/?id=13775466"
237
	s.Volume = 1
238
	s.Pitch = 1
239
	s.Looped = false
240
	s.Parent = pm
241
	local s = Instance.new("Sound")
242
	s.Name = "Fire3"
243
	s.SoundId = "http://www.roblox.com/Asset/?id=2767090"
244
	s.Volume = 1
245
	s.Pitch = 1
246
	s.Looped = false
247
	s.Parent = pm
248
	local s = Instance.new("Sound")
249
	s.Name = "Fire4"
250
	s.SoundId = "http://www.roblox.com/Asset/?id=2800815"
251
	s.Volume = 1
252
	s.Pitch = 1
253
	s.Looped = false
254
	s.Parent = pm
255
	local s = Instance.new("Sound")
256
	s.Name = "Fire5"
257
	s.SoundId = "http://www.roblox.com/Asset/?id=2974249"
258
	s.Volume = 1
259
	s.Pitch = 1
260
	s.Looped = false
261
	s.Parent = pm
262
	local p = Instance.new("Part")
263
	p.Name = "Source"
264
	p.FormFactor = "Custom"
265
	p.Size = Vector3.new(1, 1, 1)
266
	p.Transparency = 1
267
	p.BrickColor = BrickColor.new("Really black")
268
	p.CanCollide = false
269
	p.Locked = true
270
	p.TopSurface = 0
271
	p.BottomSurface = 0
272
	p.Parent = model
273
	local m = Instance.new("SpecialMesh")
274
	m.MeshType = "Sphere"
275
	m.Scale = Vector3.new(1, 1, 1)
276
	m.Parent = p
277
	local w = Instance.new("Weld")
278
	w.Part0 = p
279
	w.Part1 = pm
280
	w.C0 = CFrame.new()
281
	w.C1 = CFrame.new(0, 1, 0)
282
	w.Parent = p
283
	local f = Instance.new("Fire")
284
	f.Enabled = false
285
	f.Name = "Fire"
286
	f.Heat = 0
287
	f.Size = 1
288
	f.Parent = p
289
end
290
291
292
function removeParts(format)
293
	if format == "hand" then
294
		if Player.Character:FindFirstChild(Name) ~= nil then
295
			Player.Character[Name]:Remove()
296
		end
297
	elseif format == "holster" then
298
		if Player.Character:FindFirstChild(Name.. " (Holstered)") ~= nil then
299
			Player.Character[Name.. " (Holstered)"]:Remove()
300
		end
301
	end
302
end
303
304
305
function SetAngle(Joint, Angle, Character)
306
	if Character == nil then return false end
307
	local Joints = {
308
		Character.Torso:FindFirstChild("Right Shoulder 2"),
309
		Character.Torso:FindFirstChild("Left Shoulder 2"),
310
		Character.Torso:FindFirstChild("Right Hip 2"),
311
		Character.Torso:FindFirstChild("Left Hip 2")
312
	}
313
	if Joints[Joint] == nil then return false end
314
	if Joint == 1 or Joint == 3 then
315
		Joints[Joint].DesiredAngle = Angle
316
	end
317
	if Joint == 2 or Joint == 4 then
318
		Joints[Joint].DesiredAngle = -Angle
319
	end
320
end
321
322
323
function ForceAngle(Joint, Angle, Character)
324
	if Character == nil then return false end
325
	local Joints = {
326
		Character.Torso:FindFirstChild("Right Shoulder 2"),
327
		Character.Torso:FindFirstChild("Left Shoulder 2"),
328
		Character.Torso:FindFirstChild("Right Hip 2"),
329
		Character.Torso:FindFirstChild("Left Hip 2")
330
	}
331
	if Joints[Joint] == nil then return false end
332
	if Joint == 1 or Joint == 3 then
333
		Joints[Joint].DesiredAngle = Angle
334
		Joints[Joint].CurrentAngle = Angle
335
	end
336
	if Joint == 2 or Joint == 4 then
337
		Joints[Joint].DesiredAngle = -Angle
338
		Joints[Joint].CurrentAngle = -Angle
339
	end
340
end
341
342
343
function SetSpeed(Joint, Speed, Character)
344
	if Character == nil then return false end
345
	local Joints = {
346
		Character.Torso:FindFirstChild("Right Shoulder 2"),
347
		Character.Torso:FindFirstChild("Left Shoulder 2"),
348
		Character.Torso:FindFirstChild("Right Hip 2"),
349
		Character.Torso:FindFirstChild("Left Hip 2")
350
	}
351
	if Joints[Joint] == nil then return false end
352
	Joints[Joint].MaxVelocity = Speed
353
end
354
355
356
function DisableLimb(Limb, Character)
357
	if Character == nil then return false end
358
	if Character:FindFirstChild("Torso") == nil then return false end
359
	local Joints = {
360
		Character.Torso:FindFirstChild("Right Shoulder"),
361
		Character.Torso:FindFirstChild("Left Shoulder"),
362
		Character.Torso:FindFirstChild("Right Hip"),
363
		Character.Torso:FindFirstChild("Left Hip")
364
	}
365
	local Limbs = {
366
		Character:FindFirstChild("Right Arm"),
367
		Character:FindFirstChild("Left Arm"),
368
		Character:FindFirstChild("Right Leg"),
369
		Character:FindFirstChild("Left Leg")
370
	}
371
	if Joints[Limb] == nil then return false end
372
	if Limbs[Limb] == nil then return false end
373
	local Joint = Instance.new("Motor")
374
	Joint.Parent = Character.Torso
375
	Joint.Part0 = Character.Torso
376
	Joint.Part1 = Limbs[Limb]
377
	if Limb == 1 then
378
		Joint.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
379
		Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
380
		Joint.Name = "Right Shoulder 2"
381
	elseif Limb == 2 then
382
		Joint.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
383
		Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
384
		Joint.Name = "Left Shoulder 2"
385
	elseif Limb == 3 then
386
		Joint.C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
387
		Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
388
		Joint.Name = "Right Hip 2"
389
	elseif Limb == 4 then
390
		Joint.C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
391
		Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
392
		Joint.Name = "Left Hip 2"
393
	end
394
	Joint.MaxVelocity = Joints[Limb].MaxVelocity
395
	Joint.CurrentAngle = Joints[Limb].CurrentAngle
396
	Joint.DesiredAngle = Joints[Limb].DesiredAngle
397
	Joints[Limb]:Remove()
398
end
399
400
401
function ResetLimbCFrame(Limb, Character)
402
	if Character == nil then return false end
403
	if Character.Parent == nil then return false end
404
	if Character:FindFirstChild("Torso") == nil then return false end
405
	local Joints = {
406
		Character.Torso:FindFirstChild("Right Shoulder 2"),
407
		Character.Torso:FindFirstChild("Left Shoulder 2"),
408
		Character.Torso:FindFirstChild("Right Hip 2"),
409
		Character.Torso:FindFirstChild("Left Hip 2")
410
	}
411
	local Limbs = {
412
		Character:FindFirstChild("Right Arm"),
413
		Character:FindFirstChild("Left Arm"),
414
		Character:FindFirstChild("Right Leg"),
415
		Character:FindFirstChild("Left Leg")
416
	}
417
	if Joints[Limb] == nil then return false end
418
	if Limbs[Limb] == nil then return false end
419
	if Limb == 1 then
420
		Joints[Limb].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
421
		Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
422
	elseif Limb == 2 then
423
		Joints[Limb].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
424
		Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
425
	elseif Limb == 3 then
426
		Joints[Limb].C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
427
		Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
428
	elseif Limb == 4 then
429
		Joints[Limb].C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
430
		Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
431
	end
432
end
433
434
435
function EnableLimb(Limb, Character)
436
	if Character == nil then return false end
437
	if Character:FindFirstChild("Torso") == nil then return false end
438
	local Joints = {
439
		Character.Torso:FindFirstChild("Right Shoulder 2"),
440
		Character.Torso:FindFirstChild("Left Shoulder 2"),
441
		Character.Torso:FindFirstChild("Right Hip 2"),
442
		Character.Torso:FindFirstChild("Left Hip 2")
443
	}
444
	local Limbs = {
445
		Character:FindFirstChild("Right Arm"),
446
		Character:FindFirstChild("Left Arm"),
447
		Character:FindFirstChild("Right Leg"),
448
		Character:FindFirstChild("Left Leg")
449
	}
450
	if Joints[Limb] == nil then return false end
451
	if Limbs[Limb] == nil then return false end
452
	if Limb == 1 then
453
		Joints[Limb].Name = "Right Shoulder"
454
	elseif Limb == 2 then
455
		Joints[Limb].Name = "Left Shoulder"
456
	elseif Limb == 3 then
457
		Joints[Limb].Name = "Right Hip"
458
	elseif Limb == 4 then
459
		Joints[Limb].Name = "Left Hip"
460
	end
461
	Animate = Character:FindFirstChild("Animate")
462
	if Animate == nil then return false end
463
	Animate = Animate:Clone()
464
	Character.Animate:Remove()
465
	Animate.Parent = Character
466
end
467
468
469
function Weld(x, y)
470
	local weld = Instance.new("Weld")
471
	weld.Part0 = x
472
	weld.Part1 = y
473
	CJ = CFrame.new(x.Position)
474
	C0 = x.CFrame:inverse() * CJ
475
	C1 = y.CFrame:inverse() * CJ
476
	weld.C0 = C0
477
	weld.C1 = C1
478
	weld.Parent = x
479
end
480
481
482
function tagHumanoid(humanoid)
483
	local tag = Instance.new("ObjectValue")
484
	tag.Name = "creator"
485
	tag.Value = Player
486
	tag.Parent = humanoid
487
	local tag = Instance.new("StringValue")
488
	tag.Name = "creatorType1"
489
	tag.Value = Name
490
	tag.Parent = humanoid
491
	local tag = Instance.new("StringValue")
492
	tag.Name = "creatorType2"
493
	tag.Value = "killed with magic"
494
	tag.Parent = humanoid
495
end
496
497
498
function untagHumanoid(humanoid)
499
	if humanoid ~= nil then
500
		local tag = humanoid:FindFirstChild("creator")
501
		if tag ~= nil then
502
			tag:Remove()
503
		end
504
		local tag = humanoid:FindFirstChild("creatorType1")
505
		if tag ~= nil then
506
			tag:Remove()
507
		end
508
		local tag = humanoid:FindFirstChild("creatorType2")
509
		if tag ~= nil then
510
			tag:Remove()
511
		end
512
	end
513
end
514
515
516
function onButton1Down(mouse)
517
	if selected == false or canFire == false or power <= 0 then return end
518
	if Player.Character == nil then return end
519
	if Player.Character:FindFirstChild("Humanoid") == nil then return end
520
	if Player.Character.Humanoid.Health <= 0 then return end
521
	if Player.Character:FindFirstChild(Name) == nil then return end
522
	if Player.Character[Name]:FindFirstChild("Handle") == nil then return end
523
	if Player.Character[Name]:FindFirstChild("Source") == nil then return end
524
	if mouse == nil then return end
525
	Button1Down = true
526
	if spell == 1 then
527
		--Arefu Slash, projectile class. Uses hardened air particles to create razor-sharp projectiles.
528
		canFire = false
529
		Player.Character[Name].Source.Mesh.MeshType = "Sphere"
530
		Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
531
		Player.Character[Name].Source.Transparency = 0.25
532
		Player.Character[Name].Source.BrickColor = BrickColor.new("Bright green")
533
		Player.Character[Name].Source.Fire.Enabled = true
534
		Player.Character[Name].Source.Fire.Heat = math.random(5, 10)
535
		Player.Character[Name].Source.Fire.Size = math.random(5, 10)
536
		Player.Character[Name].Source.Fire.Color = Color3.new(0, 1, 0)
537
		Player.Character[Name].Source.Fire.SecondaryColor = Color3.new(1, 1, 1)
538
		while Button1Down == true do
539
			if power <= 0 then break end
540
			coroutine.resume(coroutine.create(function()
541
				for i = 0, 1, 0.1 do
542
					Player.Character[Name].Source.Mesh.Scale = (Vector3.new(i, i, i) * 5) + Vector3.new(1, 1, 1)
543
					Player.Character[Name].Source.Transparency = i
544
					wait()
545
				end
546
				Player.Character[Name].Source.Transparency = 1
547
				Player.Character[Name].Source.Fire.Enabled = false
548
			end))
549
			Player.Character[Name].Handle.Fire2.Looped = false
550
			Player.Character[Name].Handle.Fire2.Volume = 1
551
			Player.Character[Name].Handle.Fire2.Pitch = 1
552
			Player.Character[Name].Handle.Fire2:Play()
553
			power = power - 1
554
			local air = Instance.new("Part")
555
			air.Name = "Air"
556
			air.FormFactor = "Custom"
557
			air.Size = Vector3.new(1, 1, 2)
558
			air.TopSurface = "Smooth"
559
			air.BottomSurface = "Smooth"
560
			air.BrickColor = BrickColor.new("Institutional white")
561
			air.CanCollide = false
562
			air.Anchored = true
563
			air.Transparency = math.random(0, 5) / 10
564
			air.CFrame = CFrame.new(mouse.Hit.p + Vector3.new(math.random(-100, 100), math.random(-100, 100), math.random(-100, 100)), mouse.Hit.p)
565
			air.Parent = Workspace
566
			air:BreakJoints()
567
			local m = Instance.new("SpecialMesh")
568
			m.MeshType = "Sphere"
569
			m.Scale = Vector3.new(0.5, 0.5, 1)
570
			m.Parent = air
571
			coroutine.resume(coroutine.create(function()
572
				while air.Parent ~= nil do
573
					air.CFrame = CFrame.new(air.Position  + (air.CFrame.lookVector * 5)) * CFrame.fromEulerAnglesXYZ(air.CFrame:toEulerAnglesXYZ())
574
					for _, model in pairs(Workspace:GetChildren()) do
575
						if model.ClassName == "Part" then
576
							if (air.Position - model.Position).magnitude <= 5 and model.Anchored == false then
577
								model.Velocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
578
								if math.random(1, 10) == 1 then model:BreakJoints() end
579
								air:Remove()
580
								return
581
							end
582
						elseif model.ClassName == "Model" and model ~= Player.Character then
583
							for _, x in pairs(model:GetChildren()) do
584
								if x.ClassName == "Part" then
585
									if (air.Position - x.Position).magnitude <= 5 and x.Anchored == false then
586
										x.Velocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
587
										if math.random(1, 10) == 1 then x:BreakJoints() end
588
										if model:FindFirstChild("Humanoid") ~= nil then
589
											model.Humanoid:TakeDamage(5)
590
											model.Humanoid.Sit = true
591
										end
592
										air:Remove()
593
										return
594
									end
595
								end
596
							end
597
						end
598
					end
599
					local shock = Instance.new("Part")
600
					shock.FormFactor = "Custom"
601
					shock.Size = Vector3.new(1, 1, 1)
602
					shock.BrickColor = BrickColor.new("Institutional white")
603
					shock.Anchored = true
604
					shock.Name = "Shock Ring"
605
					shock.CanCollide = false
606
					shock.Parent = Workspace
607
					local mesh = Instance.new("SpecialMesh")
608
					mesh.MeshType = "FileMesh"
609
					mesh.MeshId = "http://www.roblox.com/Asset/?id=20329976"
610
					mesh.Scale = Vector3.new(1, 1, 1)
611
					mesh.Parent = shock
612
					shock.CFrame = CFrame.new(air.Position + (air.CFrame.lookVector * 10), air.Position + (air.CFrame.lookVector * 50)) * CFrame.fromEulerAnglesXYZ(math.rad(90), 0, 0)
613
					coroutine.resume(coroutine.create(function()
614
						for i = 0, 10 do
615
							shock.Mesh.Scale = Vector3.new(i / 5, i, i / 5)
616
							shock.Transparency = i / 10
617
							wait()
618
						end
619
						shock:Remove()
620
					end))
621
					wait()
622
				end
623
			end))
624
			coroutine.resume(coroutine.create(function(part)
625
				wait(10)
626
				part:Remove()
627
			end), air)
628
			wait()
629
		end
630
		canFire = true
631
	elseif spell == 2 then
632
		--Arefu Metoria, projectile class. Uses meteors.
633
		local position, target = mouse.Hit.p, mouse.Target
634
		if target == nil then return end
635
		if target.Parent == nil then return end
636
		canFire = false
637
		power = power - 50
638
		local offset = position - target.Position
639
		local size = math.random(10, 30)
640
		Player.Character[Name].Source.Mesh.MeshType = "Sphere"
641
		Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
642
		Player.Character[Name].Source.Transparency = 0
643
		Player.Character[Name].Source.BrickColor = BrickColor.new("Bright green")
644
		Player.Character[Name].Handle.Charge2.Looped = false
645
		Player.Character[Name].Handle.Charge2.Volume = 1
646
		Player.Character[Name].Handle.Charge2.Pitch = 0.35
647
		Player.Character[Name].Handle.Charge2:Play()
648
		local beam = Instance.new("Part")
649
		beam.BrickColor = BrickColor.new("Bright green")
650
		beam.TopSurface = 0
651
		beam.BottomSurface = 0
652
		beam.Size = Vector3.new(1, 1, 1)
653
		beam.Transparency = 0.5
654
		beam.Anchored = true
655
		beam.CanCollide = false
656
		beam.CFrame = CFrame.new(position)
657
		beam.Parent = Workspace
658
		local mesh = Instance.new("CylinderMesh")
659
		mesh.Parent = beam
660
		for i = 0, 60, 1 do
661
			local shine = Instance.new("Part")
662
			shine.Name = "Shine"
663
			shine.FormFactor = "Custom"
664
			shine.Shape = "Ball"
665
			shine.CanCollide = false
666
			shine.BrickColor = BrickColor.new("Bright green")
667
			shine.TopSurface = 0
668
			shine.BottomSurface = 0
669
			shine.Size = Vector3.new(1, 1, 1)
670
			shine.Transparency = 0.25
671
			shine.CFrame = CFrame.new(Player.Character[Name].Source.Position + Vector3.new(math.random(-5, 5), math.random(-5, 5), math.random(-5, 5)))
672
			shine.Parent = Workspace
673
			local force = Instance.new("BodyPosition")
674
			force.D = 7000
675
			force.P = 100000
676
			force.maxForce = Vector3.new(math.huge, math.huge, math.huge)
677
			force.position = Player.Character[Name].Source.Position
678
			force.Parent = shine
679
			coroutine.resume(coroutine.create(function(part1, part2) for i = 0, 10 do if part1 ~= nil and part2 ~= nil then part1.BodyPosition.position = part2.Position wait() end end part1:Remove() end), shine, Player.Character[Name].Source)
680
			mesh.Scale = Vector3.new(size * (i / 60), 10000, size * (i / 60))
681
			Player.Character[Name].Source.Mesh.Scale = Vector3.new(i / 10, i / 10, i / 10)
682
			Player.Character[Name].Source.Transparency = Player.Character[Name].Source.Transparency - 0.015
683
			wait()
684
		end
685
		for i = 0, 10 do
686
			beam.Transparency = beam.Transparency + 0.1
687
			Player.Character[Name].Source.Transparency = Player.Character[Name].Source.Transparency + 0.1
688
			wait()
689
		end
690
		if beam ~= nil then beam:Remove() end
691
		Player.Character[Name].Source.Transparency = 1
692
		canFire = true
693
		local meteor = Instance.new("Part")
694
		meteor.BrickColor = BrickColor.new("Bright red")
695
		meteor.Name = "Meteor"
696
		meteor.CanCollide = true
697
		meteor.Locked = true
698
		meteor.FormFactor = "Custom"
699
		meteor.Shape = "Ball"
700
		meteor.Size = Vector3.new(size, size, size)
701
		meteor.RotVelocity = Vector3.new(math.random(-1000, 1000), math.random(-1000, 1000), math.random(-1000, 1000))
702
		meteor.Parent = Workspace
703
		meteor:BreakJoints()
704
		local fire = Instance.new("Fire")
705
		fire.Heat = 0
706
		fire.Size = 50
707
		fire.Parent = meteor
708
		local smoke = Instance.new("Smoke")
709
		smoke.RiseVelocity = 0
710
		smoke.Size = size + 3
711
		smoke.Color = Color3.new(50 / 255, 50 / 255, 50 / 255)
712
		smoke.Opacity = 0.5
713
		smoke.Parent = meteor
714
		local mesh = Instance.new("SpecialMesh")
715
		mesh.MeshType = "FileMesh"
716
		mesh.MeshId = "http://www.roblox.com/Asset/?id=1290033"
717
		mesh.TextureId = "http://www.roblox.com/Asset/?id=1290030"
718
		mesh.Scale = meteor.Size / 1.5
719
		mesh.VertexColor = Vector3.new(1, 0, 0)
720
		mesh.Parent = meteor
721
		for i = 5000, 0, -100 do
722
			meteor.CFrame = CFrame.new((target.Position + offset) + Vector3.new(0, i, 0))
723
			meteor.Velocity = Vector3.new(0, 0, 0)
724
			wait()
725
		end
726
		meteor.CFrame = CFrame.new((target.Position + offset) + Vector3.new(0, size / 2, 0))
727
		delay(0.1, function() Weld(target, meteor) meteor.Velocity = Vector3.new(0, 0, 0) end)
728
		meteor.Anchored = true
729
		local s = Instance.new("Sound")
730
		s.SoundId = "rbxasset://sounds\\Launching rocket.wav"
731
		s.Pitch = (30 - size) / 25
732
		s.Parent = Workspace
733
		s:Play()
734
		local shards = {}
735
		for i = 0, math.random(10, 30) do
736
			local shard = Instance.new("Part")
737
			shard.Name = "Ground Shard"
738
			shard.Anchored = true
739
			shard.Locked = true
740
			shard.BrickColor = target.BrickColor
741
			shard.Size = Vector3.new(size + 10, 2, size)
742
			shard.CFrame = CFrame.new(meteor.Position - Vector3.new(0, size / 2, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(math.random(0, 360)), math.rad(math.random(0, 25)))
743
			shard.Parent = Workspace
744
			table.insert(shards, shard)
745
		end
746
		local new = Instance.new("Part")
747
		new.Name = "Meteor"
748
		new.Transparency = 1
749
		new.CanCollide = false
750
		new.Anchored = true
751
		new.CFrame = CFrame.new(meteor.Position)
752
		new.Parent = Workspace
753
		local fire = Instance.new("Fire")
754
		fire.Heat = 50
755
		fire.Size = 50
756
		fire.Parent = new
757
		meteor.Fire:Remove()
758
		local shock = Instance.new("Part")
759
		shock.FormFactor = "Custom"
760
		shock.Size = Vector3.new(1, 1, 1)
761
		shock.BrickColor = BrickColor.new("Institutional white")
762
		shock.Anchored = true
763
		shock.Name = "Shock Ring"
764
		shock.CanCollide = false
765
		shock.Parent = Workspace
766
		local mesh = Instance.new("SpecialMesh")
767
		mesh.MeshType = "FileMesh"
768
		mesh.MeshId = "http://www.roblox.com/Asset/?id=3270017"
769
		mesh.Parent = shock
770
		local tilt1 = math.random(-10, 10)
771
		local tilt2 = math.random(-10, 10)
772
		local tiltChance = math.random(1, 3)
773
		for i = 0, 50 do
774
			shock.Mesh.Scale = Vector3.new(i, i, i)
775
			if tiltChance == 1 then
776
				shock.CFrame = CFrame.new(meteor.Position - Vector3.new(0, meteor.Size.y / 3, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90 + tilt1), 0, 0)
777
			elseif tiltChance == 2 then
778
				shock.CFrame = CFrame.new(meteor.Position - Vector3.new(0, meteor.Size.y / 3, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90), math.rad(tilt2), 0)
779
			elseif tiltChance == 3 then
780
				shock.CFrame = CFrame.new(meteor.Position - Vector3.new(0, meteor.Size.y / 3, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90 + tilt1), math.rad(tilt2), 0)
781
			end
782
			wait()
783
		end
784
		for i = 0, 1, 0.1 do
785
			shock.Transparency = i
786
			wait()
787
		end
788
		shock:Remove()
789
		wait(math.random(1, 10))
790
		if new ~= nil then new:Remove() end
791
		if meteor == nil then return end
792
		local e = Instance.new("Explosion")
793
		e.BlastPressure = 100000
794
		e.Position = meteor.Position
795
		e.BlastRadius = meteor.Size.y * 2
796
		e.Parent = Workspace
797
		local s = Instance.new("Sound")
798
		s.Name = "Explosion"
799
		s.Pitch = (30 - size) / 20
800
		s.SoundId = "http://www.roblox.com/Asset/?id=2101148"
801
		s.Parent = Workspace
802
		s:Play()
803
		for i = 0, math.random(2, 10) do
804
			local size = math.random(1, 5)
805
			local new = meteor:Clone()
806
			if new:FindFirstChild("Weld") ~= nil then new.Weld:Remove() end
807
			new.Size = Vector3.new(size, size, size)
808
			new.Mesh.Scale = Vector3.new(size, size, size)
809
			new.CanCollide = false
810
			new.Anchored = false
811
			new.CFrame = CFrame.new(meteor.Position + Vector3.new(math.random(-meteor.Size.x / 2, meteor.Size.x / 2), math.random(-meteor.Size.y / 2, meteor.Size.y / 2), math.random(-meteor.Size.z / 2, meteor.Size.z / 2))) * CFrame.fromEulerAnglesXYZ(math.random(0, 360), math.random(0, 360), math.random(0, 360))
812
			new.Velocity = Vector3.new(math.random(-100, 100), math.random(10, 250), math.random(-100, 100))
813
			new.RotVelocity = Vector3.new(math.random(-500, 500), math.random(-500, 500), math.random(-500, 500))
814
			new.Smoke:Remove()
815
			new.Parent = Workspace
816
		end
817
		for i = 1, #shards do
818
			if shards[i] ~= nil then
819
				if math.random(1, 2) == 1 then
820
					shards[i]:Remove()
821
				else
822
					shards[i].CanCollide = false
823
					shards[i].Anchored = false
824
					shards[i].RotVelocity = Vector3.new(math.random(-500, 500), math.random(-500, 500), math.random(-500, 500))
825
					shards[i].Velocity = Vector3.new(math.random(-100, 100), math.random(10, 250), math.random(-100, 100))
826
				end
827
			end
828
		end
829
		meteor:Remove()
830
	elseif spell == 3 then
831
		--Eccrando Bolt, energy class. Fires a charged bolt of energy gathered in your wand.
832
		canFire = false
833
		Player.Character[Name].Source.Mesh.MeshType = "Sphere"
834
		Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
835
		Player.Character[Name].Source.Transparency = 0
836
		Player.Character[Name].Source.BrickColor = BrickColor.new("New Yeller")
837
		Player.Character[Name].Handle.Charge1.Looped = false
838
		Player.Character[Name].Handle.Charge1.Volume = 1
839
		Player.Character[Name].Handle.Charge1.Pitch = 1
840
		Player.Character[Name].Handle.Charge1:Play()
841
		for i = 0, 10 do
842
			local shine = Instance.new("Part")
843
			shine.Name = "Shine"
844
			shine.FormFactor = "Custom"
845
			shine.Shape = "Ball"
846
			shine.CanCollide = false
847
			shine.BrickColor = BrickColor.new("New Yeller")
848
			shine.TopSurface = 0
849
			shine.BottomSurface = 0
850
			shine.Size = Vector3.new(1, 1, 1)
851
			shine.Transparency = 0.25
852
			shine.CFrame = CFrame.new(Player.Character[Name].Source.Position + Vector3.new(math.random(-5, 5), math.random(-5, 5), math.random(-5, 5)))
853
			shine.Parent = Workspace
854
			local force = Instance.new("BodyPosition")
855
			force.D = 7000
856
			force.P = 100000
857
			force.maxForce = Vector3.new(math.huge, math.huge, math.huge)
858
			force.position = Player.Character[Name].Source.Position
859
			force.Parent = shine
860
			coroutine.resume(coroutine.create(function(part1, part2) for i = 0, 10 do if part1 ~= nil and part2 ~= nil then part1.BodyPosition.position = part2.Position wait() end end part1:Remove() end), shine, Player.Character[Name].Source)
861
			Player.Character[Name].Source.Mesh.Scale = Vector3.new(i / 7.5, i / 7.5, i / 7.5)
862
			wait()
863
			power = power - 1
864
		end
865
		for i = 10, 20 do
866
			Player.Character[Name].Source.Mesh.Scale = Vector3.new(i / 7.5, i / 7.5, i / 7.5)
867
			power = power - 1
868
			wait()
869
		end
870
		local first = true
871
		while Button1Down == true or first == true do
872
			first = false
873
			if power < 0 then break end
874
			power = power - 5
875
			if Player.Character == nil then break end
876
			if Player.Character:FindFirstChild("Humanoid") == nil then break end
877
			if Player.Character.Humanoid.Health <= 0 then break end
878
			if Player.Character:FindFirstChild(Name) == nil then break end
879
			if Player.Character[Name]:FindFirstChild("Handle") == nil then break end
880
			if Player.Character[Name]:FindFirstChild("Source") == nil then break end
881
			if selected == false then break end
882
			Player.Character[Name].Handle.Fire1.Looped = false
883
			Player.Character[Name].Handle.Fire1.Volume = 1
884
			Player.Character[Name].Handle.Fire1.Pitch = 1
885
			Player.Character[Name].Handle.Fire1:Play()
886
			local position = mouse.Hit.p
887
			local e = Instance.new("Explosion")
888
			e.BlastPressure = 500000
889
			e.BlastRadius = 10
890
			e.Position = position
891
			e.Parent = Workspace
892
			for i = 1, math.random(5, 25) do
893
				local shine = Instance.new("Part")
894
				shine.Name = "Shine"
895
				shine.FormFactor = "Custom"
896
				shine.Shape = "Block"
897
				shine.CanCollide = false
898
				shine.Anchored = true
899
				shine.BrickColor = BrickColor.new("New Yeller")
900
				shine.TopSurface = 0
901
				shine.BottomSurface = 0
902
				shine.Size = Vector3.new(1, 1, 1)
903
				shine.Transparency = 0.25
904
				shine.CFrame = CFrame.new(mouse.Hit.p)
905
				shine.Parent = Workspace
906
				local mesh = Instance.new("SpecialMesh")
907
				mesh.MeshType = "Brick"
908
				local random = math.random(3, 10) / 10
909
				mesh.Scale = Vector3.new(random, random, random)
910
				mesh.Parent = shine
911
				coroutine.resume(coroutine.create(function(part)
912
					for i = 0.25 * 25, 25 do
913
						part.Transparency = i / 25
914
						part.CFrame = CFrame.new(part.Position + Vector3.new(math.random(-10, 10) / 10, math.random(-10, 10) / 10, math.random(-10, 10) / 10)) * CFrame.fromEulerAnglesXYZ(math.rad(math.random(0, 360)), math.rad(math.random(0, 360)), math.rad(math.random(0, 360)))
915
						wait(math.random(1, 5) / 100)
916
					end
917
					part:Remove()
918
				end), shine)
919
			end
920
			for i = 1, math.random(2, 5) do
921
				local shine = Instance.new("Part")
922
				shine.Name = "Shine"
923
				shine.FormFactor = "Custom"
924
				shine.Shape = "Block"
925
				shine.CanCollide = false
926
				shine.Anchored = true
927
				shine.BrickColor = BrickColor.new("New Yeller")
928
				shine.TopSurface = 0
929
				shine.BottomSurface = 0
930
				shine.Size = Vector3.new(1, 1, 1)
931
				shine.Transparency = 0.25
932
				shine.CFrame = CFrame.new(mouse.Hit.p + Vector3.new(math.random(-10, 10) / 10, math.random(-10, 10) / 10, math.random(-10, 10) / 10))
933
				shine.Parent = Workspace
934
				local mesh = Instance.new("SpecialMesh")
935
				mesh.MeshType = "Sphere"
936
				local random = math.random(3, 10) / 10
937
				mesh.Scale = Vector3.new(random, random, random)
938
				mesh.Parent = shine
939
				coroutine.resume(coroutine.create(function(part)
940
					for i = 0.25, 1, 0.05 do
941
						part.Transparency = i
942
						part.Mesh.Scale = part.Mesh.Scale + Vector3.new(1, 1, 1)
943
						wait()
944
					end
945
					part:Remove()
946
				end), shine)
947
			end
948
			local trail = Instance.new("Part")
949
			trail.BrickColor = BrickColor.new("New Yeller")
950
			trail.TopSurface = 0
951
			trail.BottomSurface = 0
952
			trail.Size = Vector3.new(1, 1, 1)
953
			trail.Transparency = 0.4
954
			trail.Anchored = true
955
			trail.CanCollide = false
956
			trail.CFrame = CFrame.new((Player.Character[Name].Source.Position + position) / 2, position)
957
			trail.Parent = Workspace
958
			local mesh = Instance.new("SpecialMesh")
959
			mesh.MeshType = "Brick"
960
			mesh.Scale = Vector3.new(math.random(2, 5) / 10, math.random(2, 5) / 10, (position - Player.Character[Name].Source.Position).magnitude)
961
			mesh.Parent = trail
962
			coroutine.resume(coroutine.create(function(part) wait(0.1) for i = 1, 10 do part.Transparency = part.Transparency + 0.1 wait(0.1) end part:Remove() end), trail)
963
			coroutine.resume(coroutine.create(function()
964
				for i = 10, 0, -1 do
965
					Player.Character[Name].Source.Transparency = (10 - i) / 10
966
					Player.Character[Name].Source.Mesh.Scale = Vector3.new(i / 1.5, i / 1.5, i / 1.5)
967
					wait()
968
				end
969
			end))
970
			wait(0.3)
971
		end
972
		Player.Character[Name].Source.Transparency = 1
973
		canFire = true
974
	elseif spell == 4 then
975
		--Eccrando Strike, energy class. Use the clouds to your advantage and fire bolts of lightning at the ground.
976
		while Button1Down == true do
977
			if Player.Character == nil then break end
978
			if Player.Character:FindFirstChild("Humanoid") == nil then break end
979
			if Player.Character.Humanoid.Health <= 0 then break end
980
			if Player.Character:FindFirstChild(Name) == nil then break end
981
			if Player.Character[Name]:FindFirstChild("Handle") == nil then break end
982
			if Player.Character[Name]:FindFirstChild("Source") == nil then break end
983
			if selected == false then break end
984
			while power <= 25 and Button1Down == true do
985
				wait()
986
			end
987
			if power <= 0 then break end
988
			canFire = false
989
			Player.Character[Name].Source.Mesh.MeshType = "Sphere"
990
			Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
991
			Player.Character[Name].Source.Transparency = 0
992
			Player.Character[Name].Source.BrickColor = BrickColor.new("New Yeller")
993
			Player.Character[Name].Handle.Charge1.Looped = false
994
			Player.Character[Name].Handle.Charge1.Volume = 1
995
			Player.Character[Name].Handle.Charge1.Pitch = 0.4
996
			Player.Character[Name].Handle.Charge1:Play()
997
			for i = 0, 50 do
998
				local shine = Instance.new("Part")
999
				shine.Name = "Shine"
1000
				shine.FormFactor = "Custom"
1001
				shine.Shape = "Ball"
1002
				shine.CanCollide = false
1003
				shine.BrickColor = BrickColor.new("New Yeller")
1004
				shine.TopSurface = 0
1005
				shine.BottomSurface = 0
1006
				shine.Size = Vector3.new(1, 1, 1)
1007
				shine.Transparency = 0.25
1008
				shine.CFrame = CFrame.new(Player.Character[Name].Source.Position + Vector3.new(math.random(-5, 5), math.random(-5, 5), math.random(-5, 5)))
1009
				shine.Parent = Workspace
1010
				local force = Instance.new("BodyPosition")
1011
				force.D = 7000
1012
				force.P = 100000
1013
				force.maxForce = Vector3.new(math.huge, math.huge, math.huge)
1014
				force.position = Player.Character[Name].Source.Position
1015
				force.Parent = shine
1016
				coroutine.resume(coroutine.create(function(part1, part2) for i = 0, 10 do if part1 ~= nil and part2 ~= nil then part1.BodyPosition.position = part2.Position wait() end end part1:Remove() end), shine, Player.Character[Name].Source)
1017
				Player.Character[Name].Source.Mesh.Scale = Vector3.new(i / 7.5, i / 7.5, i / 7.5)
1018
				power = power - 1
1019
				wait()
1020
			end
1021
			power = power - 10
1022
			if math.random(1, 2) == 1 then id = "Thunder" else id = "Lightning" end
1023
			local s = Instance.new("Sound")
1024
			s.Volume = math.random(10, 50) / 10
1025
			s.SoundId = "rbxasset://sounds\\Halloween" ..id.. ".wav"
1026
			s.Pitch = math.random(9, 11) / 10
1027
			s.Parent = Workspace
1028
			s:Play()
1029
			if math.random(1, 2) == 1 then id = "Thunder" else id = "Lightning" end
1030
			local s = Instance.new("Sound")
1031
			s.Volume = math.random(1, 10) / 10
1032
			s.SoundId = "rbxasset://sounds\\Halloween" ..id.. ".wav"
1033
			s.Pitch = math.random(1, 30) / 10
1034
			s.Parent = Workspace
1035
			s:Play()
1036
			if selected == false then break end
1037
			local e = Instance.new("Explosion")
1038
			e.BlastPressure = 1000000
1039
			e.BlastRadius = 25
1040
			e.Position = mouse.Hit.p
1041
			e.Parent = Workspace
1042
			local pos = (mouse.Hit.p + Vector3.new(math.random(-100, 100), 1000, math.random(-100, 100)))
1043
			local trail = Instance.new("Part")
1044
			trail.BrickColor = BrickColor.new("New Yeller")
1045
			trail.TopSurface = 0
1046
			trail.BottomSurface = 0
1047
			trail.Size = Vector3.new(1, 1, 1)
1048
			trail.Transparency = 0.4
1049
			trail.Anchored = true
1050
			trail.CanCollide = false
1051
			trail.CFrame = CFrame.new((pos + mouse.Hit.p) / 2, mouse.Hit.p)
1052
			trail.Parent = Workspace
1053
			local mesh = Instance.new("SpecialMesh")
1054
			mesh.MeshType = "Brick"
1055
			mesh.Scale = Vector3.new(math.random(40, 50) / 10, math.random(40, 50) / 10, (mouse.Hit.p - pos).magnitude + 10)
1056
			mesh.Parent = trail
1057
			coroutine.resume(coroutine.create(function(part) wait(0.1) for i = 1, 10 do part.Transparency = part.Transparency + 0.1 wait(0.1) end part:Remove() end), trail)
1058
			for i = 10, 0, -1 do
1059
				Player.Character[Name].Source.Transparency = Player.Character[Name].Source.Transparency + 0.1
1060
				Player.Character[Name].Source.Mesh.Scale = Vector3.new(i / 1.5, i / 1.5, i / 1.5)
1061
				wait()
1062
			end
1063
			Player.Character[Name].Source.Transparency = 1
1064
			wait(0.1)
1065
			canFire = true
1066
		end
1067
	elseif spell == 5 then
1068
		--Thius Dae, health-based class. Seep life from your enemies to save yourself. Works as a general defense against multiple enemies.
1069
		canFire = false
1070
		Player.Character[Name].Source.Mesh.MeshType = "Brick"
1071
		Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
1072
		Player.Character[Name].Source.Transparency = 0.25
1073
		Player.Character[Name].Source.BrickColor = BrickColor.new("Really black")
1074
		Player.Character[Name].Handle.Charge4.Looped = true
1075
		Player.Character[Name].Handle.Charge4.Volume = 1
1076
		Player.Character[Name].Handle.Charge4.Pitch = 1
1077
		Player.Character[Name].Handle.Charge4:Play()
1078
		for i = 0, 10 do
1079
			Player.Character[Name].Source.Mesh.Scale = Player.Character[Name].Source.Mesh.Scale * 1.11
1080
			Player.Character[Name].Source.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(math.random(0, 360)), math.rad(math.random(0, 360)), math.rad(math.random(0, 360)))
1081
			wait()
1082
		end
1083
		for i = 0, math.huge, 0.1 do
1084
			if Button1Down == false then break end
1085
			if Player.Character == nil then break end
1086
			if Player.Character:FindFirstChild("Humanoid") == nil then break end
1087
			if Player.Character.Humanoid.Health <= 0 then break end
1088
			if Player.Character:FindFirstChild(Name) == nil then break end
1089
			if Player.Character[Name]:FindFirstChild("Handle") == nil then break end
1090
			if Player.Character[Name]:FindFirstChild("Source") == nil then break end
1091
			if power <= 0 then break end
1092
			local endstr = string.sub(tostring(i), string.len(tostring(i)), string.len(tostring(i)))
1093
			if endstr == "0" or endstr == "2" or endstr == "4" or endstr == "6" or endstr == "8" then
1094
				power = power - 1
1095
			end
1096
			Player.Character[Name].Source.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(math.random(0, 360)), math.rad(math.random(0, 360)), math.rad(math.random(0, 360)))
1097
			Player.Character[Name].Source.Mesh.Scale = Vector3.new(math.sin(i) + 3, math.sin(i) + 3, math.sin(i) + 3)
1098
			local shine = Instance.new("Part")
1099
			shine.Name = "Shine"
1100
			shine.FormFactor = "Custom"
1101
			shine.Shape = "Block"
1102
			shine.CanCollide = false
1103
			shine.Anchored = true
1104
			shine.BrickColor = BrickColor.new("Really black")
1105
			shine.TopSurface = 0
1106
			shine.BottomSurface = 0
1107
			shine.Size = Vector3.new(1, 1, 1)
1108
			shine.Transparency = 0.25
1109
			shine.CFrame = CFrame.new(Player.Character[Name].Source.Position)
1110
			shine.Parent = Workspace
1111
			local mesh = Instance.new("SpecialMesh")
1112
			mesh.MeshType = "Brick"
1113
			local random = math.random(3, 10) / 10
1114
			mesh.Scale = Vector3.new(random, random, random)
1115
			mesh.Parent = shine
1116
			coroutine.resume(coroutine.create(function(part)
1117
				for i = 0.25 * 25, 25 do
1118
					part.Transparency = i / 25
1119
					part.CFrame = CFrame.new(part.Position + Vector3.new(math.random(-10, 10) / 10, math.random(-10, 10) / 10, math.random(-10, 10) / 10)) * CFrame.fromEulerAnglesXYZ(math.rad(math.random(0, 360)), math.rad(math.random(0, 360)), math.rad(math.random(0, 360)))
1120
					wait(math.random(1, 5) / 100)
1121
				end
1122
				part:Remove()
1123
			end), shine)
1124
			for _, model in pairs(Workspace:GetChildren()) do
1125
				if model ~= Player.Character then
1126
					if model:FindFirstChild("Torso") ~= nil and model:FindFirstChild("Humanoid") ~= nil then
1127
						if (Player.Character.Torso.Position - model.Torso.Position).magnitude <= 25 then
1128
							local trail = Instance.new("Part")
1129
							trail.BrickColor = BrickColor.new("Really black")
1130
							trail.TopSurface = 0
1131
							trail.BottomSurface = 0
1132
							trail.Size = Vector3.new(1, 1, 1)
1133
							trail.Transparency = 0.4
1134
							trail.Anchored = true
1135
							trail.CanCollide = false
1136
							trail.CFrame = CFrame.new((Player.Character[Name].Source.Position + model.Torso.Position) / 2, model.Torso.Position)
1137
							trail.Parent = Workspace
1138
							local mesh = Instance.new("SpecialMesh")
1139
							mesh.MeshType = "Brick"
1140
							mesh.Scale = Vector3.new(math.random(2, 5) / 10, math.random(2, 5) / 10, (model.Torso.Position - Player.Character[Name].Source.Position).magnitude)
1141
							mesh.Parent = trail
1142
							coroutine.resume(coroutine.create(function(part) wait() part:Remove() end), trail)
1143
							if model.Humanoid.Health > 0 then
1144
								model.Humanoid:TakeDamage(1.25)
1145
								Player.Character.Humanoid.Health = Player.Character.Humanoid.Health + (1.25 / 2)
1146
							elseif model.Humanoid.Health <= 0 then
1147
								model.Humanoid.Health = 0
1148
								model.Humanoid.Name = "HumanoidAbsorbed"
1149
								for _, part in pairs(model:GetChildren()) do
1150
									if part.ClassName == "Part" then
1151
										local position = Instance.new("BodyPosition")
1152
										position.Name = "Thius Dae"
1153
										position.maxForce = Vector3.new(math.huge, math.huge, math.huge)
1154
										position.P = 1000
1155
										position.D = 50
1156
										position.Parent = part
1157
										position.position = Player.Character[Name].Source.Position
1158
										coroutine.resume(coroutine.create(function() while position.Parent ~= nil do position.position = Player.Character[Name].Source.Position part.CanCollide = false wait() end end))
1159
										coroutine.resume(coroutine.create(function() wait(3.5) position:Remove() end))
1160
									end
1161
								end
1162
								Player.Character.Humanoid.Health = Player.Character.Humanoid.Health + 5
1163
								power = power + 25
1164
								Player.Character[Name].Handle.Fire4.Looped = false
1165
								Player.Character[Name].Handle.Fire4.Volume = 1
1166
								Player.Character[Name].Handle.Fire4.Pitch = 1
1167
								Player.Character[Name].Handle.Fire4:Play()
1168
							end
1169
						end
1170
					end
1171
				end
1172
			end
1173
			wait()
1174
		end
1175
		for i = 0, 25 do
1176
			Player.Character[Name].Source.Mesh.Scale = Player.Character[Name].Source.Mesh.Scale / 1.15
1177
			Player.Character[Name].Source.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(math.random(0, 360)), math.rad(math.random(0, 360)), math.rad(math.random(0, 360)))
1178
			Player.Character[Name].Handle.Charge4.Volume = (25 - i) / 25
1179
			wait()
1180
		end
1181
		Player.Character[Name].Handle.Charge4:Stop()
1182
		Player.Character[Name].Source.Transparency = 1
1183
		Player.Character[Name].Source.Weld.C0 = CFrame.new()
1184
		canFire = true
1185
	elseif spell == 6 then
1186
		--Thius Heed, health-based class. Heal people around you and sheild them.
1187
		canFire = false
1188
		Player.Character[Name].Source.Mesh.MeshType = "Sphere"
1189
		Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
1190
		Player.Character[Name].Source.Transparency = 0.25
1191
		Player.Character[Name].Source.BrickColor = BrickColor.new("Institutional white")
1192
		Player.Character[Name].Source.Fire.Enabled = true
1193
		Player.Character[Name].Source.Fire.Heat = 10
1194
		Player.Character[Name].Source.Fire.Size = 1
1195
		Player.Character[Name].Source.Fire.Color = Color3.new(1, 1, 1)
1196
		Player.Character[Name].Source.Fire.SecondaryColor = Color3.new(1, 1, 1)
1197
		Player.Character[Name].Handle.Shine.Looped = true
1198
		Player.Character[Name].Handle.Shine.Volume = 1
1199
		Player.Character[Name].Handle.Shine.Pitch = 1
1200
		Player.Character[Name].Handle.Shine:Play()
1201
		for i = 0, 5 do
1202
			Player.Character[Name].Source.Mesh.Scale = Player.Character[Name].Source.Mesh.Scale * 1.2
1203
			Player.Character[Name].Source.Fire.Size = Player.Character[Name].Source.Fire.Size * 1.2
1204
			wait()
1205
		end
1206
		local heed = Instance.new("ForceField")
1207
		heed.Name = "HeedShield"
1208
		for i = 0, math.huge, 0.1 do
1209
			if Button1Down == false then break end
1210
			if Player.Character == nil then break end
1211
			if Player.Character:FindFirstChild("Humanoid") == nil then break end
1212
			if Player.Character.Humanoid.Health <= 0 then break end
1213
			if Player.Character:FindFirstChild(Name) == nil then break end
1214
			if Player.Character[Name]:FindFirstChild("Handle") == nil then break end
1215
			if Player.Character[Name]:FindFirstChild("Source") == nil then break end
1216
			if power <= 0 then break end
1217
			local endstr = string.sub(tostring(i), string.len(tostring(i)), string.len(tostring(i)))
1218
			if endstr == "0" or endstr == "2" or endstr == "4" or endstr == "6" or endstr == "8" then
1219
				power = power - 1
1220
			end
1221
			Player.Character[Name].Source.Mesh.Scale = Vector3.new(math.sin(i) + 3, math.sin(i) + 3, math.sin(i) + 3)
1222
			Player.Character[Name].Source.Fire.Size = math.sin(i) + 10
1223
			Player.Character[Name].Source.Fire.Heat = math.sin(i) + 10
1224
			for _, model in pairs(Workspace:GetChildren()) do
1225
				if model:FindFirstChild("Torso") ~= nil and model:FindFirstChild("Humanoid") ~= nil then
1226
					if (Player.Character.Torso.Position - model.Torso.Position).magnitude <= 25 then
1227
						local trail = Instance.new("Part")
1228
						trail.BrickColor = BrickColor.new("Institutional white")
1229
						trail.TopSurface = 0
1230
						trail.BottomSurface = 0
1231
						trail.Size = Vector3.new(1, 1, 1)
1232
						trail.Transparency = 0.4
1233
						trail.Anchored = true
1234
						trail.CanCollide = false
1235
						trail.CFrame = CFrame.new((Player.Character[Name].Source.Position + model.Torso.Position) / 2, model.Torso.Position)
1236
						trail.Parent = Workspace
1237
						local mesh = Instance.new("SpecialMesh")
1238
						mesh.MeshType = "Brick"
1239
						mesh.Scale = Vector3.new(math.random(2, 5) / 10, math.random(2, 5) / 10, (model.Torso.Position - Player.Character[Name].Source.Position).magnitude)
1240
						mesh.Parent = trail
1241
						coroutine.resume(coroutine.create(function(part) wait() part:Remove() end), trail)
1242
						model.Humanoid.Health = model.Humanoid.Health + 1.25
1243
						heed:Clone().Parent = model
1244
						coroutine.resume(coroutine.create(function(part) wait() part:Remove() end), model.HeedShield)
1245
					end
1246
				end
1247
			end
1248
			wait()
1249
		end
1250
		for i = 0, 25 do
1251
			Player.Character[Name].Source.Mesh.Scale = Player.Character[Name].Source.Mesh.Scale / 1.15
1252
			Player.Character[Name].Source.Fire.Size = Player.Character[Name].Source.Fire.Size / 1.15
1253
			Player.Character[Name].Source.Fire.Heat = Player.Character[Name].Source.Fire.Heat / 1.15
1254
			Player.Character[Name].Handle.Shine.Volume = (25 - i) / 25
1255
			wait()
1256
		end
1257
		Player.Character[Name].Handle.Shine:Stop()
1258
		Player.Character[Name].Source.Transparency = 1
1259
		Player.Character[Name].Source.Fire.Enabled = false
1260
		canFire = true
1261
	elseif spell == 7 then
1262
		--Combuscus Phore, fire/explosives class. A small explosion with a bit of magic makes to be a spectacular performance.
1263
		canFire = false
1264
		Player.Character[Name].Source.Mesh.MeshType = "Sphere"
1265
		Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
1266
		Player.Character[Name].Source.Transparency = 0.25
1267
		Player.Character[Name].Source.BrickColor = BrickColor.new("Really red")
1268
		Player.Character[Name].Source.Fire.Enabled = true
1269
		Player.Character[Name].Source.Fire.Heat = 10
1270
		Player.Character[Name].Source.Fire.Size = 10
1271
		Player.Character[Name].Source.Fire.Color = Color3.new(1, 0, 0)
1272
		Player.Character[Name].Source.Fire.SecondaryColor = Color3.new(1, 1, 1)
1273
		Player.Character[Name].Handle.Bolt.Looped = false
1274
		Player.Character[Name].Handle.Bolt.Volume = 1
1275
		Player.Character[Name].Handle.Bolt.Pitch = 1.5
1276
		Player.Character[Name].Handle.Bolt:Play()
1277
		power = power - 75
1278
		local shock = Instance.new("Part")
1279
		shock.FormFactor = "Custom"
1280
		shock.Size = Vector3.new(1, 1, 1)
1281
		shock.BrickColor = BrickColor.new("Really red")
1282
		shock.Anchored = true
1283
		shock.Name = "Shock Ring"
1284
		shock.CanCollide = false
1285
		shock.Parent = Workspace
1286
		local mesh = Instance.new("SpecialMesh")
1287
		mesh.MeshType = "FileMesh"
1288
		mesh.MeshId = "http://www.roblox.com/Asset/?id=3270017"
1289
		mesh.Parent = shock
1290
		local tilt1 = math.random(-10, 10)
1291
		local tilt2 = math.random(-10, 10)
1292
		local tiltChance = math.random(1, 3)
1293
		for i = 0, 25 do
1294
			Player.Character[Name].Handle.Bolt.Pitch = Player.Character[Name].Handle.Bolt.Pitch - 0.1
1295
			shock.Mesh.Scale =  Vector3.new(i, i, i) * (25 - i)
1296
			if tiltChance == 1 then
1297
				shock.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90 + tilt1), 0, 0)
1298
			elseif tiltChance == 2 then
1299
				shock.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90), math.rad(tilt2), 0)
1300
			elseif tiltChance == 3 then
1301
				shock.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90 + tilt1), math.rad(tilt2), 0)
1302
			end
1303
			Player.Character[Name].Source.Mesh.Scale = (Vector3.new(i, i, i) / 5) * (25 - i)
1304
			Player.Character[Name].Source.Fire.Size = (i / 5) * (25 - i)
1305
			Player.Character[Name].Source.Fire.Heat = (i / 5) * (25 - i)
1306
			for _, model in pairs(Workspace:GetChildren()) do
1307
				if model.ClassName == "Part" then
1308
					if (Player.Character.Torso.Position - model.Position).magnitude <= (i * (25 - i)) / 2 and model.Anchored == false then
1309
						model.Velocity = ((model.Position - Player.Character.Torso.Position) * (math.sin(i / 4) * 10)) + Vector3.new(0, 25, 0)
1310
						if math.random(1, 10) == 1 then model:BreakJoints() end
1311
					end
1312
				elseif model.ClassName == "Model" and model ~= Player.Character then
1313
					for _, x in pairs(model:GetChildren()) do
1314
						if x.ClassName == "Part" then
1315
							if (Player.Character.Torso.Position - x.Position).magnitude <= (i * (25 - i)) / 2 and x.Anchored == false then
1316
								x.Velocity = ((x.Position - Player.Character.Torso.Position) * (math.sin(i / 4) * 10)) + Vector3.new(0, 25, 0)
1317
								if math.random(1, 10) == 1 then x:BreakJoints() end
1318
								if model:FindFirstChild("Humanoid") ~= nil then
1319
									model.Humanoid:TakeDamage(10)
1320
									model.Humanoid.Sit = true
1321
								end
1322
							end
1323
						end
1324
					end
1325
				end
1326
			end
1327
			wait(0.03)
1328
		end
1329
		shock:Remove()
1330
		Player.Character[Name].Source.Transparency = 1
1331
		Player.Character[Name].Source.Fire.Enabled = false
1332
		canFire = true
1333
	elseif spell == 8 then
1334
		--Combuscus Burn, fire/explosives class. Basically, light things on fire.
1335
		canFire = false
1336
		Player.Character[Name].Source.Mesh.MeshType = "Sphere"
1337
		Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
1338
		Player.Character[Name].Source.BrickColor = BrickColor.new("Really red")
1339
		Player.Character[Name].Handle.Fire3.Looped = false
1340
		Player.Character[Name].Handle.Fire3.Volume = 1
1341
		Player.Character[Name].Handle.Fire3.Pitch = 1
1342
		Player.Character[Name].Handle.Fire3:Play()
1343
		Player.Character[Name].Handle.Fire4.Looped = false
1344
		Player.Character[Name].Handle.Fire4.Volume = 1
1345
		Player.Character[Name].Handle.Fire4.Pitch = 1
1346
		Player.Character[Name].Handle.Fire4:Play()
1347
		coroutine.resume(coroutine.create(function()
1348
			for i = 0, 1, 0.1 do
1349
				Player.Character[Name].Source.Mesh.Scale = (Vector3.new(i, i, i) * 5) + Vector3.new(1, 1, 1)
1350
				Player.Character[Name].Source.Transparency = i
1351
			wait()
1352
			end
1353
			Player.Character[Name].Source.Transparency = 1
1354
		end))
1355
		if mouse.Target == nil then return end
1356
		if mouse.Target.Parent == nil then return end
1357
		local function SetFire(target, offset)
1358
			if target == nil then return end
1359
			if offset == nil then offset = Vector3.new(0, 0, 0) end
1360
			if target:GetMass() > 3500 then return end
1361
			if target.Name == "CombuscusBurnFire" then return end
1362
			if target:FindFirstChild("CombuscusBurnFire") ~= nil then return end
1363
			if target:FindFirstChild("ForceField") ~= nil then return end
1364
			if target.Parent == nil then return end
1365
			if target.Parent:FindFirstChild("ForceField") ~= nil then return end
1366
			if target.Parent:FindFirstChild("HeedShield") ~= nil then return end
1367
			local check = Instance.new("Model")
1368
			check.Name = "CombuscusBurnFire"
1369
			check.Parent = target
1370
			delay(math.random(0.1, 2), function() if target ~= nil then target.Touched:connect(function(hit) if target:FindFirstChild("CombuscusBurnFire") ~= nil then SetFire(hit) end end) end end)
1371
			local part = Instance.new("Part")
1372
			part.Name = "CombuscusBurnFire"
1373
			part.CanCollide = false
1374
			part.Anchored = true
1375
			Part.FormFactor = "Custom"
1376
			part.Size = Vector3.new(1, 1, 1)
1377
			part.TopSurface = 0
1378
			part.BottomSurface = 0
1379
			part.Transparency = 1
1380
			part.Parent = Workspace
1381
			local fire = Instance.new("Fire")
1382
			fire.Color = Color3.new(1, math.random(10, 30) / 100, 0)
1383
			fire.SecondaryColor = Color3.new(1, 1, 1)
1384
			fire.Size = math.random(4, 15)
1385
			fire.Heat = fire.Size + 3
1386
			fire.Parent = part
1387
			local smoke = Instance.new("Smoke")
1388
			smoke.Color = Color3.new(0.5, 0.5, 0.5)
1389
			smoke.Size = fire.Size + 3
1390
			smoke.RiseVelocity = fire.Heat / 5
1391
			smoke.Opacity = math.random(1, 15) / 100
1392
			smoke.Parent = part
1393
			local sound = Instance.new("Sound")
1394
			sound.SoundId = "http://www.roblox.com/Asset/?id=31760113"
1395
			sound.Volume = 1
1396
			sound.Pitch = 1
1397
			sound.Looped = true
1398
			sound.Parent = part
1399
			sound:Play()
1400
			coroutine.resume(coroutine.create(function()
1401
				for i = 1, math.random(100, 1000) do
1402
					if part.Parent == nil then break end
1403
					if target.Parent == nil then break end
1404
					if target.Parent.Parent == nil then break end
1405
					if target:FindFirstChild("CombuscusBurnFire") == nil then break end
1406
					if Player.Character == nil then break end
1407
					if Player.Character:FindFirstChild("Humanoid") == nil then break end
1408
					if Player.Character.Humanoid.Health <= 0 then break end
1409
					part.CFrame = CFrame.new(target.Position + offset)
1410
					if target.Parent:FindFirstChild("Humanoid") ~= nil then
1411
						target.Parent.Humanoid:TakeDamage(0.25)
1412
					end
1413
					if math.random(1, 100) == 1 then target:BreakJoints() end
1414
					if math.random(1, 25) == 1 and target.Anchored == false then target.BrickColor = BrickColor.new("Really black") end
1415
					if math.random(1, 50) == 1 and target.Anchored == false then target.Velocity = target.Velocity + Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)) end
1416
					wait()
1417
				end
1418
				for i = 1, 0, -0.05 do
1419
					sound.Volume = i
1420
					fire.Size = fire.Size / 1.025
1421
					fire.Heat = fire.Heat / 1.01
1422
					fire.Color = Color3.new(1 * i, 0.25 * i, 0)
1423
					fire.SecondaryColor = Color3.new(1 * i, 1 * i, 1 * i)
1424
					smoke.Size = smoke.Size / 1.05
1425
					smoke.RiseVelocity = smoke.RiseVelocity / 1.05
1426
					smoke.Opacity = smoke.Opacity / 1.05
1427
					wait()
1428
				end
1429
				sound:Stop()
1430
				fire.Enabled = false
1431
				smoke.Enabled = false
1432
				if target ~= nil then if target:FindFirstChild("CombuscusBurnFire") ~= nil then target.CombuscusBurnFire:Remove() end end
1433
				wait(3)
1434
				part:Remove()
1435
			end))
1436
		end
1437
		pcall(function() SetFire(mouse.Target, mouse.Hit.p - mouse.Target.Position) end)
1438
		canFire = true
1439
	elseif spell == 9 then
1440
		--Combuscus Vortex, fire/explosives class. A tornado in a can.
1441
		canFire = false
1442
		Player.Character[Name].Source.Mesh.MeshType = "Sphere"
1443
		Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
1444
		Player.Character[Name].Source.Transparency = 0.25
1445
		Player.Character[Name].Source.BrickColor = BrickColor.new("Really red")
1446
		Player.Character[Name].Source.Fire.Enabled = true
1447
		Player.Character[Name].Source.Fire.Heat = 10
1448
		Player.Character[Name].Source.Fire.Size = 10
1449
		Player.Character[Name].Source.Fire.Color = Color3.new(1, 0, 0)
1450
		Player.Character[Name].Source.Fire.SecondaryColor = Color3.new(1, 1, 1)
1451
		Player.Character[Name].Handle.Charge2.Looped = false
1452
		Player.Character[Name].Handle.Charge2.Volume = 1
1453
		Player.Character[Name].Handle.Charge2.Pitch = 0.125
1454
		Player.Character[Name].Handle.Charge2:Play()
1455
		power = power - 50
1456
		for i = 0, 75 do
1457
			if math.random(1, 3) == 1 then
1458
				local shock = Instance.new("Part")
1459
				shock.FormFactor = "Custom"
1460
				shock.Size = Vector3.new(1, 1, 1)
1461
				shock.BrickColor = BrickColor.new("Really red")
1462
				shock.Anchored = true
1463
				shock.Name = "Shock Ring"
1464
				shock.CanCollide = false
1465
				shock.Parent = Workspace
1466
				local mesh = Instance.new("SpecialMesh")
1467
				mesh.MeshType = "FileMesh"
1468
				mesh.MeshId = "http://www.roblox.com/Asset/?id=3270017"
1469
				mesh.Parent = shock
1470
				coroutine.resume(coroutine.create(function()
1471
					local tilt1 = math.random(-10, 10)
1472
					local tilt2 = math.random(-10, 10)
1473
					local tiltChance = math.random(1, 3)
1474
					local randomSize = math.random(-10, 10)
1475
					for x = 1, 25 do
1476
						shock.Mesh.Scale = Vector3.new(5 + x, 5 + x, 5 + (x / 5)) + Vector3.new(randomSize, randomSize, randomSize)
1477
						if tiltChance == 1 then
1478
							shock.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0) + Vector3.new(0, x, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90 + (tilt1 / (25 - x))), 0, 0)
1479
						elseif tiltChance == 2 then
1480
							shock.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0) + Vector3.new(0, x, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90), math.rad(tilt2 / (25 - x)), 0)
1481
						elseif tiltChance == 3 then
1482
							shock.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0) + Vector3.new(0, x, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90 + (tilt1 / (25 - x))), math.rad(tilt2 / (25 - x)), 0)
1483
						end
1484
						wait()
1485
					end
1486
				end))
1487
			end
1488
			Player.Character[Name].Source.Mesh.Scale = Vector3.new(i, i, i) / 5
1489
			Player.Character[Name].Source.Fire.Size = i / 5
1490
			Player.Character[Name].Source.Fire.Heat = i / 5
1491
			for _, model in pairs(Workspace:GetChildren()) do
1492
				if model.ClassName == "Part" then
1493
					if (Player.Character.Torso.Position - model.Position).magnitude <= 50 and model.Anchored == false then
1494
						model.CanCollide = false
1495
						model.Transparency = 0.5
1496
						local Position = Instance.new("BodyPosition")
1497
						Position.maxForce = Vector3.new(math.huge, math.huge, math.huge)
1498
						Position.P = 100
1499
						Position.D = 10
1500
						Position.position = Player.Character.Torso.Position + Vector3.new(math.sin(i / (math.random(500, 750) / 100)) * (i / 2) + 4, (i / (math.random(800, 1200) / 100)) + 5, math.cos(i / (math.random(500, 750) / 100)) * (i / 2) + 4)
1501
						Position.Parent = model
1502
						coroutine.resume(coroutine.create(function() wait(0.1) Position:Remove() end))
1503
						if math.random(1, 10) == 1 then model:BreakJoints() end
1504
					end
1505
				elseif model.ClassName == "Model" and model ~= Player.Character then
1506
					for _, x in pairs(model:GetChildren()) do
1507
						if x.ClassName == "Part" then
1508
							if (Player.Character.Torso.Position - x.Position).magnitude <= 50 and x.Anchored == false then
1509
								x.CanCollide = false
1510
								local Position = Instance.new("BodyPosition")
1511
								Position.maxForce = Vector3.new(math.huge, math.huge, math.huge)
1512
								Position.P = 500
1513
								Position.D = 10
1514
								Position.position = Player.Character.Torso.Position + Vector3.new(math.sin(i / (math.random(500, 750) / 100)) * (i / 2) + 4, (i / (math.random(800, 1200) / 100)) + 7.5, math.cos(i / (math.random(500, 750) / 100)) * (i / 2) + 4)
1515
								Position.Parent = x
1516
								coroutine.resume(coroutine.create(function() wait(0.1) Position:Remove() end))
1517
								if math.random(1, 10) == 1 then x:BreakJoints() end
1518
								if model:FindFirstChild("Humanoid") ~= nil then
1519
									model.Humanoid:TakeDamage(10)
1520
									model.Humanoid.Sit = true
1521
								end
1522
							end
1523
						end
1524
					end
1525
				end
1526
			end
1527
			wait(0.03)
1528
		end
1529
		Player.Character[Name].Handle.Fire2.Looped = false
1530
		Player.Character[Name].Handle.Fire2.Volume = 1
1531
		Player.Character[Name].Handle.Fire2.Pitch = 0.3
1532
		Player.Character[Name].Handle.Fire2:Play()
1533
		Player.Character[Name].Source.Fire.Enabled = false
1534
		for i = 0.25, 1, 0.05 do
1535
			Player.Character[Name].Source.Transparency = i
1536
			wait()
1537
		end
1538
		Player.Character[Name].Source.Transparency = 1
1539
		canFire = true
1540
	elseif spell == 10 then
1541
		--Combuscus Phore Nexus, fire/explosives class. Basically the outcome is similar to that of a nuclear warhead.
1542
		canFire = false
1543
		Player.Character[Name].Source.Mesh.MeshType = "Sphere"
1544
		Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
1545
		Player.Character[Name].Source.Transparency = 0.25
1546
		Player.Character[Name].Source.BrickColor = BrickColor.new("Really red")
1547
		Player.Character[Name].Source.Fire.Enabled = true
1548
		Player.Character[Name].Source.Fire.Heat = 10
1549
		Player.Character[Name].Source.Fire.Size = 10
1550
		Player.Character[Name].Source.Fire.Color = Color3.new(1, 0, 0)
1551
		Player.Character[Name].Source.Fire.SecondaryColor = Color3.new(1, 1, 1)
1552
		Player.Character[Name].Handle.Fire1.Looped = false
1553
		Player.Character[Name].Handle.Fire1.Volume = 1
1554
		Player.Character[Name].Handle.Fire1.Pitch = math.random(3, 6) / 10
1555
		local new = Player.Character[Name].Handle.Fire1:Clone()
1556
		new.Parent = Workspace
1557
		new:Play()
1558
		Player.Character[Name].Handle.Charge3.Looped = false
1559
		Player.Character[Name].Handle.Charge3.Volume = 1
1560
		Player.Character[Name].Handle.Charge3.Pitch = math.random(15, 20) / 10
1561
		local new = Player.Character[Name].Handle.Charge3:Clone()
1562
		new.Parent = Workspace
1563
		new:Play()
1564
		Player.Character[Name].Handle.Fire4.Looped = false
1565
		Player.Character[Name].Handle.Fire4.Volume = 1
1566
		Player.Character[Name].Handle.Fire4.Pitch = math.random(2, 4) / 10
1567
		local new = Player.Character[Name].Handle.Fire4:Clone()
1568
		new.Parent = Workspace
1569
		new:Play()
1570
		power = power - 100
1571
		local shock = Instance.new("Part")
1572
		shock.FormFactor = "Custom"
1573
		shock.Size = Vector3.new(1, 1, 1)
1574
		shock.BrickColor = BrickColor.new("Really red")
1575
		shock.Anchored = true
1576
		shock.Name = "Shock Ring"
1577
		shock.CanCollide = false
1578
		shock.Parent = Workspace
1579
		local mesh = Instance.new("SpecialMesh")
1580
		mesh.MeshType = "FileMesh"
1581
		mesh.MeshId = "http://www.roblox.com/Asset/?id=3270017"
1582
		mesh.Parent = shock
1583
		local shock2 = shock:Clone()
1584
		shock2.Parent = Workspace
1585
		local shock3 = shock:Clone()
1586
		shock3.Parent = Workspace
1587
		local shockAngle = CFrame.fromEulerAnglesXYZ(math.rad(90 + math.random(-5, 5)), math.rad(math.random(-5, 5)), math.rad(math.random(-5, 5)))
1588
		local shock2Angle = CFrame.fromEulerAnglesXYZ(math.rad(90 + math.random(-5, 5)), math.rad(math.random(-5, 5)), math.rad(math.random(-5, 5)))
1589
		local shock3Angle = CFrame.fromEulerAnglesXYZ(math.rad(90 + math.random(-5, 5)), math.rad(math.random(-5, 5)), math.rad(math.random(-5, 5)))
1590
		local shock2Size = math.random(2, 3)
1591
		local shock3Size = math.random(4, 6)
1592
		for i = 0, 500, 10 do
1593
			if string.sub(tostring(i), string.len(tostring(i)), string.len(tostring(i))) == "0" then
1594
				local shock4 = Instance.new("Part")
1595
				shock4.FormFactor = "Custom"
1596
				shock4.Size = Vector3.new(1, 1, 1)
1597
				shock4.BrickColor = BrickColor.new("Really red")
1598
				shock4.Anchored = true
1599
				shock4.Name = "Shock Ring"
1600
				shock4.CanCollide = false
1601
				shock4.Parent = Workspace
1602
				shock4.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 2, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(math.random(-25, 25)), math.rad(math.random(-25, 25)), math.rad(math.random(-25, 25)))
1603
				local mesh = Instance.new("SpecialMesh")
1604
				mesh.MeshType = "FileMesh"
1605
				mesh.MeshId = "http://www.roblox.com/Asset/?id=20329976"
1606
				mesh.Parent = shock4
1607
				coroutine.resume(coroutine.create(function(part)
1608
					for i = 0, 1, 0.05 do
1609
						part.Transparency = i
1610
						part.Mesh.Scale = Vector3.new(i * 25, i * 25, i * 25)
1611
						wait()
1612
					end
1613
					part:Remove()
1614
				end), shock4)
1615
			end
1616
			shock.Transparency = i / 500
1617
			shock2.Transparency = i / 500
1618
			shock3.Transparency = i / 500
1619
			Player.Character[Name].Source.Transparency = i / 250
1620
			shock.Mesh.Scale = Vector3.new(i, i, i)
1621
			shock2.Mesh.Scale = Vector3.new(i, i, i) / shock2Size
1622
			shock3.Mesh.Scale = Vector3.new(i, i, i) / shock3Size
1623
			shock.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0)) * shockAngle
1624
			shock2.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0)) * shock2Angle
1625
			shock3.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0)) * shock3Angle
1626
			Player.Character[Name].Source.Mesh.Scale = (Vector3.new(i, i, i) / 15)
1627
			Player.Character[Name].Source.Fire.Size = (i / 15)
1628
			Player.Character[Name].Source.Fire.Heat = (i / 15)
1629
			for _, model in pairs(Workspace:GetChildren()) do
1630
				if model.ClassName == "Part" then
1631
					if (Player.Character.Torso.Position - model.Position).magnitude <= i / 2 and model.Anchored == false then
1632
						model.Velocity = (model.Position - Player.Character.Torso.Position) * 10 + Vector3.new(0, 25, 0)
1633
						if math.random(1, 10) == 1 then model:BreakJoints() end
1634
					end
1635
				elseif model.ClassName == "Model" and model ~= Player.Character then
1636
					for _, x in pairs(model:GetChildren()) do
1637
						if x.ClassName == "Part" then
1638
							if (Player.Character.Torso.Position - x.Position).magnitude <= i / 2 and x.Anchored == false then
1639
								x.Velocity = (x.Position - Player.Character.Torso.Position) * 10 + Vector3.new(0, 25, 0)
1640
								if math.random(1, 10) == 1 then x:BreakJoints() end
1641
								if model:FindFirstChild("Humanoid") ~= nil then
1642
									model.Humanoid:TakeDamage(10)
1643
									model.Humanoid.Sit = true
1644
								end
1645
							end
1646
						end
1647
					end
1648
				end
1649
			end
1650
			wait(0.03)
1651
		end
1652
		shock:Remove()
1653
		shock2:Remove()
1654
		shock3:Remove()
1655
		Player.Character[Name].Source.Transparency = 1
1656
		Player.Character[Name].Source.Fire.Enabled = false
1657
		canFire = true
1658
	elseif spell == 11 then
1659
		--Kanamla Cysis, object manipulation class. The easiest spell in it's class allows you to lightly pick things up.
1660
		local target = mouse.Target
1661
		if target == nil then return end
1662
		if target.Parent == nil then return end
1663
		if target.Anchored == true then return end
1664
		if (target.Position - Player.Character[Name].Source.Position).magnitude > 25 then return end
1665
		if game:GetService("Players"):GetPlayerFromCharacter(target.Parent) ~= nil then
1666
			if game:GetService("Players"):GetPlayerFromCharacter(target.Parent).Character:FindFirstChild("Torso") ~= nil then
1667
				target = game:GetService("Players"):GetPlayerFromCharacter(target.Parent).Character.Torso
1668
				if game:GetService("Players"):GetPlayerFromCharacter(target.Parent).Character:FindFirstChild("Humanoid") ~= nil then
1669
					game:GetService("Players"):GetPlayerFromCharacter(target.Parent).Character.Humanoid.PlatformStand = true
1670
				end
1671
			end
1672
		end
1673
		local position = Instance.new("BodyPosition")
1674
		position.Name = "Cysis"
1675
		position.maxForce = Vector3.new(math.huge, math.huge, math.huge)
1676
		position.P = 1000
1677
		position.D = 50
1678
		position.Parent = target
1679
		position.position = Player.Character[Name].Source.Position + ((mouse.Hit.p - Player.Character[Name].Source.Position).unit * 10)
1680
		canFire = false
1681
		Player.Character[Name].Source.Mesh.MeshType = "Sphere"
1682
		Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
1683
		Player.Character[Name].Source.Transparency = 0.25
1684
		Player.Character[Name].Source.BrickColor = BrickColor.new("Bright blue")
1685
		Player.Character[Name].Source.Fire.Enabled = true
1686
		Player.Character[Name].Source.Fire.Heat = 10
1687
		Player.Character[Name].Source.Fire.Size = 2
1688
		Player.Character[Name].Source.Fire.Color = Color3.new(0, 0, 1)
1689
		Player.Character[Name].Source.Fire.SecondaryColor = Color3.new(0.5, 0.5, 1)
1690
		Player.Character[Name].Handle.Shine.Looped = false
1691
		Player.Character[Name].Handle.Shine.Volume = 1
1692
		Player.Character[Name].Handle.Shine.Pitch = 0.75
1693
		Player.Character[Name].Handle.Shine:Play()
1694
		for i = 0, math.huge do
1695
			if Button1Down == false then break end
1696
			if Player.Character == nil then break end
1697
			if Player.Character:FindFirstChild("Humanoid") == nil then break end
1698
			if Player.Character.Humanoid.Health <= 0 then break end
1699
			if Player.Character:FindFirstChild(Name) == nil then break end
1700
			if Player.Character[Name]:FindFirstChild("Handle") == nil then break end
1701
			if Player.Character[Name]:FindFirstChild("Source") == nil then break end
1702
			if power <= 0 then break end
1703
			if string.sub(tostring(i), string.len(tostring(i)), string.len(tostring(i))) == "0" then
1704
				power = power - 1
1705
			end
1706
			if target ~= nil and position ~= nil then
1707
				position.position = Player.Character[Name].Source.Position + ((mouse.Hit.p - Player.Character[Name].Source.Position).unit * 10)
1708
			end
1709
			wait()
1710
		end
1711
		if position ~= nil then position:Remove() end
1712
		if target ~= nil then
1713
			if target.Parent:FindFirstChild("Humanoid") ~= nil then
1714
				target.Parent.Humanoid.PlatformStand = false
1715
				target.Parent.Humanoid.Sit = true
1716
			end
1717
		end
1718
		for i = 0.25, 1, 0.05 do
1719
			Player.Character[Name].Source.Transparency = i
1720
			wait()
1721
		end
1722
		Player.Character[Name].Source.Transparency = 1
1723
		Player.Character[Name].Source.Fire.Enabled = false
1724
		canFire = true
1725
	elseif spell == 12 then
1726
		--Kanamla Tepidift, object manipulation class. Allows you to teleport from one area to another.
1727
		canFire = false
1728
		Player.Character[Name].Source.Mesh.MeshType = "Sphere"
1729
		Player.Character[Name].Source.BrickColor = BrickColor.new("Bright blue")
1730
		Player.Character[Name].Source.Fire.Enabled = true
1731
		Player.Character[Name].Source.Fire.Heat = 0
1732
		Player.Character[Name].Source.Fire.Color = Color3.new(0, 0, 1)
1733
		Player.Character[Name].Source.Fire.SecondaryColor = Color3.new(1, 1, 1)
1734
		Player.Character[Name].Handle.Shine.Looped = true
1735
		Player.Character[Name].Handle.Shine.Pitch = 1.5
1736
		Player.Character[Name].Handle.Shine.Volume = 1
1737
		Player.Character[Name].Handle.Shine:Play()
1738
		for i = 1, 0, -0.05 do
1739
			Player.Character[Name].Source.Transparency = i
1740
			Player.Character[Name].Source.Mesh.Scale = (Vector3.new(1 - i, 1 - i, 1 - i) * 15)
1741
			Player.Character[Name].Source.Fire.Size = (1 - i) * 15
1742
			wait()
1743
		end
1744
		local maxDistance = (Player.Character.Torso.Position - mouse.Hit.p).magnitude
1745
		if maxDistance < 500 then 
1746
			local pos1 = Player.Character.Torso.Position
1747
			local pos2 = mouse.Hit.p + Vector3.new(0, 3, 0)
1748
			local pos0 = pos1
1749
			for distance = 1, maxDistance, 5 do
1750
				pos0 = (CFrame.new(pos1, pos2) * CFrame.new(0, 0, -distance)).p
1751
				Player.Character.Torso.CFrame = CFrame.new(pos0, pos2)
1752
				Player.Character.Torso.Velocity = Vector3.new()
1753
				power = power - 1
1754
				wait()
1755
			end
1756
			Player.Character.Torso.CFrame = CFrame.new(pos2)
1757
			for i = 0, 1, 0.05 do
1758
				Player.Character[Name].Source.Transparency = i
1759
				Player.Character[Name].Source.Mesh.Scale = (Vector3.new(1 - i, 1 - i, 1 - i) * 15)
1760
				Player.Character[Name].Source.Fire.Size = (1 - i) * 15
1761
				Player.Character[Name].Handle.Shine.Volume = (1 - i)
1762
				wait()
1763
			end
1764
			Player.Character[Name].Handle.Shine:Stop()
1765
		else
1766
			for i = 0, 1, 0.05 do
1767
				Player.Character[Name].Source.BrickColor = Player.Character[Name].Source.BrickColor == BrickColor.new("Bright blue") and BrickColor.new("Really red") or BrickColor.new("Bright blue")
1768
				Player.Character[Name].Source.Transparency = i
1769
				Player.Character[Name].Source.Mesh.Scale = (Vector3.new(1 - i, 1 - i, 1 - i) * 15)
1770
				Player.Character[Name].Source.Fire.Size = (1 - i) * 15
1771
				Player.Character[Name].Source.Fire.Color = Player.Character[Name].Source.Fire.Color == Color3.new(0, 0, 1) and Color3.new(1, 0, 0) or Color3.new(0, 0, 1)
1772
				Player.Character[Name].Source.Fire.SecondaryColor = Player.Character[Name].Source.Fire.SecondaryColor == Color3.new(1, 1, 1) and Color3.new(1, 0, 0) or Color3.new(1, 1, 1)
1773
				Player.Character[Name].Handle.Shine.Pitch = (1 - i) + 0.5
1774
				wait()
1775
			end
1776
			Player.Character[Name].Handle.Shine:Stop()
1777
		end
1778
		Player.Character[Name].Source.Transparency = 1
1779
		Player.Character[Name].Source.Fire.Enabled = false
1780
		canFire = true
1781
	elseif spell == 13 then
1782
		--Kanamla Jump, object manipulation class. Allows you to jump really high.
1783
		canFire = false
1784
		while Button1Down == true do
1785
			if power <= 0 then break end
1786
			Player.Character[Name].Handle.Fire3.Looped = false
1787
			Player.Character[Name].Handle.Fire3.Pitch = 1
1788
			Player.Character[Name].Handle.Fire3.Volume = 1
1789
			for i = 1, 2 do Player.Character[Name].Handle.Fire3:Play() end
1790
			Player.Character[Name].Source.BrickColor = BrickColor.new("Really blue")
1791
			Player.Character.Humanoid.PlatformStand = true
1792
			Player.Character.Torso.Velocity = Vector3.new(Player.Character.Torso.Velocity.x, (Player.Character.Torso.Velocity.y / 2) + 100, Player.Character.Torso.Velocity.z)
1793
			power = power - 5
1794
			local shock = Instance.new("Part")
1795
			shock.FormFactor = "Custom"
1796
			shock.Size = Vector3.new(1, 1, 1)
1797
			shock.BrickColor = BrickColor.new("Really blue")
1798
			shock.Anchored = true
1799
			shock.Name = "Shock Ring"
1800
			shock.CanCollide = false
1801
			shock.Parent = Workspace
1802
			local mesh = Instance.new("SpecialMesh")
1803
			mesh.MeshType = "FileMesh"
1804
			mesh.MeshId = "http://www.roblox.com/Asset/?id=20329976"
1805
			mesh.Scale = Vector3.new(1, 1, 1)
1806
			mesh.Parent = shock
1807
			shock.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 2.5, 0))
1808
			coroutine.resume(coroutine.create(function()
1809
				for i = 0, 50 do
1810
					mesh.Scale = Vector3.new(i, i / 5, i)
1811
					shock.Transparency = i / 50
1812
					wait()
1813
				end
1814
				shock:Remove()
1815
			end))
1816
			for i = 0, 1, 0.2 do
1817
				Player.Character[Name].Source.Transparency = i
1818
				Player.Character[Name].Source.Mesh.Scale = (Vector3.new(i, i, i) * 5)
1819
				wait()
1820
			end
1821
			Player.Character[Name].Source.Transparency = 1
1822
			Player.Character.Humanoid.PlatformStand = false
1823
		end
1824
		canFire = true
1825
	elseif spell == 14 then
1826
		--Candora Hide, light manipulation class. The Hide spell makes you and your wand seem invisible to the naked eye by bending light around your limbs.
1827
		canFire = false
1828
		Player.Character[Name].Source.Mesh.MeshType = "Sphere"
1829
		Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
1830
		Player.Character[Name].Source.BrickColor = BrickColor.new("Royal purple")
1831
		for i = 1, 0, -0.05 do
1832
			Player.Character[Name].Source.Transparency = i
1833
			Player.Character[Name].Source.Mesh.Scale = Vector3.new(1 - i, 1 - i, 1 - i) * 2
1834
			wait()
1835
		end
1836
		Player.Character[Name].Source.Transparency = 0
1837
		if Player.Character:FindFirstChild("Head") ~= nil then
1838
			if Player.Character.Head:FindFirstChild("face") ~= nil then
1839
				Player.Character.Head.face.Face = "Bottom"
1840
			end
1841
		end
1842
		Player.Character[Name].Handle.Shine.Looped = false
1843
		Player.Character[Name].Handle.Shine.Volume = 1
1844
		Player.Character[Name].Handle.Shine:Play()
1845
		for i = 0, 1.1, 0.01 do
1846
			Player.Character[Name].Handle.Shine.Pitch = math.sin(i)
1847
			Player.Character[Name].Source.Mesh.Scale = Vector3.new(math.sin(i), math.sin(i), math.sin(i)) + Vector3.new(2, 2, 2)
1848
			for _, children in pairs(Player.Character:GetChildren()) do
1849
				if children.ClassName == "Part" and children.Name ~= "" then
1850
					children.Transparency = i
1851
				end
1852
				if children.Name == Name then
1853
					for _, children2 in pairs(children:GetChildren()) do
1854
						if children2.ClassName == "Part" then
1855
							children2.Transparency = i
1856
						end
1857
					end
1858
				end
1859
			end
1860
			wait()
1861
		end
1862
		while Button1Down == true do
1863
			if Player.Character == nil then break end
1864
			if Player.Character:FindFirstChild("Humanoid") == nil then break end
1865
			if Player.Character.Humanoid.Health <= 0 then break end
1866
			if Player.Character:FindFirstChild(Name) == nil then break end
1867
			if Player.Character[Name]:FindFirstChild("Handle") == nil then break end
1868
			if Player.Character[Name]:FindFirstChild("Source") == nil then break end
1869
			if power <= 0 then break end
1870
			power = power - 1
1871
			wait(0.5)
1872
		end
1873
		Player.Character[Name].Handle.Shine:Play()
1874
		for i = 1, -0.1, -0.01 do
1875
			Player.Character[Name].Handle.Shine.Pitch = math.sin(i)
1876
			Player.Character[Name].Source.Mesh.Scale = Vector3.new(math.sin(i), math.sin(i), math.sin(i)) + Vector3.new(2, 2, 2)
1877
			for _, children in pairs(Player.Character:GetChildren()) do
1878
				if children.ClassName == "Part" and children.Name ~= "" then
1879
					children.Transparency = i
1880
				end
1881
				if children.Name == Name then
1882
					for _, children2 in pairs(children:GetChildren()) do
1883
						if children2.ClassName == "Part" then
1884
							children2.Transparency = i
1885
						end
1886
					end
1887
				end
1888
			end
1889
			wait()
1890
		end
1891
		Player.Character[Name].Handle.Shine:Stop()
1892
		if Player.Character:FindFirstChild("Head") ~= nil then
1893
			if Player.Character.Head:FindFirstChild("face") ~= nil then
1894
				Player.Character.Head.face.Face = "Front"
1895
			end
1896
		end
1897
		for i = 0, 1, 0.05 do
1898
			Player.Character[Name].Source.Transparency = i
1899
			Player.Character[Name].Source.Mesh.Scale = Vector3.new(1 - i, 1 - i, 1 - i) * 2
1900
			wait()
1901
		end
1902
		Player.Character[Name].Source.Transparency = 1
1903
		canFire = true
1904
	elseif spell == 15 then
1905
		--Duraen Control, human manipulation class. Lets you control the movements of others.
1906
		Controlling = Controlling == nil and false or Controlling
1907
		ControlModel = ControlModel == nil and nil or ControlModel
1908
		if Controlling ~= true then
1909
			if mouse.Target == nil then return end
1910
			if mouse.Target.Parent == nil then return end
1911
			if mouse.Target.Parent:FindFirstChild("Humanoid") == nil then return end
1912
			if mouse.Target.Parent:FindFirstChild("Torso") == nil then return end
1913
			if mouse.Target.Parent:FindFirstChild("Head") == nil then return end
1914
			canFire = false
1915
			Controlling = true
1916
			ControlModel = mouse.Target.Parent
1917
			Player.Character[Name].Source.Mesh.MeshType = "Sphere"
1918
			Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
1919
			Player.Character[Name].Source.BrickColor = BrickColor.new("Neon orange")
1920
			Player.Character[Name].Handle.Shine.Looped = false
1921
			Player.Character[Name].Handle.Shine.Volume = 1
1922
			Player.Character[Name].Handle.Shine.Pitch = 2
1923
			Player.Character[Name].Handle.Shine:Play()
1924
			for i = 1, 0, -0.025 do
1925
				Player.Character[Name].Source.Transparency = i
1926
				Player.Character[Name].Source.Mesh.Scale = Vector3.new(1 - i, 1 - i, 1 - i) * 2
1927
				Player.Character[Name].Handle.Shine.Pitch = i * 2
1928
				wait()
1929
			end
1930
			Player.Character[Name].Source.Transparency = 0
1931
			Player.Character[Name].Handle.Shine:Stop()
1932
			coroutine.resume(coroutine.create(function()
1933
				for i = 0, 1, 0.05 do
1934
					Player.Character[Name].Source.Transparency = i
1935
					wait()
1936
				end
1937
				Player.Character[Name].Source.Transparency = 1
1938
			end))
1939
			Player.Character[Name].Handle.Fire2.Looped = false
1940
			Player.Character[Name].Handle.Fire2.Volume = 1
1941
			Player.Character[Name].Handle.Fire2.Pitch = 1
1942
			Player.Character[Name].Handle.Fire2:Play()
1943
			local Shot = Instance.new("Part", Workspace)
1944
			Shot.FormFactor = "Custom"
1945
			Shot.Shape = "Ball"
1946
			Shot.Size = Vector3.new(1, 1, 1)
1947
			Shot.CFrame = Player.Character[Name].Source.CFrame
1948
			Shot.CanCollide = false
1949
			Shot.BrickColor = BrickColor.new("Neon orange")
1950
			Shot.Transparency = 0.5
1951
			Shot.TopSurface = 0
1952
			Shot.BottomSurface = 0
1953
			local BodyVelocity = Instance.new("BodyVelocity", Shot)
1954
			BodyVelocity.maxForce = Vector3.new(math.huge, math.huge, math.huge)
1955
			local Camera = Workspace.CurrentCamera
1956
			Camera.CameraSubject = Shot
1957
			while true do
1958
				if ControlModel == nil then break end
1959
				if ControlModel.Parent == nil then break end
1960
				if ControlModel:FindFirstChild("Humanoid") == nil then break end
1961
				if ControlModel.Humanoid.Health <= 0 then break end
1962
				if ControlModel:FindFirstChild("Torso") == nil then break end
1963
				if ControlModel:FindFirstChild("Head") == nil then break end
1964
				if Player.Character == nil then break end
1965
				if Player.Character.Parent == nil then break end
1966
				if Player.Character:FindFirstChild("Humanoid") == nil then break end
1967
				if Player.Character.Humanoid.Health <= 0 then break end
1968
				if Player.Character:FindFirstChild("Torso") == nil then break end
1969
				if Player.Character:FindFirstChild("Head") == nil then break end
1970
				if Shot.Parent == nil then break end
1971
				if (ControlModel.Head.Position - Shot.Position).magnitude < 3 then break end
1972
				BodyVelocity.velocity = (ControlModel.Head.Position - Shot.Position).unit * (ControlModel.Humanoid.WalkSpeed * 1.5)
1973
				wait()
1974
			end
1975
			Shot:Remove()
1976
			if ControlModel:FindFirstChild("Humanoid") == nil then return end
1977
			if ControlModel:FindFirstChild("Torso") == nil then return end
1978
			if ControlModel:FindFirstChild("Head") == nil then return end
1979
			local ControlPlayer = nil
1980
			local Explosion = Instance.new("Part", Workspace)
1981
			Explosion.FormFactor = "Custom"
1982
			Explosion.Shape = "Ball"
1983
			Explosion.Size = Vector3.new(1, 1, 1)
1984
			Explosion.CFrame = ControlModel.Head.CFrame
1985
			Explosion.CanCollide = false
1986
			Explosion.Anchored = true
1987
			Explosion.BrickColor = BrickColor.new("Neon orange")
1988
			Explosion.Transparency = 0.5
1989
			Explosion.TopSurface = 0
1990
			Explosion.BottomSurface = 0
1991
			local Mesh = Instance.new("SpecialMesh")
1992
			Mesh.MeshType = "Sphere"
1993
			Mesh.Parent = Explosion
1994
			coroutine.resume(coroutine.create(function(Part)
1995
				for i = 0, 1, 0.05 do
1996
					Mesh.Scale = Vector3.new(i * 7.5, i * 2, i * 7.5)
1997
					Explosion.Transparency = i
1998
					Explosion.CFrame = Part.CFrame
1999
					wait()
2000
				end
2001
				Explosion:Remove()
2002
			end), ControlModel.Head)
2003
			local Camera = Workspace.CurrentCamera
2004
			Camera.CameraSubject = ControlModel.Humanoid
2005
			canFire = true
2006
			while Controlling == true and ControlModel:FindFirstChild("Humanoid") ~= nil and ControlModel:FindFirstChild("Torso") ~= nil and ControlModel:FindFirstChild("Head") ~= nil and spell == 15 and selected == true do
2007
				if Player.Character == nil then break end
2008
				if Player.Character:FindFirstChild("Humanoid") == nil then break end
2009
				if Player.Character.Humanoid.Health <= 0 then break end
2010
				if Player.Character:FindFirstChild(Name) == nil then break end
2011
				if Player.Character[Name]:FindFirstChild("Handle") == nil then break end
2012
				if Player.Character[Name]:FindFirstChild("Source") == nil then break end
2013
				if ControlModel.Humanoid.Health <= 0 then break end
2014
				if power <= 0 then break end
2015
				if math.random(1, 2) == 1 then power = power - 1 end
2016
				ControlModel.Humanoid:MoveTo(mouse.Hit.p, mouse.Target == nil and ControlModel.Torso or mouse.Target)
2017
				if mouse.Hit.p.y > ControlModel.Torso.Position.y then
2018
					ControlModel.Humanoid.Jump = true
2019
				end
2020
				wait()
2021
			end
2022
			if ControlModel.Parent ~= nil then
2023
				if ControlModel:FindFirstChild("Head") ~= nil then
2024
					local Explosion = Instance.new("Part", Workspace)
2025
					Explosion.Name = "Magical Explosion"
2026
					Explosion.FormFactor = "Custom"
2027
					Explosion.Shape = "Ball"
2028
					Explosion.Size = Vector3.new(1, 1, 1)
2029
					Explosion.CFrame = ControlModel.Head.CFrame
2030
					Explosion.CanCollide = false
2031
					Explosion.Anchored = true
2032
					Explosion.BrickColor = BrickColor.new("Neon orange")
2033
					Explosion.TopSurface = 0
2034
					Explosion.BottomSurface = 0
2035
					local Mesh = Instance.new("SpecialMesh")
2036
					Mesh.MeshType = "Sphere"
2037
					Mesh.Parent = Explosion
2038
					coroutine.resume(coroutine.create(function(Part)
2039
						for i = 1, 0, -0.05 do
2040
							Mesh.Scale = Vector3.new(i * 7.5, i * 2, i * 7.5)
2041
							Explosion.Transparency = i
2042
							Explosion.CFrame = Part.CFrame
2043
							wait()
2044
						end
2045
						Explosion:Remove()
2046
					end), ControlModel.Head)
2047
				end
2048
			end
2049
			Controlling = false
2050
			ControlModel = nil
2051
			Camera.CameraSubject = Player.Character:FindFirstChild("Humanoid")
2052
			canFire = false
2053
			if selected == true then
2054
				for i = 1, 0, -0.05 do
2055
					Player.Character[Name].Source.Mesh.MeshType = "Sphere"
2056
					Player.Character[Name].Source.Mesh.Scale = Vector3.new(2, 2, 2)
2057
					Player.Character[Name].Source.BrickColor = BrickColor.new("Neon orange")
2058
					Player.Character[Name].Source.Transparency = i
2059
					wait()
2060
				end
2061
				Player.Character[Name].Handle.Shine.Looped = false
2062
				Player.Character[Name].Handle.Shine.Volume = 1
2063
				Player.Character[Name].Handle.Shine.Pitch = 0
2064
				Player.Character[Name].Handle.Shine:Play()
2065
				for i = 0, 1, 0.025 do
2066
					Player.Character[Name].Source.Mesh.MeshType = "Sphere"
2067
					Player.Character[Name].Source.Mesh.Scale = Vector3.new(1 - i, 1 - i, 1 - i) * 2
2068
					Player.Character[Name].Source.BrickColor = BrickColor.new("Neon orange")
2069
					Player.Character[Name].Source.Transparency = i
2070
					Player.Character[Name].Handle.Shine.Pitch = i * 2
2071
					wait()
2072
				end
2073
				Player.Character[Name].Source.Transparency = 1
2074
			end
2075
			canFire = true
2076
		else
2077
			Controlling = false
2078
		end
2079
	elseif spell == 16 then
2080
		--Duraen Switch, human manipulation class. Dress up as the enemy... Or as a woman, you sicko.
2081
		if mouse.Target == nil then return end
2082
		if mouse.Target.Parent == nil then return end
2083
		if mouse.Target.Parent:FindFirstChild("Humanoid") == nil then return end
2084
		if mouse.Target.Parent:FindFirstChild("Torso") == nil then return end
2085
		if mouse.Target.Parent:FindFirstChild("Head") == nil then return end
2086
		canFire = false
2087
		local CharacterOne = Player.Character
2088
		local CharacterTwo = mouse.Target.Parent
2089
		Player.Character[Name].Source.Mesh.MeshType = "Sphere"
2090
		Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
2091
		Player.Character[Name].Source.BrickColor = BrickColor.new("Neon orange")
2092
		Player.Character[Name].Handle.Shine.Looped = false
2093
		Player.Character[Name].Handle.Shine.Volume = 1
2094
		Player.Character[Name].Handle.Shine.Pitch = 2
2095
		Player.Character[Name].Handle.Shine:Play()
2096
		for i = 1, 0, -0.025 do
2097
			Player.Character[Name].Source.Transparency = i
2098
			Player.Character[Name].Source.Mesh.Scale = Vector3.new(1 - i, 1 - i, 1 - i) * 2
2099
			Player.Character[Name].Handle.Shine.Pitch = i * 2
2100
			wait()
2101
		end
2102
		Player.Character[Name].Source.Transparency = 0
2103
		Player.Character[Name].Handle.Shine:Stop()
2104
		coroutine.resume(coroutine.create(function()
2105
			for i = 0, 1, 0.05 do
2106
				Player.Character[Name].Source.Transparency = i
2107
				wait()
2108
			end
2109
			Player.Character[Name].Source.Transparency = 1
2110
		end))
2111
		coroutine.resume(coroutine.create(function()
2112
			local Explosion = Instance.new("Part", Workspace)
2113
			Explosion.Name = "Magical Explosion"
2114
			Explosion.FormFactor = "Custom"
2115
			Explosion.Shape = "Ball"
2116
			Explosion.Size = Vector3.new(1, 1, 1)
2117
			Explosion.CanCollide = false
2118
			Explosion.Anchored = true
2119
			Explosion.BrickColor = BrickColor.new("Neon orange")
2120
			Explosion.TopSurface = 0
2121
			Explosion.BottomSurface = 0
2122
			local Mesh = Instance.new("SpecialMesh")
2123
			Mesh.MeshType = "Sphere"
2124
			Mesh.Parent = Explosion
2125
			coroutine.resume(coroutine.create(function(Part)
2126
				for i = 0, 7, 0.1 do
2127
					Mesh.Scale = Vector3.new(i, i * 2, i)
2128
					Explosion.CFrame = Part.CFrame
2129
					wait()
2130
				end
2131
				for i = 7, 14, 0.1 do
2132
					Mesh.Scale = Vector3.new(i, i * 2, i)
2133
					Explosion.Transparency = (i - 7) / 7
2134
					Explosion.CFrame = Part.CFrame
2135
					wait()
2136
				end
2137
				Explosion:Remove()
2138
			end), CharacterOne.Torso)
2139
			local Explosion = Instance.new("Part", Workspace)
2140
			Explosion.Name = "Magical Explosion"
2141
			Explosion.FormFactor = "Custom"
2142
			Explosion.Shape = "Ball"
2143
			Explosion.Size = Vector3.new(1, 1, 1)
2144
			Explosion.CanCollide = false
2145
			Explosion.Anchored = true
2146
			Explosion.BrickColor = BrickColor.new("Neon orange")
2147
			Explosion.TopSurface = 0
2148
			Explosion.BottomSurface = 0
2149
			local Mesh = Instance.new("SpecialMesh")
2150
			Mesh.MeshType = "Sphere"
2151
			Mesh.Parent = Explosion
2152
			coroutine.resume(coroutine.create(function(Part)
2153
				for i = 0, 7, 0.1 do
2154
					Mesh.Scale = Vector3.new(i, i * 2, i)
2155
					Explosion.CFrame = Part.CFrame
2156
					wait()
2157
				end
2158
				for i = 7, 14, 0.1 do
2159
					Mesh.Scale = Vector3.new(i, i * 2, i)
2160
					Explosion.Transparency = (i - 7) / 7
2161
					Explosion.CFrame = Part.CFrame
2162
					wait()
2163
				end
2164
				Explosion:Remove()
2165
			end), CharacterTwo.Torso)
2166
		end))
2167
		wait(2)
2168
		local CharacterOneParts = Instance.new("Model")
2169
		local CharacterTwoParts = Instance.new("Model")
2170
		if CharacterOne.Head:FindFirstChild("face") ~= nil then
2171
			CharacterOne.Head.face.Parent = CharacterOneParts
2172
		end
2173
		if CharacterOne.Head:FindFirstChild("Mesh") ~= nil then
2174
			CharacterOne.Head.Mesh.Parent = CharacterOneParts
2175
		end
2176
		if CharacterOne.Torso:FindFirstChild("roblox") ~= nil then
2177
			CharacterOne.Torso.roblox.Parent = CharacterOneParts
2178
		end
2179
		for _, Part in pairs(CharacterOne:GetChildren()) do
2180
			if Part.ClassName == "Shirt" or Part.ClassName == "Pants" or Part.ClassName == "CharacterMesh" or Part.ClassName == "ShirtGraphic" or Part.ClassName == "Hat" or Part.ClassName == "Accoutrement" or Part.ClassName == "BodyColors" then
2181
				Part.Parent = CharacterOneParts
2182
			end
2183
		end
2184
		if CharacterTwo.Head:FindFirstChild("face") ~= nil then
2185
			CharacterTwo.Head.face.Parent = CharacterTwoParts
2186
		end
2187
		if CharacterTwo.Head:FindFirstChild("Mesh") ~= nil then
2188
			CharacterTwo.Head.Mesh.Parent = CharacterTwoParts
2189
		end
2190
		if CharacterTwo.Torso:FindFirstChild("roblox") ~= nil then
2191
			CharacterTwo.Torso.roblox.Parent = CharacterTwoParts
2192
		end
2193
		for _, Part in pairs(CharacterTwo:GetChildren()) do
2194
			if Part.ClassName == "Shirt" or Part.ClassName == "Pants" or Part.ClassName == "CharacterMesh" or Part.ClassName == "ShirtGraphic" or Part.ClassName == "Hat" or Part.ClassName == "Accoutrement" or Part.ClassName == "BodyColors" then
2195
				Part.Parent = CharacterTwoParts
2196
			end
2197
		end
2198
		for _, Part in pairs(CharacterOneParts:GetChildren()) do
2199
			if Part.Name == "face" or Part.Name == "Mesh" then
2200
				Part.Parent = CharacterTwo.Head
2201
			elseif Part.Name == "roblox" then
2202
				Part.Parent = CharacterTwo.Torso
2203
			else
2204
				Part.Parent = CharacterTwo
2205
			end
2206
		end
2207
		for _, Part in pairs(CharacterTwoParts:GetChildren()) do
2208
			if Part.Name == "face" or Part.Name == "Mesh" then
2209
				Part.Parent = CharacterOne.Head
2210
			elseif Part.Name == "roblox" then
2211
				Part.Parent = CharacterOne.Torso
2212
			else
2213
				Part.Parent = CharacterOne
2214
			end
2215
		end
2216
		canFire = true
2217
	end
2218
end
2219
2220
2221
function onButton1Up(mouse)
2222
	if selected == false then return end
2223
	Button1Down = false
2224
	while canFire == false do wait() end
2225
	mouse.Icon = "rbxasset://textures\\GunCursor.png"
2226
end
2227
2228
2229
function onKeyDown(key, mouse)
2230
	if selected == false or canFire == false or Button1Down == true then return end
2231
	key = key:lower()
2232
	if key == "q" then
2233
		if mouse.Target == nil then return end
2234
		if game:GetService("Players"):GetPlayerFromCharacter(mouse.Target.Parent) ~= nil then
2235
			onDeselected(mouse)
2236
			removeParts("holster")
2237
			script.Parent.Parent = game:GetService("Players"):GetPlayerFromCharacter(mouse.Target.Parent).Backpack
2238
		end
2239
	end
2240
	if key == "e" then
2241
		spell = spell - 1
2242
		if spell < 0 then
2243
			spell = 16
2244
		end
2245
	end
2246
	if key == "r" then
2247
		spell = spell + 1
2248
		if spell > 16 then
2249
			spell = 0
2250
		end
2251
	end
2252
	if key == "t" then
2253
		spellHotkey1Delay = time()
2254
	end
2255
	if key == "y" then
2256
		spellHotkey2Delay = time()
2257
	end
2258
	if key == "u" then
2259
		spellHotkey3Delay = time()
2260
	end
2261
	updateSpellText()
2262
	updateGui()
2263
end
2264
2265
2266
function onKeyUp(key, mouse)
2267
	if selected == false or canFire == false or Button1Down == true then return end
2268
	key = key:lower()
2269
	if key == "t" then
2270
		if time() - spellHotkey1Delay > 1 then
2271
			spellHotkey1 = spell
2272
			local HotkeyMessage = Instance.new("Message", Player)
2273
			HotkeyMessage.Text = "Set hotkey 1."
2274
			wait(2.5)
2275
			HotkeyMessage:Remove()
2276
		else
2277
			spell = spellHotkey1
2278
		end
2279
	end
2280
	if key == "y" then
2281
		if time() - spellHotkey2Delay > 1 then
2282
			spellHotkey2 = spell
2283
			local HotkeyMessage = Instance.new("Message", Player)
2284
			HotkeyMessage.Text = "Set hotkey 2."
2285
			wait(2.5)
2286
			HotkeyMessage:Remove()
2287
		else
2288
			spell = spellHotkey2
2289
		end
2290
	end
2291
	if key == "u" then
2292
		if time() - spellHotkey3Delay > 1 then
2293
			spellHotkey3 = spell
2294
			local HotkeyMessage = Instance.new("Message", Player)
2295
			HotkeyMessage.Text = "Set hotkey 3."
2296
			wait(2.5)
2297
			HotkeyMessage:Remove()
2298
		else
2299
			spell = spellHotkey3
2300
		end
2301
	end
2302
	updateSpellText()
2303
	updateGui()
2304
end
2305
2306
2307
function onSelected(mouse)
2308
	if selected == true or dropped == true then return end
2309
	selected = true
2310
	mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
2311
	while Player.Character:FindFirstChild("WeaponActivated") ~= nil do
2312
		if Player.Character.WeaponActivated.Value == nil then break end
2313
		if Player.Character.WeaponActivated.Value.Parent == nil then break end
2314
		wait()
2315
	end
2316
	mouse.Icon = "rbxasset://textures\\GunCursor.png"
2317
	updateSpellText()
2318
	updateGui()
2319
	removeParts("holster")
2320
	makeParts("hand")
2321
	local weapon = Instance.new("ObjectValue")
2322
	weapon.Name = "WeaponActivated"
2323
	weapon.Value = script.Parent
2324
	weapon.Parent = Player.Character
2325
	DisableLimb(1, Player.Character)
2326
	SetAngle(1, math.rad(90), Player.Character)
2327
	mouse.Button1Down:connect(function() onButton1Down(mouse) end)
2328
	mouse.Button1Up:connect(function() onButton1Up(mouse) end)
2329
	mouse.KeyDown:connect(function(key) onKeyDown(key, mouse) end)
2330
	mouse.KeyUp:connect(function(key) onKeyUp(key, mouse) end)
2331
	while selected == true do
2332
		if canFire == true then
2333
			if power < 100 and power >= 0 then
2334
				power = power + 1
2335
				wait(0.05)
2336
			elseif power < 0 then
2337
				power = power + 1
2338
				wait(0.3)
2339
			elseif power > 100 then
2340
				power = power - 1
2341
				wait(1)
2342
			else
2343
				power = 100
2344
			end
2345
		end
2346
		updateSpellText()
2347
		updateGui()
2348
		wait()
2349
	end
2350
end
2351
2352
2353
function onDeselected(mouse)
2354
	if selected == false then return end
2355
	selected = false
2356
	Button1Down = false
2357
	while canFire == false do
2358
		wait()
2359
	end
2360
	if Player.Character:FindFirstChild("WeaponActivated") ~= nil then
2361
		if Player.Character.WeaponActivated.Value == script.Parent then
2362
			Player.Character.WeaponActivated:Remove()
2363
		end
2364
	end
2365
	while Player.Character:FindFirstChild("WeaponActivated") ~= nil do
2366
		if Player.Character.WeaponActivated.Value == nil then break end
2367
		if pcall(function() if Player.Character.WeaponActivated.Value.Parent == nil then return true end end) then break end
2368
		wait()
2369
	end
2370
	if Player.PlayerGui:FindFirstChild(Name) ~= nil then Player.PlayerGui[Name]:Remove() end
2371
	removeParts("hand")
2372
	makeParts("holster")
2373
	SetAngle(1, 0, Player.Character)
2374
	EnableLimb(1, Player.Character)
2375
end
2376
2377
2378
if script.Parent.ClassName ~= "HopperBin" then
2379
	if Player == nil then print("Error: Player not found!") return end
2380
	Tool = Instance.new("HopperBin")
2381
	Tool.Name = Name
2382
	Tool.Parent = Player.Backpack
2383
	script.Name = "Main"
2384
	script.Parent = Tool
2385
end wait() if script.Parent.ClassName == "HopperBin" then
2386
	while script.Parent.Parent.ClassName ~= "Backpack" do
2387
		wait()
2388
	end
2389
	Player = script.Parent.Parent.Parent
2390
	makeParts("holster")
2391
	script.Parent.Selected:connect(onSelected)
2392
	script.Parent.Deselected:connect(onDeselected)
2393
end