View difference between Paste ID: GqHHuqx7 and gAsD8xGM
SHOW: | | - or go back to the newest paste.
1
--//====================================================\\--
2
--||			   CREATED BY SHACKLUSTER
3
--\\====================================================//--
4
5
wait(0.2)
6
7-
Player = game:GetService("Players").LocalPlayer
7+
Player = owner
8
PlayerGui = Player.PlayerGui
9
Cam = workspace.CurrentCamera
10
Backpack = Player.Backpack
11
Character = Player.Character
12
Humanoid = Character.Humanoid
13-
Mouse = Player:GetMouse()
13+
14
Torso = Character["Torso"]
15
Head = Character["Head"]
16
RightArm = Character["Right Arm"]
17
LeftArm = Character["Left Arm"]
18
RightLeg = Character["Right Leg"]
19
LeftLeg = Character["Left Leg"]
20
RootJoint = RootPart["RootJoint"]
21
Neck = Torso["Neck"]
22
RightShoulder = Torso["Right Shoulder"]
23
LeftShoulder = Torso["Left Shoulder"]
24
RightHip = Torso["Right Hip"]
25
LeftHip = Torso["Left Hip"]
26
local sick = Instance.new("Sound",Character)
27
sick.SoundId = "rbxassetid://1494340971"
28
sick.Looped = true
29
sick.Pitch = 1
30
sick.Volume = 1
31
sick:Play()
32
33
IT = Instance.new
34
CF = CFrame.new
35
VT = Vector3.new
36
RAD = math.rad
37
C3 = Color3.new
38
UD2 = UDim2.new
39
BRICKC = BrickColor.new
40
ANGLES = CFrame.Angles
41
EULER = CFrame.fromEulerAnglesXYZ
42
COS = math.cos
43
ACOS = math.acos
44
SIN = math.sin
45
ASIN = math.asin
46
ABS = math.abs
47
MRANDOM = math.random
48
FLOOR = math.floor
49
50
--//=================================\\
51
--|| 	      USEFUL VALUES
52
--\\=================================//
53
54
Animation_Speed = 3
55
Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
56
local Speed = 25
57
local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
58
local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
59
local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
60
local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
61
local DAMAGEMULTIPLIER = 1
62
local ANIM = "Idle"
63
local ATTACK = false
64
local EQUIPPED = false
65
local HOLD = false
66
local COMBO = 1
67
local Rooted = false
68
local SINE = 0
69
local KEYHOLD = false
70
local CHANGE = 2 / Animation_Speed
71
local WALKINGANIM = false
72
local VALUE1 = false
73
local VALUE2 = false
74
local ROBLOXIDLEANIMATION = IT("Animation")
75
ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
76
ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
77
--ROBLOXIDLEANIMATION.Parent = Humanoid
78
local WEAPONGUI = IT("ScreenGui", PlayerGui)
79
WEAPONGUI.Name = "Weapon GUI"
80
local Effects = IT("Folder", Character)
81
Effects.Name = "Effects"
82
local ANIMATOR = Humanoid.Animator
83
local ANIMATE = Character.Animate
84
local UNANCHOR = true
85
local PLAYMAINANIM = true
86
local BOLTSOUNDS = {168586621,168586586,178452241}
87
88
--//=================================\\
89
--\\=================================//
90
91
92
--//=================================\\
93
--|| SAZERENOS' ARTIFICIAL HEARTBEAT
94
--\\=================================//
95
96
ArtificialHB = Instance.new("BindableEvent", script)
97
ArtificialHB.Name = "ArtificialHB"
98
99
script:WaitForChild("ArtificialHB")
100
101
frame = Frame_Speed
102
tf = 0
103
allowframeloss = false
104
tossremainder = false
105
lastframe = tick()
106
script.ArtificialHB:Fire()
107
108
game:GetService("RunService").Heartbeat:connect(function(s, p)
109
	tf = tf + s
110
	if tf >= frame then
111
		if allowframeloss then
112
			script.ArtificialHB:Fire()
113
			lastframe = tick()
114
		else
115
			for i = 1, math.floor(tf / frame) do
116
				script.ArtificialHB:Fire()
117
			end
118
		lastframe = tick()
119
		end
120
		if tossremainder then
121
			tf = 0
122
		else
123
			tf = tf - frame * math.floor(tf / frame)
124
		end
125
	end
126
end)
127
128
--//=================================\\
129
--\\=================================//
130
131
--//=================================\\
132
--|| 	      SOME FUNCTIONS
133
--\\=================================//
134
135
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
136
	return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
137
end
138
139
function PositiveAngle(NUMBER)
140
	if NUMBER >= 0 then
141
		NUMBER = 0
142
	end
143
	return NUMBER
144
end
145
146
function NegativeAngle(NUMBER)
147
	if NUMBER <= 0 then
148
		NUMBER = 0
149
	end
150
	return NUMBER
151
end
152
153
function Swait(NUMBER)
154
	if NUMBER == 0 or NUMBER == nil then
155
		ArtificialHB.Event:wait()
156
	else
157
		for i = 1, NUMBER do
158
			ArtificialHB.Event:wait()
159
		end
160
	end
161
end
162
163
function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
164
	local NEWMESH = IT(MESH)
165
	if MESH == "SpecialMesh" then
166
		NEWMESH.MeshType = MESHTYPE
167
		if MESHID ~= "nil" and MESHID ~= "" then
168
			NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
169
		end
170
		if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
171
			NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
172
		end
173
	end
174
	NEWMESH.Offset = OFFSET or VT(0, 0, 0)
175
	NEWMESH.Scale = SCALE
176
	NEWMESH.Parent = PARENT
177
	return NEWMESH
178
end
179
180
function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
181
	local NEWPART = IT("Part")
182
	NEWPART.formFactor = FORMFACTOR
183
	NEWPART.Reflectance = REFLECTANCE
184
	NEWPART.Transparency = TRANSPARENCY
185
	NEWPART.CanCollide = false
186
	NEWPART.Locked = true
187
	NEWPART.Anchored = true
188
	if ANCHOR == false then
189
		NEWPART.Anchored = false
190
	end
191
	NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
192
	NEWPART.Name = NAME
193
	NEWPART.Size = SIZE
194
	NEWPART.Position = Torso.Position
195
	NEWPART.Material = MATERIAL
196
	NEWPART:BreakJoints()
197
	NEWPART.Parent = PARENT
198
	return NEWPART
199
end
200
201
	local function weldBetween(a, b)
202
	    local weldd = Instance.new("ManualWeld")
203
	    weldd.Part0 = a
204
	    weldd.Part1 = b
205
	    weldd.C0 = CFrame.new()
206
	    weldd.C1 = b.CFrame:inverse() * a.CFrame
207
	    weldd.Parent = a
208
	    return weldd
209
	end
210
211
212
function QuaternionFromCFrame(cf)
213
	local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
214
	local trace = m00 + m11 + m22
215
	if trace > 0 then 
216
		local s = math.sqrt(1 + trace)
217
		local recip = 0.5 / s
218
		return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
219
	else
220
		local i = 0
221
		if m11 > m00 then
222
			i = 1
223
		end
224
		if m22 > (i == 0 and m00 or m11) then
225
			i = 2
226
		end
227
		if i == 0 then
228
			local s = math.sqrt(m00 - m11 - m22 + 1)
229
			local recip = 0.5 / s
230
			return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
231
		elseif i == 1 then
232
			local s = math.sqrt(m11 - m22 - m00 + 1)
233
			local recip = 0.5 / s
234
			return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
235
		elseif i == 2 then
