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