236
			local s = math.sqrt(m22 - m00 - m11 + 1)
237
			local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
238
		end
239
	end
240
end
241
 
242
function QuaternionToCFrame(px, py, pz, x, y, z, w)
243
	local xs, ys, zs = x + x, y + y, z + z
244
	local wx, wy, wz = w * xs, w * ys, w * zs
245
	local xx = x * xs
246
	local xy = x * ys
247
	local xz = x * zs
248
	local yy = y * ys
249
	local yz = y * zs
250
	local zz = z * zs
251
	return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
252
end
253
 
254
function QuaternionSlerp(a, b, t)
255
	local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
256
	local startInterp, finishInterp;
257
	if cosTheta >= 0.0001 then
258
		if (1 - cosTheta) > 0.0001 then
259
			local theta = ACOS(cosTheta)
260
			local invSinTheta = 1 / SIN(theta)
261
			startInterp = SIN((1 - t) * theta) * invSinTheta
262
			finishInterp = SIN(t * theta) * invSinTheta
263
		else
264
			startInterp = 1 - t
265
			finishInterp = t
266
		end
267
	else
268
		if (1 + cosTheta) > 0.0001 then
269
			local theta = ACOS(-cosTheta)
270
			local invSinTheta = 1 / SIN(theta)
271
			startInterp = SIN((t - 1) * theta) * invSinTheta
272
			finishInterp = SIN(t * theta) * invSinTheta
273
		else
274
			startInterp = t - 1
275
			finishInterp = t
276
		end
277
	end
278
	return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
279
end
280
281
function Clerp(a, b, t)
282
	local qa = {QuaternionFromCFrame(a)}
283
	local qb = {QuaternionFromCFrame(b)}
284
	local ax, ay, az = a.x, a.y, a.z
285
	local bx, by, bz = b.x, b.y, b.z
286
	local _t = 1 - t
287
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
288
end
289
290
function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
291
	local frame = IT("Frame")
292
	frame.BackgroundTransparency = TRANSPARENCY
293
	frame.BorderSizePixel = BORDERSIZEPIXEL
294
	frame.Position = POSITION
295
	frame.Size = SIZE
296
	frame.BackgroundColor3 = COLOR
297
	frame.BorderColor3 = BORDERCOLOR
298
	frame.Name = NAME
299
	frame.Parent = PARENT
300
	return frame
301
end
302
303
function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
304
	local label = IT("TextLabel")
305
	label.BackgroundTransparency = 1
306
	label.Size = UD2(1, 0, 1, 0)
307
	label.Position = UD2(0, 0, 0, 0)
308
	label.TextColor3 = TEXTCOLOR
309
	label.TextStrokeTransparency = STROKETRANSPARENCY
310
	label.TextTransparency = TRANSPARENCY
311
	label.FontSize = TEXTFONTSIZE
312
	label.Font = TEXTFONT
313
	label.BorderSizePixel = BORDERSIZEPIXEL
314
	label.TextScaled = false
315
	label.Text = TEXT
316
	label.Name = NAME
317
	label.Parent = PARENT
318
	return label
319
end
320
321
function NoOutlines(PART)
322
	PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
323
end
324
325
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
326
	local NEWWELD = IT(TYPE)
327
	NEWWELD.Part0 = PART0
328
	NEWWELD.Part1 = PART1
329
	NEWWELD.C0 = C0
330
	NEWWELD.C1 = C1
331
	NEWWELD.Parent = PARENT
332
	return NEWWELD
333
end
334
335
local S = IT("Sound")
336
function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
337
	local NEWSOUND = nil
338
	coroutine.resume(coroutine.create(function()
339
		NEWSOUND = S:Clone()
340
		NEWSOUND.Parent = PARENT
341
		NEWSOUND.Volume = VOLUME
342
		NEWSOUND.Pitch = PITCH
343
		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
344
		NEWSOUND:play()
345
		if DOESLOOP == true then
346
			NEWSOUND.Looped = true
347
		else
348
			repeat wait(1) until NEWSOUND.Playing == false
349
			NEWSOUND:remove()
350
		end
351
	end))
352
	return NEWSOUND
353
end
354
355
local EyeSizes={
356
	NumberSequenceKeypoint.new(0,2,0),
357
	NumberSequenceKeypoint.new(1,0,0)
358
}
359
local EyeTrans={
360
	NumberSequenceKeypoint.new(0,0.5,0),
361
	NumberSequenceKeypoint.new(1,1,0)
362
}
363
local PE=Instance.new("ParticleEmitter",nil)
364
PE.LightEmission=.8
365
PE.Color = ColorSequence.new(BRICKC("Alder").Color,BRICKC("Lavender").Color)
366
PE.Size=NumberSequence.new(EyeSizes)
367
PE.Transparency=NumberSequence.new(EyeTrans)
368
PE.Lifetime=NumberRange.new(0.35,1)
369
PE.Rotation=NumberRange.new(0,360)
370
PE.Rate=100
371
PE.VelocitySpread = 10000
372
PE.Acceleration = Vector3.new(0,85,0)
373
PE.Drag = 5
374
PE.Speed = NumberRange.new(0.1,5)
375
PE.Texture="http://www.roblox.com/asset/?id=1460745664"
376
PE.ZOffset = 0.5
377
PE.Name = "PE"
378
PE.Enabled = false
379
380
function Fire(art)
381
	local PARTICLES = PE:Clone()
382
	PARTICLES.Parent = art
383
	PARTICLES.Enabled = true
384
	return PARTICLES
385
end
386
387
function CFrameFromTopBack(at, top, back)
388
	local right = top:Cross(back)
389
	return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
390
end
391
392
--WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
393
function WACKYEFFECT(Table)
394
	local TYPE = (Table.EffectType or "Sphere")
395
	local SIZE = (Table.Size or VT(1,1,1))
396
	local ENDSIZE = (Table.Size2 or VT(0,0,0))
397
	local TRANSPARENCY = (Table.Transparency or 0)
398
	local ENDTRANSPARENCY = (Table.Transparency2 or 1)
399
	local CFRAME = (Table.CFrame or Torso.CFrame)
400
	local MOVEDIRECTION = (Table.MoveToPos or nil)
401
	local ROTATION1 = (Table.RotationX or 0)
402
	local ROTATION2 = (Table.RotationY or 0)
403
	local ROTATION3 = (Table.RotationZ or 0)
404
	local MATERIAL = (Table.Material or "Neon")
405
	local COLOR = (Table.Color or C3(1,1,1))
406
	local TIME = (Table.Time or 45)
407
	local SOUNDID = (Table.SoundID or nil)
408
	local SOUNDPITCH = (Table.SoundPitch or nil)
409
	local SOUNDVOLUME = (Table.SoundVolume or nil)
410
	coroutine.resume(coroutine.create(function()
411
		local PLAYSSOUND = false
412
		local SOUND = nil
413
		local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
414
		if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
415
			PLAYSSOUND = true
416
			SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
417
		end
418
		EFFECT.Color = COLOR
419
		local MSH = nil
420
		if TYPE == "Sphere" then
421
			MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
422
		elseif TYPE == "Block" or TYPE == "Box" then
423
			MSH = IT("BlockMesh",EFFECT)
424
			MSH.Scale = SIZE
425
		elseif TYPE == "Wave" then
426
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
427
		elseif TYPE == "Ring" then
428
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
429
		elseif TYPE == "Slash" then
430
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
431
		elseif TYPE == "Round Slash" then
432
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
433
		elseif TYPE == "Swirl" then
434
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
435
		elseif TYPE == "Skull" then
436
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
437
		elseif TYPE == "Crystal" then
438
			MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
439
		end
440
		if MSH ~= nil then
441
			local MOVESPEED = nil
442
			if MOVEDIRECTION ~= nil then
443
				MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
444
			end
445
			local GROWTH = SIZE - ENDSIZE
446
			local TRANS = TRANSPARENCY - ENDTRANSPARENCY
447
			if TYPE == "Block" then
448
				EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
449
			else
450
				EFFECT.CFrame = CFRAME
451
			end
452
			for LOOP = 1, TIME+1 do
453
				Swait()
454
				MSH.Scale = MSH.Scale - GROWTH/TIME
455
				if TYPE == "Wave" then
456
					MSH.Offset = VT(0,0,-MSH.Scale.X/8)
457
				end
458
				EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
459
				if TYPE == "Block" then
460
					EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
461
				else
462
					EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
463
				end
464
				if MOVEDIRECTION ~= nil then
465
					local ORI = EFFECT.Orientation
466
					EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
467
					EFFECT.Orientation = ORI
468
				end
469
			end
470
			if PLAYSSOUND == false then
471
				EFFECT:remove()
472
			else
473
				repeat wait(1) until SOUND.Playing == false
474
				EFFECT:remove()
475
			end
476
		else
477
			if PLAYSSOUND == false then
478
				EFFECT:remove()
479
			else
480
				repeat Swait() until SOUND.Playing == false
481
				EFFECT:remove()
482
			end
483
		end
484
	end))
485
end
486
487
function MakeForm(PART,TYPE)
488
	if TYPE == "Cyl" then
489
		local MSH = IT("CylinderMesh",PART)
490
	elseif TYPE == "Ball" then
491
		local MSH = IT("SpecialMesh",PART)
492
		MSH.MeshType = "Sphere"
493
	elseif TYPE == "Wedge" then
494
		local MSH = IT("SpecialMesh",PART)
495
		MSH.MeshType = "Wedge"
496
	end
497
end
498
499
Debris = game:GetService("Debris")
500
501
function CastProperRay(StartPos, EndPos, Distance, Ignore)
502
	local DIRECTION = CF(StartPos,EndPos).lookVector
503
	return Raycast(StartPos, DIRECTION, Distance, Ignore)
504
end
505
506
local HATWELD = nil
507
function Pose(WhichPose,Speed,Time,Magic,Gyro,Tors)
508
	PLAYMAINANIM = false
509
	if WhichPose == "Cast1" then
510
		for i=0, Time, 0.1 / Animation_Speed do
511
			Swait()
512
			if Magic == true then
513
				WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Lavender".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
514
			end
515
			if Gyro ~= nil and Gyro ~= false then
516
				Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
517
			end
518
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(35)), Speed / Animation_Speed)
519
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-35)), Speed / Animation_Speed)
520
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(125), RAD(0), RAD(45)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
521
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
522
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
523
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
524
		end
525
	elseif WhichPose == "Cast2" then
526
		for i=0, Time, 0.1 / Animation_Speed do
527
			Swait()
528
			if Magic == true then
529
				WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Lavender".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
530
				WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = LeftArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Lavender".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
531
			end
532
			if Gyro ~= nil and Gyro ~= false then
533
				Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
534
			end
535
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed)
536
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-15 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(0)), Speed / Animation_Speed)
537
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(120), RAD(0), RAD(15)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
538
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(120), RAD(0), RAD(-15)) * LEFTSHOULDERC0, Speed / Animation_Speed)
539
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
540
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
541
		end
542
	elseif WhichPose == "RightArmUp" then
543
		for i=0, Time, 0.1 / Animation_Speed do
544
			Swait()
545
			if Magic == true then
546
				WACKYEFFECT({Time = 15, EffectType = "Crystal", Size = VT(1,1,1)*1.5, Size2 = VT(0,4,0), Transparency = 0, Transparency2 = 1, CFrame = RightArm.CFrame*CF(0,-1,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Glass", Color = BRICKC"Lavender".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
547
			end
548
			if Gyro ~= nil and Gyro ~= false then
549
				Gyro.cframe = CF(RootPart.Position,Mouse.Hit.p)
550
			end
551
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(15)), Speed / Animation_Speed)
552
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-15)), Speed / Animation_Speed)
553
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.65 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.2) * ANGLES(RAD(125), RAD(0), RAD(25)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
554
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
555
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
556
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
557
		end
558
	elseif WhichPose == "Taunt" then
559
		for i=0, Time, 0.1 / Animation_Speed do
560
			Swait()
561
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed)
562
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(0)), Speed / Animation_Speed)
563
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.5) * ANGLES(RAD(175), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
564
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
565
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
566
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
567
		end
568
		HATWELD.Part0 = RightArm
569
		HATWELD.C0 = CF(0,-1.1,-0.4) * ANGLES(RAD(0), RAD(0), RAD(180)) * ANGLES(RAD(-20), RAD(0), RAD(0))
570
		CreateSound(221057812,Torso,10,1,false)
571
		for i=0, Time*2, 0.1 / Animation_Speed do
572
			Swait()
573
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed)
574
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(35 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(0)), Speed / Animation_Speed)
575
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(145), RAD(0), RAD(45)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
576
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(5), RAD(25), RAD(-15)) * LEFTSHOULDERC0, Speed / Animation_Speed)
577
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
578
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
579
		end
580
		for i=0, Time, 0.1 / Animation_Speed do
581
			Swait()
582
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), Speed / Animation_Speed)
583
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5), RAD(0), RAD(0)), Speed / Animation_Speed)
584
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.65, -0.5) * ANGLES(RAD(175), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
585
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
586
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
587
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
588
			HATWELD.C0 = Clerp(HATWELD.C0, CF(-0.5,-1.2,-0.3) * ANGLES(RAD(0), RAD(0), RAD(180)) * ANGLES(RAD(35), RAD(0), RAD(35)), Speed / Animation_Speed)
589
		end
590
		HATWELD.Part0 = Head
591
		HATWELD.C0 = CF(0,0.35,0)
592
	elseif WhichPose == "Prepare key" then
593
		for i=0, Time, 0.1 / Animation_Speed do
594
			Swait()
595
			if Gyro ~= nil and Gyro ~= false then
596
				Gyro.cframe = CF(RootPart.Position,Tors.Position)
597
			end
598
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(65)), Speed / Animation_Speed)
599
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-65)), Speed / Animation_Speed)
600
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.25) * ANGLES(RAD(90), RAD(0), RAD(65)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
601
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
602
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
603
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
604
		end
605
	elseif WhichPose == "Turn key" then
606
		for i=0, Time, 0.1 / Animation_Speed do
607
			Swait()
608
			if Gyro ~= nil and Gyro ~= false then
609
				Gyro.cframe = CF(RootPart.Position,Tors.Position)
610
			end
611
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(75)), Speed / Animation_Speed)
612
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(-75)), Speed / Animation_Speed)
613
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), -0.25) * ANGLES(RAD(90), RAD(0), RAD(75)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * RIGHTSHOULDERC0, Speed / Animation_Speed)
614
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, Speed / Animation_Speed)
615
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), Speed / Animation_Speed)
616
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), Speed / Animation_Speed)
617
		end
618
	end
619
	PLAYMAINANIM = true
620
end
621
622
--Lightning({Color = C3(1,1,1), Start = Torso.Position, End = Mouse.Hit.p, SegmentL = 2, Thickness = 0.1, DoesFade = false, Ignore = Character, MaxDist = 400, Branches = false})
623
function Lightning(Table)
624
	local Color = Table.Color or C3(1,1,1)
625
	local StartPos = Table.Start or Torso.Position
626
	local EndPos = Table.End or Mouse.Hit.p
627
	local SegmentLength = Table.SegmentL or 2
628
	local Thickness = Table.Thickness or 0.1
629
	local Dissapear = Table.DoesFade or false
630
	local Parent = Table.Ignore or Character
631
	local MaxDist = Table.MaxDist or 400
632
	local Branches = Table.Branches or false
633
	local HIT,HITPOS = CastProperRay(StartPos, EndPos, MaxDist, Parent)
634
	local DISTANCE = math.ceil((StartPos - HITPOS).Magnitude/SegmentLength)
635
	local LIGHTNINGMODEL = IT("Model",Effects)
636
	LIGHTNINGMODEL.Name = "Lightning"
637
	local LastBolt = nil
638
	for E = 1, DISTANCE do
639
		local ExtraSize = (DISTANCE-E)/15
640
		local PART = CreatePart(3, LIGHTNINGMODEL, "Neon", 0, 0, BRICKC("Pearl"), "LightningPart"..E, VT(Thickness+ExtraSize,SegmentLength,Thickness+ExtraSize))
641
		PART.Color = Color
642
		MakeForm(PART,"Cyl")
643
		if LastBolt == nil then
644
			PART.CFrame = CF(StartPos,HITPOS)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
645
		else
646
			PART.CFrame = CF(LastBolt.CFrame*CF(0,-LastBolt.Size.Y/2,0).p,CF(HITPOS)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))*CF(0,0,SegmentLength/3+(DISTANCE-E)).p)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
647
		end
648
		LastBolt = PART
649
		if Branches == true then
650
			local CHOICE = MRANDOM(1,7+((DISTANCE-E)*2))
651
			if CHOICE == 1 then
652
				local LASTBRANCH = nil
653
				for i = 1, MRANDOM(2,5) do
654
					local ExtraSize2 = ((DISTANCE-E)/25)/i
655
					local PART = CreatePart(3, LIGHTNINGMODEL, "Neon", 0, 0, BRICKC("Pearl"), "Branch"..E.."-"..i, VT(Thickness+ExtraSize2,SegmentLength,Thickness+ExtraSize2))
656
					PART.Color = Color
657
					MakeForm(PART,"Cyl")
658
					if LASTBRANCH == nil then
659
						PART.CFrame = CF(LastBolt.CFrame*CF(0,-LastBolt.Size.Y/2,0).p,LastBolt.CFrame*CF(0,-LastBolt.Size.Y/2,0)*ANGLES(RAD(0),RAD(0),RAD(MRANDOM(0,360)))*CF(0,Thickness*7,0)*CF(0,0,-1).p)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
660
					else
661
						PART.CFrame = CF(LASTBRANCH.CFrame*CF(0,-LASTBRANCH.Size.Y/2,0).p,LASTBRANCH.CFrame*CF(0,-LASTBRANCH.Size.Y/2,0)*ANGLES(RAD(0),RAD(0),RAD(MRANDOM(0,360)))*CF(0,Thickness*3,0)*CF(0,0,-1).p)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0)
662
					end
663
					LASTBRANCH = PART
664
				end
665
			end
666
		end
667
	end
668
	if Dissapear == true then
669
		coroutine.resume(coroutine.create(function()
670
			for i = 1, 10 do
671
				Swait()
672
				for _, c in pairs(LIGHTNINGMODEL:GetChildren()) do
673
					if c.ClassName == "Part" then
674
						c.Transparency = i/10
675
					end
676
				end
677
			end
678
			LIGHTNINGMODEL:remove()
679
		end))
680
	elseif Dissapear == false then
681
		Debris:AddItem(LIGHTNINGMODEL,0.1)
682
	end
683
	return {End = LastBolt.CFrame*CF(0,0,-LastBolt.Size.Z/2).p,LastBolt = LastBolt,Model = LIGHTNINGMODEL}
684
end
685
686
--//=================================\\
687
--||	     WEAPON CREATION
688
--\\=================================//
689
690
for i = 1, 15 do
691
	local FACE = CreatePart(3, Character, "Fabric", 0, 0+(i-1)/15.2, "Dark stone grey", "FaceGradient", VT(1.01,0.58,1.01),false)
692
	FACE.Color = C3(0,0,0)
693
	Head:FindFirstChildOfClass("SpecialMesh"):Clone().Parent = FACE
694
	CreateWeldOrSnapOrMotor("Weld", Head, Head, FACE, CF(0,0.35-(i-1)/35,0), CF(0, 0, 0))
695
end
696
local HAT1 = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(2,0.2,2),false)
697
MakeForm(HAT1,"Cyl")
698
HATWELD = CreateWeldOrSnapOrMotor("Weld", Head, Head, HAT1, CF(0,0.35,0), CF(0, 0, 0))
699
local BELT = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(2.01,0.15,2.01),false)
700
BELT.Color = C3(15/255,15/255,15/255)
701
MakeForm(BELT,"Cyl")
702
CreateWeldOrSnapOrMotor("Weld", HAT1, HAT1, BELT, CF(0,0,0), CF(0, 0, 0))
703
local HAT2 = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(1.3,2.2,1.3),false)
704
MakeForm(HAT2,"Cyl")
705
CreateWeldOrSnapOrMotor("Weld", HAT1, HAT1, HAT2, CF(0,1.1,0), CF(0, 0, 0))
706
local BELT = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(1.31,0.2,1.31),false)
707
BELT.Color = C3(15/255,15/255,15/255)
708
MakeForm(BELT,"Cyl")
709
CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, BELT, CF(0,0,0), CF(0, 0, 0))
710
local GEM = CreatePart(3, Character, "Neon", 0, 0, "Lavender", "Gem", VT(0.25,0.25,0.1),false)
711
MakeForm(GEM,"Ball")
712
CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, GEM, CF(0,0,-BELT.Size.X/2), CF(0, 0, 0))
713
local GEM = CreatePart(3, Character, "Neon", 0, 0, "Lavender", "Gem", VT(0.25,0.25,0.1),false)
714
MakeForm(GEM,"Ball")
715
CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, GEM, CF(0,0,BELT.Size.X/2), CF(0, 0, 0))
716
local GEM = CreatePart(3, Character, "Neon", 0, 0, "Lavender", "Gem", VT(0.1,0.25,0.25),false)
717
MakeForm(GEM,"Ball")
718
CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, GEM, CF(-BELT.Size.X/2,0,0), CF(0, 0, 0))
719
local GEM = CreatePart(3, Character, "Neon", 0, 0, "Lavender", "Gem", VT(0.1,0.25,0.25),false)
720
MakeForm(GEM,"Ball")
721
CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, GEM, CF(BELT.Size.X/2,0,0), CF(0, 0, 0))
722
local BELT = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(1.31,0.1,1.31),false)
723
BELT.Color = C3(15/255,15/255,15/255)
724
MakeForm(BELT,"Cyl")
725
CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, BELT, CF(0,0.7,0), CF(0, 0, 0))
726
local BELT = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(1.31,0.1,1.31),false)
727
BELT.Color = C3(15/255,15/255,15/255)
728
MakeForm(BELT,"Cyl")
729
CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, BELT, CF(0,-0.7,0), CF(0, 0, 0))
730
local BELT = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(1.31,0.1,1.31),false)
731
BELT.Color = C3(15/255,15/255,15/255)
732
MakeForm(BELT,"Cyl")
733
CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, BELT, CF(0,0.35,0), CF(0, 0, 0))
734
local BELT = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(1.31,0.1,1.31),false)
735
BELT.Color = C3(15/255,15/255,15/255)
736
MakeForm(BELT,"Cyl")
737
CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, BELT, CF(0,-0.35,0), CF(0, 0, 0))
738
local BELT = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Hat", VT(1.3,0.5,1.3),false)
739
MakeForm(BELT,"Ball")
740
CreateWeldOrSnapOrMotor("Weld", HAT2, HAT2, BELT, CF(0,HAT2.Size.Y/2,0), CF(0, 0, 0))
741
Humanoid.DisplayDistanceType = "None"
742
local naeeym2 = IT("BillboardGui",Character)
743
naeeym2.AlwaysOnTop = true
744
naeeym2.Size = UDim2.new(5,35,2,15)
745
naeeym2.StudsOffset = Vector3.new(0,3,0)
746
naeeym2.MaxDistance = 75
747
naeeym2.Adornee = Character.Head
748
naeeym2.Name = "Name"
749
naeeym2.PlayerToHideFrom = Player
750
local tecks2 = IT("TextLabel",naeeym2)
751
tecks2.BackgroundTransparency = 1
752
tecks2.TextScaled = true
753
tecks2.BorderSizePixel = 0
754
tecks2.Text = "The Warden"
755
tecks2.Font = "Bodoni"
756
tecks2.TextSize = 30
757
tecks2.TextStrokeTransparency = 0.5
758
tecks2.TextColor3 = C3(0,0,0)
759
tecks2.TextStrokeColor3 = BRICKC"Lavender".Color
760
tecks2.Size = UDim2.new(1,0,0.5,0)
761
tecks2.Parent = naeeym2
762
local EYE = CreatePart(3, Character, "Neon", 0, 0, "Lilac", "FaceGradient", VT(0.15,0.15,0.15),false)
763
MakeForm(EYE,"Ball")
764
CreateWeldOrSnapOrMotor("Weld", Head, Head, EYE, CF(0.15,0.22,-0.55), CF(0, 0, 0))
765
local EYE = CreatePart(3, Character, "Neon", 0, 0, "Lilac", "FaceGradient", VT(0.05,0.14,0.05),false)
766
EYE.Color = C3(0,0,0)
767
MakeForm(EYE,"Ball")
768
CreateWeldOrSnapOrMotor("Weld", Head, Head, EYE, CF(0.15,0.22,-0.6), CF(0, 0, 0))
769
local top = Instance.new("Shirt")
770
top.ShirtTemplate = "rbxassetid://676428254"
771
top.Parent = Character
772
top.Name = "Cloth"
773
local bottom = Instance.new("Pants")
774
bottom.PantsTemplate = "rbxassetid://676428351"
775
bottom.Parent = Character
776
bottom.Name = "Cloth"
777
for _, c in pairs(Character:GetChildren()) do
778
	if c.ClassName == "Part" and c.Name ~= "FaceGradient" and c.Name ~= "Hat" and c.Name ~= "Gem" then
779
		c.Material = "Neon"
780
		if c:FindFirstChildOfClass("ParticleEmitter") then
781
			c:FindFirstChildOfClass("ParticleEmitter"):remove()
782
		end
783
		c.Color = C3(1,1,1)
784
		if c == Head then
785
			if c:FindFirstChild("face") then
786
				c.face:remove()
787
			end
788
		end
789
	elseif c.ClassName == "CharacterMesh" or c.ClassName == "Accessory" or c.ClassName == "Hat" or c.Name == "Body Colors" then
790
		c:remove()
791
	elseif (c.ClassName == "Shirt" or c.ClassName == "Pants") and c.Name ~= "Cloth" then
792
		c:remove()
793
	end
794
end
795
local BODY = {}
796
for _, c in pairs(Character:GetDescendants()) do
797
	if c:IsA("BasePart") and c.Name ~= "Handle" then
798
		if c ~= RootPart and c ~= Torso and c ~= Head and c ~= RightArm and c ~= LeftArm and c ~= RightLeg and c ~= LeftLeg then
799
			c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
800
		end
801
		table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency})
802
	elseif c:IsA("JointInstance") then
803
		table.insert(BODY,{c,c.Parent,nil,nil,nil})
804
	end
805
end
806
for e = 1, #BODY do
807
	if BODY[e] ~= nil then
808
		local STUFF = BODY[e]
809
		local PART = STUFF[1]
810
		local PARENT = STUFF[2]
811
		local MATERIAL = STUFF[3]
812
		local COLOR = STUFF[4]
813
		local TRANSPARENCY = STUFF[5]
814
		if PART.ClassName == "Part" and PART ~= RootPart then
815
			PART.Material = MATERIAL
816
			PART.Color = COLOR
817
			PART.Transparency = TRANSPARENCY
818
		end
819
		PART.AncestryChanged:Connect(function()
820
			PART.Parent = PARENT
821
		end)
822
	end
823
end
824
function refit()
825
	Character.Parent = workspace
826
	for e = 1, #BODY do
827
		if BODY[e] ~= nil then
828
			local STUFF = BODY[e]
829
			local PART = STUFF[1]
830
			local PARENT = STUFF[2]
831
			local MATERIAL = STUFF[3]
832
			local COLOR = STUFF[4]
833
			local TRANSPARENCY = STUFF[5]
834
			if PART.ClassName == "Part" and PART ~= RootPart then
835
				PART.Material = MATERIAL
836
				PART.Color = COLOR
837
				PART.Transparency = TRANSPARENCY
838
			end
839
			if PART.Parent ~= PARENT then
840
				Humanoid:remove()
841
				PART.Parent = PARENT
842
				Humanoid = IT("Humanoid",Character)
843
			end
844
		end
845
	end
846
end
847
local SKILLTEXTCOLOR = BRICKC"Lavender".Color
848
local SKILLFONT = "Bodoni"
849
local SKILLTEXTSIZE = 7
850
851
Humanoid.Died:connect(function()
852
	refit()
853
end)
854
855
local SKILL1FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.23, 0, 0.80, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
856
local SKILL2FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.50, 0, 0.80, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
857
local SKILL3FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.23, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame")
858
local SKILL4FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.50, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
859
local SKILL5FRAME = CreateFrame(WEAPONGUI, 0.75, 2, UD2(0.365, 0, 0.70, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 5 Frame")
860
861
local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] Warden Zap", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 1")
862
local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B] Warden Thunder", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 2")
863
local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Inferno Ring", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 3")
864
local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V] Warden Wall", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 4")
865
local SKILL5TEXT = CreateLabel(SKILL5FRAME, "[X] Prison Key", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 5")
866
867
--//=================================\\
868
--||			DAMAGING
869
--\\=================================//
870
871
function ApplyAoE(POSITION,RANGE,FLING,BURN)
872
	local CHILDREN = workspace:GetDescendants()
873
	for index, CHILD in pairs(CHILDREN) do
874
		if CHILD.ClassName == "Model" and CHILD ~= Character then
875
			local HUM = CHILD:FindFirstChildOfClass("Humanoid")
876
			if HUM then
877
				local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso")
878
				if TORSO then
879
					if HUM.Health > 0 and (TORSO.Position - POSITION).Magnitude <= RANGE then
880
						CHILD:BreakJoints()
881
						if FLING ~= 0 then
882
							for _, c in pairs(CHILD:GetChildren()) do
883
								if c:IsA("BasePart") and c.Transparency == 0 then
884
									if BURN == true then
885
										Fire(c)
886
									end
887
									local bv = Instance.new("BodyVelocity") 
888
									bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
889
									bv.velocity = CF(POSITION,TORSO.Position).lookVector*FLING
890
									bv.Parent = c
891
									Debris:AddItem(bv,0.05)
892
								end
893
							end
894
						end
895
					end
896
				end
897
			end
898
		end
899
	end
900
end
901
902
--//=================================\\
903
--||	ATTACK FUNCTIONS AND STUFF
904
--\\=================================//
905
906
function Warden_Zap()
907
	ATTACK = true
908
	Rooted = false
909
	local GYRO = IT("BodyGyro",RootPart)
910
	GYRO.D = 750
911
	GYRO.P = 20000
912
	GYRO.MaxTorque = VT(0,40000000,0)
913
	CreateSound(348663022,RightArm,1.5,2,false)
914
	Pose("Cast1",0.8,1,true,GYRO)
915
	local LightningTable = Lightning({Color = SKILLTEXTCOLOR, Start = RightArm.CFrame*CF(0,-1,0).p, End = Mouse.Hit.p, SegmentL = 2, Thickness = 0.2, DoesFade = true, Ignore = Character, MaxDist = 100, Branches = false})
916
	local Hitpos = LightningTable.End
917
	ApplyAoE(Hitpos,10,35)
918
	WACKYEFFECT({Time = 15, EffectType = "Sphere", Size = VT(1,1,1), Size2 = VT(1,1,1)*15, Transparency = 0, Transparency2 = 1, CFrame = CF(Hitpos)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Lavender".Color, SoundID = BOLTSOUNDS[MRANDOM(1,#BOLTSOUNDS)], SoundPitch = MRANDOM(8,12)/10, SoundVolume = 5})
919
	for i = 1, 4 do
920
		WACKYEFFECT({Time = 15, EffectType = "Sphere", Size = VT(1,1,1), Size2 = VT(0,45,0), Transparency = 0, Transparency2 = 1, CFrame = CF(Hitpos)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Lavender".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
921
	end
922
	Pose("Cast1",0.8,1,true)
923
	GYRO:remove()
924
	ATTACK = false
925
	Rooted = false
926
end
927
928
function Warden_Thunder()
929
	ATTACK = true
930
	Rooted = false
931
	local GYRO = IT("BodyGyro",RootPart)
932
	GYRO.D = 750
933
	GYRO.P = 20000
934
	GYRO.MaxTorque = VT(0,40000000,0)
935
	CreateSound(469345336,Torso,3,2,false)
936
	Pose("Cast2",1.5,2,true,GYRO)
937
	coroutine.resume(coroutine.create(function()
938
		local FRAME = RootPart.CFrame
939
		for i = 1, 25 do
940
			local POS = FRAME*CF(MRANDOM(-17,17),0,-i*15)
941
			local LightningTable = Lightning({Color = SKILLTEXTCOLOR, Start = POS*CF(0,85,0).p, End = POS*CF(0,-15,0).p, SegmentL = 3, Thickness = 0.4, DoesFade = true, Ignore = Character, MaxDist = 400, Branches = true})
942
			local Hitpos = LightningTable.End
943
			ApplyAoE(Hitpos,20,15)
944
			WACKYEFFECT({Time = 15, EffectType = "Sphere", Size = VT(1,1,1), Size2 = VT(1,1,1)*15, Transparency = 0, Transparency2 = 1, CFrame = CF(Hitpos)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Lavender".Color, SoundID = BOLTSOUNDS[MRANDOM(1,#BOLTSOUNDS)], SoundPitch = MRANDOM(8,12)/10, SoundVolume = 5})
945
			for i = 1, 4 do
946
				WACKYEFFECT({Time = 15, EffectType = "Sphere", Size = VT(1,1,1), Size2 = VT(0,75,0), Transparency = 0, Transparency2 = 1, CFrame = CF(Hitpos)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Lavender".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
947
			end
948
			wait(0.05)
949
		end
950
	end))
951
	Pose("Cast2",1.5,0.7,true)
952
	GYRO:remove()
953
	ATTACK = false
954
	Rooted = false
955
end
956
957
function Inferno_Ring()
958
	ATTACK = true
959
	Rooted = false
960
	local GYRO = IT("BodyGyro",RootPart)
961
	GYRO.D = 750
962
	GYRO.P = 20000
963
	GYRO.MaxTorque = VT(0,40000000,0)
964
	local FIRE = IT("Model",Effects)
965
	FIRE.Name = "Fire"
966
	local MAIN = CreatePart(3, FIRE, "Neon", 0, 1, "Lavender", "Center", VT(0,0,0))
967
	FIRE.PrimaryPart = MAIN
968
	local FIRES = {}
969
	for i = 1, 45 do
970
		local PRT = CreatePart(3, FIRE, "Neon", 0, 1, "Lavender", "RingPart", VT(3,3,3))
971
		PRT.CFrame = MAIN.CFrame*ANGLES(RAD(0),RAD((360/45)*i),RAD(0))*CF(0,0,20)
972
		local F = Fire(PRT)
973
		table.insert(FIRES,F)
974
	end
975
	repeat
976
		FIRE:SetPrimaryPartCFrame(CF(Mouse.Hit.p))
977
		Pose("Cast1",1.5,0.01,false,GYRO)
978
	until HOLD == true
979
	coroutine.resume(coroutine.create(function()
980
		for i = 1, 4 do
981
			ApplyAoE(MAIN.Position,21,-15,true)
982
			CreateSound(463598785,MAIN,3,1,false)
983
			for E = 1, #FIRES do
984
				if FIRES[E] ~= nil then
985
					FIRES[E].Acceleration = VT(0,300,0)
986
					FIRES[E].Lifetime=NumberRange.new(0.35,1.5)
987
				end
988
			end
989
			wait(0.3)
990
		end
991
		for E = 1, #FIRES do
992
			if FIRES[E] ~= nil then
993
				FIRES[E].Enabled = false
994
			end
995
		end
996
		Debris:AddItem(FIRE,5)
997
	end))
998
	CreateSound(215395388,RightArm,3,2,false)
999
	Pose("RightArmUp",1.5,0.5,true)
1000
	GYRO:remove()
1001
	ATTACK = false
1002
	Rooted = false
1003
end
1004
1005
function Warden_Wall()
1006
	local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 8, Character)
1007
	if HITFLOOR ~= nil then
1008
		if HITFLOOR.Anchored == true then
1009
			local WALL = HITFLOOR:Clone()
1010
			WALL.Size = VT(45,45,5)
1011
			WALL.Parent = Effects
1012
			WALL.Name = "Wall"
1013
			WALL.CFrame = RootPart.CFrame*CF(0,-65/2.1,-5)*ANGLES(RAD(-15),RAD(0),RAD(0))
1014
			CreateSound(130972023,WALL,5,0.8,false)
1015
			ATTACK = true
1016
			Rooted = true
1017
			local HIT = WALL.Touched:Connect(function(hit)
1018
				if hit.Parent ~= Character then
1019
					hit:BreakJoints()
1020
				end
1021
			end)
1022
			coroutine.resume(coroutine.create(function()
1023
				WACKYEFFECT({Time = 35, EffectType = "Box", Size = WALL.Size, Size2 = WALL.Size*2, Transparency = 0, Transparency2 = 1, CFrame = WALL.CFrame, MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Lavender".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
1024
				for i = 1, 90 do
1025
					Swait()
1026
					WALL.CFrame = WALL.CFrame*CF(0,0.5,0)
1027
				end
1028
				HIT:disconnect()
1029
				wait(5)
1030
				for i = 1, 46 do
1031
					Swait()
1032
					WALL.CFrame = WALL.CFrame*CF(0,-1,0)
1033
				end
1034
				WALL:remove()
1035
			end))
1036
			Pose("RightArmUp",1.5,1.2,true)
1037
			ATTACK = false
1038
			Rooted = false
1039
		end
1040
	end
1041
end
1042
1043
function Prison_Key()
1044
	if Mouse.Target ~= nil then
1045
		if Mouse.Target.Parent ~= Character and Mouse.Target.Parent.Parent ~= Character and Mouse.Target.Parent:FindFirstChildOfClass("Humanoid") ~= nil then
1046
			local HUM = Mouse.Target.Parent:FindFirstChildOfClass("Humanoid")
1047
			local TORSO = HUM.Parent:FindFirstChild("Torso") or HUM.Parent:FindFirstChild("UpperTorso")
1048
			local GYRO = IT("BodyGyro",RootPart)
1049
			GYRO.D = 750
1050
			GYRO.P = 20000
1051
			GYRO.MaxTorque = VT(0,40000000,0)
1052
			local grav = Instance.new("BodyPosition",TORSO)
1053
			grav.D = 15
1054
			grav.P = 20000
1055
			grav.maxForce = Vector3.new(math.huge,math.huge,math.huge)
1056
			grav.position = TORSO.Position
1057
			local GYRO2 = IT("BodyGyro",TORSO)
1058
			GYRO2.D = 750
1059
			GYRO2.P = 20000
1060
			GYRO2.MaxTorque = VT(0,40000000,0)
1061
			GYRO2.cframe = CF(TORSO.Position,RootPart.Position)
1062
			grav.Name = "Jail"
1063
			local LOCKPARTS = {}
1064
			ATTACK = true
1065
			Rooted = false
1066
			local LOCK = IT("Model",Effects)
1067
			LOCK.Name = "Lock"
1068
			local LOCK2 = IT("Model",LOCK)
1069
			LOCK2.Name = "Metal"
1070
			--CREATE LOCK--
1071
				local BASE = CreatePart(3, LOCK, "Glass", 0, 0, "Gold", "Keylock", VT(3, 2.5, 1))
1072
				LOCK.PrimaryPart = BASE
1073
				BASE.CFrame = CF(TORSO.Position,RootPart.Position)*CF(0,0,-4)
1074
				local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "Gold", "Keylock", VT(3, 1, 3))
1075
				PRT.CFrame = BASE.CFrame*CF(0,-1.25,0)*ANGLES(RAD(90),RAD(0),RAD(0))
1076
				MakeForm(PRT,"Cyl")
1077
				local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "White", "Hole", VT(1, 1, 1))
1078
				PRT.Color = C3(0,0,0)
1079
				PRT.CFrame = BASE.CFrame*CF(0,0.3,-0.01)*ANGLES(RAD(90),RAD(0),RAD(0))
1080
				MakeForm(PRT,"Cyl")
1081
				local PRT = CreatePart(3, LOCK, "Glass", 0, 0, "White", "Hole", VT(0.5, 1, 1))
1082
				PRT.Color = C3(0,0,0)
1083
				PRT.CFrame = BASE.CFrame*CF(0,-0.2,-0.01)
1084
				for i = 1, 45 do
1085
					local PRT = CreatePart(3, LOCK2, "Glass", 0, 0, "Grey", "Keylock", VT(0.5, 0.5, 0.5))
1086
					PRT.CFrame = BASE.CFrame*CF(0,2,0)*ANGLES(RAD(0),RAD(0),RAD(-90+(360/90*i)))*CF(0,1,0)
1087
				end
1088
				local PRT = CreatePart(3, LOCK2, "Glass", 0, 0, "Grey", "Keylock", VT(0.5, 0.5, 0.5))
1089
				PRT.CFrame = BASE.CFrame*CF(0,1.5,0)*ANGLES(RAD(0),RAD(0),RAD(90))*CF(0,1,0)
1090
				LOCK2.PrimaryPart = PRT
1091
			---------------
1092
			local CHILDREN = LOCK:GetDescendants()
1093
			for index, CHILD in pairs(CHILDREN) do
1094
				if CHILD:IsA("BasePart") then
1095
					CHILD.Transparency = 1
1096
				end
1097
			end
1098
			for i = 1, 75 do
1099
				LOCK:SetPrimaryPartCFrame(CF(TORSO.Position,RootPart.Position)*CF(0,0,-4))
1100
				Swait()
1101
				GYRO2.cframe = CF(TORSO.Position,RootPart.Position)
1102
				GYRO.cframe = CF(RootPart.Position,TORSO.Position)
1103
				local CHILDREN = LOCK:GetDescendants()
1104
				for index, CHILD in pairs(CHILDREN) do
1105
					if CHILD:IsA("BasePart") then
1106
						CHILD.Transparency = CHILD.Transparency - 1/75
1107
					end
1108
				end
1109
			end
1110
			HUM.DisplayDistanceType = "None"
1111
			local KEY = IT("Model",Effects)
1112
			KEY.Name = "Key"
1113
			--CREATE KEY--
1114
				local KBASE = CreatePart(3, KEY, "Neon", 0, 0, "Lavender", "KeyBase", VT(0.1, 1, 0.1),false)
1115
				KEY.PrimaryPart = KBASE
1116
				KBASE.CFrame = RightArm.CFrame*CF(0,-2.1,0)*ANGLES(RAD(0),RAD(90),RAD(0))
1117
				local WLD = weldBetween(RightArm,KBASE)
1118
				for i = 1, 45 do
1119
					local PRT = CreatePart(3, KEY, "Neon", 0, 0, "Lavender", "Key", VT(0.1, 0.1, 0.1),false)
1120
					PRT.CFrame = KBASE.CFrame*CF(0,0.8,0)*ANGLES(RAD(0),RAD(0),RAD((360/45*i)))*CF(0,0.25,0)
1121
					weldBetween(KBASE,PRT)
1122
				end
1123
				local PRT = CreatePart(3, KEY, "Neon", 0, 0, "Lavender", "Key", VT(0.3, 0.1, 0.1),false)
1124
				PRT.CFrame = KBASE.CFrame*CF(-0.15,-0.45,0)
1125
				weldBetween(KBASE,PRT)
1126
				local PRT = CreatePart(3, KEY, "Neon", 0, 0, "Lavender", "Key", VT(0.3, 0.1, 0.1),false)
1127
				PRT.CFrame = KBASE.CFrame*CF(-0.15,-0.25,0)
1128
				weldBetween(KBASE,PRT)
1129
			--------------
1130
			Rooted = true
1131
			Pose("Prepare key",1.5,1.2,false,GYRO,TORSO)
1132
			coroutine.resume(coroutine.create(function()
1133
				for i = 1, 10 do
1134
					Swait()
1135
					GYRO2.cframe = CF(TORSO.Position,RootPart.Position)
1136
					GYRO.cframe = CF(RootPart.Position,TORSO.Position)
1137
				end
1138
				CreateSound(1149318312,BASE,5,1,false)
1139
				CreateSound(160772554,BASE,3,1,false)
1140
				LOCK2:SetPrimaryPartCFrame(BASE.CFrame*CF(0,0.8,0)*ANGLES(RAD(0),RAD(0),RAD(90))*CF(0,1,0))
1141
				for i = 1, 4 do
1142
					WACKYEFFECT({Time = 35, EffectType = "Crystal", Size = VT(1,1,1), Size2 = VT(0,15,0), Transparency = 0, Transparency2 = 1, CFrame = BASE.CFrame*CF(1,1.45,0)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Lavender".Color, SoundID = nil, SoundPitch = nil, SoundVolume = nil})
1143
				end
1144
				WACKYEFFECT({Time = 35, EffectType = "Sphere", Size = VT(0,0,0), Size2 = VT(1,1,1)*25, Transparency = 0, Transparency2 = 1, CFrame = TORSO.CFrame, MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Lavender".Color, SoundID = nil, SoundPitch = MRANDOM(8,12)/10, SoundVolume = 5})
1145
				wait(1)
1146
				TORSO.Parent.Parent = LOCK
1147
				for i = 1, 75 do
1148
					Swait()
1149
					local CHILDREN = KEY:GetDescendants()
1150
					for index, CHILD in pairs(CHILDREN) do
1151
						if CHILD:IsA("BasePart") then
1152
							CHILD.Transparency = i/25
1153
						end
1154
					end
1155
					local CHILDREN = LOCK:GetDescendants()
1156
					for index, CHILD in pairs(CHILDREN) do
1157
						if CHILD:IsA("BasePart") and CHILD.Name ~= "HumanoidRootPart" then
1158
							CHILD.Transparency = CHILD.Transparency + 1/75
1159
						elseif CHILD.ClassName == "Decal" then
1160
							CHILD.Transparency = CHILD.Transparency + 1/75
1161
						end
1162
					end
1163
				end
1164
				TORSO.Parent:ClearAllChildren()
1165
				KEY:remove()
1166
				LOCK:remove()
1167
			end))
1168
			Pose("Turn key",0.8,1.2,false,GYRO,TORSO)
1169
			GYRO:remove()
1170
			ATTACK = false
1171
			Rooted = false
1172
		end
1173
	end
1174
end
1175
1176
function Hat()
1177
	ATTACK = true
1178
	Rooted = false
1179
	Pose("Taunt",0.4,1.2,false)
1180
	ATTACK = false
1181
	Rooted = false
1182
end
1183
1184
--//=================================\\
1185
--||	  ASSIGN THINGS TO KEYS
1186
--\\=================================//
1187
1188
function MouseDown(Mouse)
1189
	HOLD = true
1190
	if ATTACK == false then
1191
	end
1192
end
1193
1194
function MouseUp(Mouse)
1195
HOLD = false
1196
end
1197
1198
function KeyDown(Key)
1199
	KEYHOLD = true
1200
	if Key == "z" and ATTACK == false then
1201
		Warden_Zap()
1202
	end
1203
1204
	if Key == "b" and ATTACK == false then
1205
		Warden_Thunder()
1206
	end
1207
1208
	if Key == "c" and ATTACK == false then
1209
		Inferno_Ring()
1210
	end
1211
1212
	if Key == "v" and ATTACK == false then
1213
		Warden_Wall()
1214
	end
1215
1216
	if Key == "x" and ATTACK == false then
1217
		Prison_Key()
1218
	end
1219
1220
	if Key == "t" and ATTACK == false then
1221
		Hat()
1222
	end
1223
end
1224
1225
function KeyUp(Key)
1226
	KEYHOLD = false
1227
end
1228
1229
	Mouse.Button1Down:connect(function(NEWKEY)
1230
		MouseDown(NEWKEY)
1231
	end)
1232
	Mouse.Button1Up:connect(function(NEWKEY)
1233
		MouseUp(NEWKEY)
1234
	end)
1235
	Mouse.KeyDown:connect(function(NEWKEY)
1236
		KeyDown(NEWKEY)
1237
	end)
1238
	Mouse.KeyUp:connect(function(NEWKEY)
1239
		KeyUp(NEWKEY)
1240
	end)
1241
1242
--//=================================\\
1243
--\\=================================//
1244
1245
1246
function unanchor()
1247
	if UNANCHOR == true then
1248
		g = Character:GetChildren()
1249
		for i = 1, #g do
1250
			if g[i].ClassName == "Part" then
1251
				g[i].Anchored = false
1252
			end
1253
		end
1254
	end
1255
end
1256
1257
1258
--//=================================\\
1259
--||	WRAP THE WHOLE SCRIPT UP
1260
--\\=================================//
1261
1262
Humanoid.Changed:connect(function(Jump)
1263
	if Jump == "Jump" and (Disable_Jump == true) then
1264
		Humanoid.Jump = false
1265
	end
1266
end)
1267
1268
while true do
1269
	Swait()
1270
	script.Parent = WEAPONGUI
1271
	Humanoid.Parent = Character
1272
	if Humanoid then
1273
		local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
1274
		IDLEANIMATION:Play()
1275
	end
1276
	if ANIMATE.Parent == Character then
1277
		ANIMATE:Destroy()
1278
	end
1279
	SINE = SINE + CHANGE
1280
	local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
1281
	local TORSOVERTICALVELOCITY = RootPart.Velocity.y
1282
	Humanoid.HipHeight = 1
1283
	Humanoid.Name = "Warden"
1284
	Humanoid.PlatformStand = false
1285
	if PLAYMAINANIM == true then
1286
		if TORSOVELOCITY < 1 then
1287
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1288
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1289
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(-45)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1290
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1291
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-15)), 0.15 / Animation_Speed)
1292
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1293
		elseif TORSOVELOCITY > 1 then
1294
			RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1295
			Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(10 - 6.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1296
			RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-35), RAD(0), RAD(-45)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
1297
			LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.15 * COS(SINE / 12) - 0.05 * COS(SINE / 12), 0.5) * ANGLES(RAD(-35), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
1298
			RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(-20)), 0.15 / Animation_Speed)
1299
			LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(10)), 0.15 / Animation_Speed)
1300
		end
1301
	end
1302
	unanchor()
1303
	Humanoid.MaxHealth = "inf"
1304
	Humanoid.Health = "inf"
1305
	if Rooted == false then
1306
		Disable_Jump = false
1307
		Humanoid.WalkSpeed = Speed
1308
	elseif Rooted == true then
1309
		Disable_Jump = true
1310
		Humanoid.WalkSpeed = 0
1311
	end
1312
	for _, c in pairs(Character:GetChildren()) do
1313
		if c.ClassName == "Part" and c.Name ~= "Eye" then
1314
			c.Material = "Neon"
1315
			if c:FindFirstChildOfClass("ParticleEmitter") then
1316
				c:FindFirstChildOfClass("ParticleEmitter"):remove()
1317
			end
1318
			c.Color = C3(1,1,1)
1319
			if c == Head then
1320
				if c:FindFirstChild("face") then
1321
					c.face:remove()
1322
				end
1323
			end
1324
		elseif c.ClassName == "CharacterMesh" or c.ClassName == "Accessory" or c.ClassName == "Hat" or c.Name == "Body Colors" then
1325
			c:remove()
1326
		elseif (c.ClassName == "Shirt" or c.ClassName == "Pants") and c.Name ~= "Cloth" then
1327
			c:remove()
1328
		end
1329
	end
1330
	sick.SoundId = "rbxassetid://1494340971"
1331
	sick.Looped = true
1332
	sick.Pitch = 1
1333
	sick.Volume = 3
1334
	sick:Resume()
1335
	sick.Parent = Torso
1336
	refit()
1337
	if Head:FindFirstChildOfClass("Sound") then
1338
		Head:FindFirstChildOfClass("Sound"):remove()
1339
	end
1340
end
1341
1342
--//=================================\\
1343
--\\=================================//
1344
1345
1346
1347
1348
1349
--//====================================================\\--
1350
--||			  		 END OF SCRIPT
1351
--\\====================================================//--