View difference between Paste ID: 6nXkaPAE and 0E6GLxGL
SHOW: | | - or go back to the newest paste.
1
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
2
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
3
local RealPlayer = Player
4
do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
5
6
7
local player = owner
8
local Cha = player.Character
9
local mouse = player:GetMouse()
10
local henshine = false
11
local RAC = Cha.Torso:WaitForChild("Right Shoulder")
12
local LAC = Cha.Torso:WaitForChild("Left Shoulder")
13
local RA = Cha:FindFirstChild("Right Arm")
14
local LA = Cha:FindFirstChild("Left Arm")
15
local Torso = Cha.Torso
16
local Head = Cha.Head
17
local RL = Cha:FindFirstChild("Right Leg")
18
local LL = Cha:FindFirstChild("Left Leg")
19
local Humanoid = Cha.Humanoid
20
21
function Driver()
22
23
local Driver = Instance.new("Part")
24
Driver.Parent = Cha.Torso
25
Driver.BrickColor = BrickColor.new("New Yeller")
26
Driver.CanCollide = false
27
Driver.Material = "Neon"
28
local weld = Instance.new("Weld")
29
weld.Part0 = Cha.Torso
30
weld.Part1 = Driver
31
weld.C1 = CFrame.new(0,0.7,0.1)
32
weld.Parent = Driver
33
local BeyondDriver = Instance.new("SpecialMesh")
34
BeyondDriver.MeshType = "FileMesh"
35
BeyondDriver.MeshId = "rbxassetid://3101785948"
36
BeyondDriver.Parent = Driver
37
local Black = Instance.new("Part")
38
Black.Parent = Cha.Torso
39
Black.BrickColor = BrickColor.new("Really black")
40
Black.CanCollide = false
41
Black.Material = "Neon"
42
local weld1 = Instance.new("Weld")
43
weld1.Part0 = Cha.Torso
44
weld1.Part1 = Black
45
weld1.C1 = CFrame.new(0.3,0.7,0.6)
46
weld1.Parent = Black
47
local E = Instance.new("SpecialMesh")
48
E.MeshType = "FileMesh"
49
E.MeshId = "rbxassetid://3101791766"
50
E.Parent = Black
51
local SongDriver = Instance.new("Sound")
52
SongDriver.Parent = Cha.Torso
53
SongDriver.SoundId = "rbxassetid://3096751301"
54
SongDriver.Volume = 15
55
SongDriver:Play()
56
wait(2.6)
57
SongDriver:Destroy()
58
59
end
60
61
local hen =  false
62
63
Driver()
64
65
function henshin()
66
local SongDriver1 = Instance.new("Sound")
67
SongDriver1.Parent = Cha.Torso
68
SongDriver1.SoundId = "rbxassetid://3096751301"
69
SongDriver1.Volume = 0
70
SongDriver1:Play()
71
wait(2.6)
72
SongDriver1.Volume = 15
73
wait(3.5)
74
local Watch1 = Instance.new("Part")
75
Watch1.Parent = Cha.Torso
76
Watch1.CFrame = Cha.Torso.CFrame*CFrame.new(0,4,5)
77
Watch1.BrickColor = BrickColor.new("New Yeller")
78
Watch1.CanCollide = false
79
Watch1.Material = "Neon"
80
Watch1.Anchored = true 
81
local Screen = Instance.new("Part")
82
Screen.Parent = Cha.Torso
83
Screen.CFrame = Cha.Torso.CFrame*CFrame.new(0,4,4.3)
84
Screen.BrickColor = BrickColor.new("White")
85
Screen.CanCollide = false
86
Screen.Material = "Neon"
87
Screen.Anchored = true 
88
Screen.Size = Vector3.new(7.84, 7.24, 0.05)
89
Screen.Transparency = 1
90
local E = Instance.new("Part")
91
E.Parent = Cha.Torso
92
E.CFrame = Cha.Torso.CFrame*CFrame.new(0,2,0)
93
E.Shape = "Cylinder"
94
E.BrickColor = BrickColor.new("New Yeller")
95
E.CanCollide = false
96
E.Material = "Neon"
97
E.Anchored = true 
98
E.Size = Vector3.new(19.06,19.06,19.06)
99
E.Transparency = 1
100
game:GetService('RunService').Stepped:Connect(function()
101
	E.CFrame = E.CFrame*CFrame.fromEulerAnglesXYZ(0,0,0.1)
102
end)
103
local ParticleEmitter0 = Instance.new("ParticleEmitter")
104
ParticleEmitter0.Name = "FireParticle"
105
ParticleEmitter0.Parent = E
106
ParticleEmitter0.Speed = NumberRange.new(0, 0)
107
ParticleEmitter0.Rotation = NumberRange.new(50, 50)
108
ParticleEmitter0.Color = ColorSequence.new(Color3.new(0.268666, 1, 0.254551),Color3.new(0.268666, 1, 0.254551))
109
ParticleEmitter0.LightEmission = 0.20000000298023
110
ParticleEmitter0.Texture = "rbxasset://textures/particles/explosion01_implosion_main.dds"
111
ParticleEmitter0.Size = NumberSequence.new(1.9999998807907,0.75,0.3846150636673,0)
112
ParticleEmitter0.EmissionDirection = Enum.NormalId.Front
113
ParticleEmitter0.Lifetime = NumberRange.new(1, 1)
114
ParticleEmitter0.LockedToPart = true
115
ParticleEmitter0.Rate = 200
116
ParticleEmitter0.RotSpeed = NumberRange.new(50, 50)
117
local Watch = Instance.new("SpecialMesh")
118
Watch.MeshType = "FileMesh"
119
Watch.MeshId = "rbxassetid://3096963282"
120
Watch.Parent = Watch1
121
Watch.Scale = Watch.Scale*Vector3.new(0.1,0.1,0,1)
122
local Gear1 = Instance.new("Part")
123
Gear1.Parent = Cha.Torso
124
Gear1.CFrame = Cha.Torso.CFrame*CFrame.new(-6,4,5)
125
Gear1.CanCollide = false
126
Gear1.Material = "Neon"
127
Gear1.Anchored = true 
128
local Gear = Instance.new("SpecialMesh")
129
Gear.MeshType = "FileMesh"
130
Gear.MeshId = "rbxassetid://3097437816"
131
Gear.Parent = Gear1
132
Gear.Scale = Vector3.new(0.1,0.1,0.1)
133
wait(0.5)
134
for i = 1, 10 do wait(0.1)
135
	Watch.Scale = Watch.Scale+Vector3.new(0.1,0.1,0.1)
136
	Gear.Scale = Gear.Scale+Vector3.new(0.1,0.1,0.1)
137
	Screen.Transparency = Screen.Transparency - 0.1
138
end
139
game:GetService('RunService').Stepped:Connect(function()
140
	Gear1.CFrame = Gear1.CFrame*CFrame.fromEulerAnglesXYZ(0.1,0,0)
141
end)
142
143
local walkspeed = Cha.Humanoid
144
walkspeed.WalkSpeed = 0
145
for i = 1,4 do wait(0.2)
146
	Screen.BrickColor = BrickColor.new("Really black")
147
	wait(1)
148
	Screen.BrickColor = BrickColor.new("Lily white")
149
	wait(1)
150
	Screen.BrickColor = BrickColor.new("Really black")
151
	wait(1)
152
	Screen.BrickColor = BrickColor.new("Lily white")
153
end
154
wait(3)
155
if Cha:FindFirstChild("Shirt") then
156
    Cha["Shirt"]:remove()
157
end
158
if Cha:FindFirstChild("Pants") then
159
    Cha["Pants"]:remove()
160
end
161
wait(2)
162
local shirt = Instance.new("Shirt",Cha)
163
shirt.ShirtTemplate = "rbxassetid://3101417338"
164
local pants = Instance.new("Pants",Cha)
165
pants.PantsTemplate = "rbxassetid://3101418478"
166
local walkspeed = Cha.Humanoid
167
local Effect1 = Instance.new("Part")
168
Effect1.Parent = Cha.Torso
169
Effect1.CFrame = Cha.Torso.CFrame
170
Effect1.BrickColor = BrickColor.new("New Yeller")
171
Effect1.CanCollide = false
172
Effect1.Material = "Neon"
173
Effect1.Anchored = true 
174
local Mesh1 = Instance.new("SpecialMesh")
175
Mesh1.MeshType = "FileMesh"
176
Mesh1.MeshId = "rbxassetid://3096884346"
177
Mesh1.Parent = Effect1
178
local Effect2 = Instance.new("Part")
179
Effect2.Parent = Cha.Torso
180
Effect2.BrickColor = BrickColor.new("New Yeller")
181
Effect2.CanCollide = false
182
Effect2.Material = "Neon"
183
Effect2.Anchored = true 
184
Effect2.CFrame = Cha.Torso.CFrame
185
local Mesh2 = Instance.new("SpecialMesh")
186
Mesh2.MeshType = "FileMesh"
187
Mesh2.MeshId = "rbxassetid://3096900577"
188
Mesh2.Parent = Effect2
189
local headr = Instance.new("SpecialMesh")
190
headr.MeshType = "FileMesh"
191
headr.MeshId = "rbxassetid://3463828892"
192
headr.Parent = Head
193
local minigear = Instance.new("SpecialMesh")
194
minigear.MeshType = "FileMesh"
195-
minigear.MeshId = "rbxassetid://3463828892"
195+
minigear.MeshId = "rbxassetid://3463834745"
196-
minigear.Parent = Blackhead
196+
minigear.Parent = geare
197-
local Blackhead = Instance.new("Part")
197+
local geare = Instance.new("Part")
198-
Blackhead.Parent = Head
198+
geare.Parent = Head
199-
Blackhead.BrickColor = BrickColor.new("New Yeller")
199+
geare.BrickColor = BrickColor.new("New Yeller")
200-
Blackhead.CanCollide = false
200+
geare.CanCollide = false
201
local weldhead1 = Instance.new("Weld")
202-
weldhead1.Part0 = Head
202+
weldhead1.Part0 = Blackhead
203-
weldhead1.Part1 = Blackhead
203+
weldhead1.Part1 = geare
204-
weldhead1.C1 = CFrame.new(-0.5,0,0.5)
204+
weldhead1.C0 = CFrame.new(-0.5,0,0.5)
205
weldhead1.Parent = Blackhead
206
game:GetService('RunService').Stepped:Connect(function()
207-
	Blackhead.CFrame = Blackhead.CFrame*CFrame.fromEulerAnglesXYZ(0.1,0,0)
207+
	geare.CFrame = geare.CFrame*CFrame.fromEulerAnglesXYZ(0.1,0,0)
208
end)
209
for e,a in pairs(Cha:children()) do
210
    if a:IsA("Accessory") then
211
        a:Destroy()
212
    end
213
end
214
hen =  true
215
 
216
Head.face:Destroy()
217
218
game:GetService('RunService').Stepped:Connect(function()
219
    Effect1.CFrame = Effect2.CFrame*CFrame.fromEulerAnglesXYZ(0,0.1,0)
220
    Effect2.CFrame = Effect2.CFrame*CFrame.fromEulerAnglesXYZ(0.1,0.1,0.1)
221
222
	  
223
end)
224
225
wait(9)
226
Effect2:Destroy()
227
Effect1:Destroy()
228
walkspeed.WalkSpeed = 16
229
Gear1:Destroy()
230
E:Destroy()
231
Watch1:Destroy()
232
Screen:Destroy()
233
234
local SongDriver15 = Instance.new("Sound")
235
SongDriver15.Parent = Cha.Torso
236
SongDriver15.SoundId = "rbxassetid://2300511834"
237
SongDriver15.Volume = 3
238
SongDriver15:Play()
239
Player = owner
240
Mouse = Player:GetMouse()
241
PlayerGui = Player.PlayerGui
242
Cam = workspace.CurrentCamera
243
Backpack = Player.Backpack
244
Character = Player.Character
245
Humanoid = Character.Humanoid
246
RootPart = Character["HumanoidRootPart"]
247
Torso = Character["Torso"]
248
Head = Character["Head"]
249
RightArm = Character["Right Arm"]
250
LeftArm = Character["Left Arm"]
251
RightLeg = Character["Right Leg"]
252
LeftLeg = Character["Left Leg"]
253
RootJoint = RootPart["RootJoint"]
254
Neck = Torso["Neck"]
255
RightShoulder = Torso["Right Shoulder"]
256
LeftShoulder = Torso["Left Shoulder"]
257
RightHip = Torso["Right Hip"]
258
LeftHip = Torso["Left Hip"]
259
local TIME = 0
260
local sick = Instance.new("Sound",Torso)
261
 
262
IT = Instance.new
263
CF = CFrame.new
264
VT = Vector3.new
265
RAD = math.rad
266
C3 = Color3.new
267
UD2 = UDim2.new
268
BRICKC = BrickColor.new
269
ANGLES = CFrame.Angles
270
EULER = CFrame.fromEulerAnglesXYZ
271
COS = math.cos
272
ACOS = math.acos
273
SIN = math.sin
274
ASIN = math.asin
275
ABS = math.abs
276
MRANDOM = math.random
277
FLOOR = math.floor
278
 
279
--//=================================\\
280
--||        Value shit things
281
--\\=================================//
282
 
283
Animation_Speed = 3
284
local FORCERESET = false
285
Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
286
local SIZE = 1
287
local Speed = 24
288
local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
289
local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
290
local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
291
local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
292
local DAMAGEMULTIPLIER = 1
293
local ANIM = "Idle"
294
local ATTACK = false
295
local EQUIPPED = false
296
local HOLD = false
297
local COMBO = 1
298
local Rooted = false
299
local SINE = 0
300
local KEYHOLD = false
301
local CHANGE = 2 / Animation_Speed
302
local WALKINGANIM = false
303
local VALUE1 = false
304
local VALUE2 = false
305
local ROBLOXIDLEANIMATION = IT("Animation")
306
ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
307
ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
308
--ROBLOXIDLEANIMATION.Parent = Humanoid
309
local WEAPONGUI = IT("ScreenGui", PlayerGui)
310
WEAPONGUI.Name = "BanishV3Gui"
311
local Weapon = IT("Model")
312
Weapon.Name = "Adds"
313
local Effects = IT("Folder", Weapon)
314
Effects.Name = "Effects"
315
local ANIMATOR = Humanoid.Animator
316
local ANIMATE = Character:FindFirstChild("Animate")
317
local UNANCHOR = true
318
local TOBANISH = {}
319
Player_Size = 1
320
local Mode = 1
321
local kan = Instance.new("Sound",Character)
322
kan.Volume = 0
323
kan.TimePosition = 0
324
kan.PlaybackSpeed = 1
325
kan.Pitch = 1
326
kan.SoundId = "rbxassetid://614032233"
327
kan.Name = "wrecked"
328
kan.Looped = true
329
kan:Play()
330
local currentThemePlaying = kan.SoundId
331
local currentPitch = kan.Pitch
332
local currentVol = kan.Volume
333
--//=================================\\
334
--\\=================================//
335
for i,v in pairs(Character:children()) do
336
    if v:IsA("Accessory") then
337
        v:Destroy()
338
    end
339
end
340
 
341
warn("CREATED BY AlmightyToast#6465")
342
warn("aka KrYn0MoRe or ShrekBenson")
343
warn("DOnt rEm0vE tH1s 0r uR gAy")
344
--//=================================\\
345
--|| SAZERENOS' ARTIFICIAL HEARTBEAT
346
--\\=================================//
347
 
348
ArtificialHB = Instance.new("BindableEvent", script)
349
ArtificialHB.Name = "ArtificialHB"
350
 
351
script:WaitForChild("ArtificialHB")
352
 
353
frame = Frame_Speed
354
tf = 0
355
allowframeloss = false
356
tossremainder = false
357
lastframe = tick()
358
script.ArtificialHB:Fire()
359
 
360
game:GetService("RunService").Heartbeat:connect(function(s, p)
361
    tf = tf + s
362
    if tf >= frame then
363
        if allowframeloss then
364
            script.ArtificialHB:Fire()
365
            lastframe = tick()
366
        else
367
            for i = 1, math.floor(tf / frame) do
368
                script.ArtificialHB:Fire()
369
            end
370
        lastframe = tick()
371
        end
372
        if tossremainder then
373
            tf = 0
374
        else
375
            tf = tf - frame * math.floor(tf / frame)
376
        end
377
    end
378
end)
379
 
380
--//=================================\\
381
--\\=================================//
382
 
383
--//=================================\\
384
--||          MOST FUNCTIONS
385
--\\=================================//
386
 
387
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
388
    return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
389
end
390
 
391
function PositiveAngle(NUMBER)
392
    if NUMBER >= 0 then
393
        NUMBER = 0
394
    end
395
    return NUMBER
396
end
397
 
398
function NegativeAngle(NUMBER)
399
    if NUMBER <= 0 then
400
        NUMBER = 0
401
    end
402
    return NUMBER
403
end
404
 
405
function Swait(NUMBER)
406
    if NUMBER == 0 or NUMBER == nil then
407
        ArtificialHB.Event:wait()
408
    else
409
        for i = 1, NUMBER do
410
            ArtificialHB.Event:wait()
411
        end
412
    end
413
end
414
 
415
function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
416
    local NEWMESH = IT(MESH)
417
    if MESH == "SpecialMesh" then
418
        NEWMESH.MeshType = MESHTYPE
419
        if MESHID ~= "nil" and MESHID ~= "" then
420
            NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
421
        end
422
        if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
423
            NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
424
        end
425
    end
426
    NEWMESH.Offset = OFFSET or VT(0, 0, 0)
427
    NEWMESH.Scale = SCALE
428
    NEWMESH.Parent = PARENT
429
    return NEWMESH
430
end
431
 
432
function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
433
    local NEWPART = IT("Part")
434
    NEWPART.formFactor = FORMFACTOR
435
    NEWPART.Reflectance = REFLECTANCE
436
    NEWPART.Transparency = TRANSPARENCY
437
    NEWPART.CanCollide = false
438
    NEWPART.Locked = true
439
    NEWPART.Anchored = true
440
    if ANCHOR == false then
441
        NEWPART.Anchored = false
442
    end
443
    NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
444
    NEWPART.Name = NAME
445
    NEWPART.Size = SIZE
446
    NEWPART.Position = Torso.Position
447
    NEWPART.Material = MATERIAL
448
    NEWPART:BreakJoints()
449
    NEWPART.Parent = PARENT
450
    return NEWPART
451
end
452
 
453
    local function weldBetween(a, b)
454
        local weldd = IT("Weld")
455
        weldd.Part0 = a
456
        weldd.Part1 = b
457
        weldd.C0 = CF()
458
        weldd.C1 = b.CFrame:inverse() * a.CFrame
459
        weldd.Parent = a
460
        return weldd
461
    end
462
 
463
 
464
function QuaternionFromCFrame(cf)
465
    local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
466
    local trace = m00 + m11 + m22
467
    if trace > 0 then
468
        local s = math.sqrt(1 + trace)
469
        local recip = 0.5 / s
470
        return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
471
    else
472
        local i = 0
473
        if m11 > m00 then
474
            i = 1
475
        end
476
        if m22 > (i == 0 and m00 or m11) then
477
            i = 2
478
        end
479
        if i == 0 then
480
            local s = math.sqrt(m00 - m11 - m22 + 1)
481
            local recip = 0.5 / s
482
            return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
483
        elseif i == 1 then
484
            local s = math.sqrt(m11 - m22 - m00 + 1)
485
            local recip = 0.5 / s
486
            return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
487
        elseif i == 2 then
488
            local s = math.sqrt(m22 - m00 - m11 + 1)
489
            local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
490
        end
491
    end
492
end
493
 
494
function QuaternionToCFrame(px, py, pz, x, y, z, w)
495
    local xs, ys, zs = x + x, y + y, z + z
496
    local wx, wy, wz = w * xs, w * ys, w * zs
497
    local xx = x * xs
498
    local xy = x * ys
499
    local xz = x * zs
500
    local yy = y * ys
501
    local yz = y * zs
502
    local zz = z * zs
503
    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))
504
end
505
 
506
function QuaternionSlerp(a, b, t)
507
    local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
508
    local startInterp, finishInterp;
509
    if cosTheta >= 0.0001 then
510
        if (1 - cosTheta) > 0.0001 then
511
            local theta = ACOS(cosTheta)
512
            local invSinTheta = 1 / SIN(theta)
513
            startInterp = SIN((1 - t) * theta) * invSinTheta
514
            finishInterp = SIN(t * theta) * invSinTheta
515
        else
516
            startInterp = 1 - t
517
            finishInterp = t
518
        end
519
    else
520
        if (1 + cosTheta) > 0.0001 then
521
            local theta = ACOS(-cosTheta)
522
            local invSinTheta = 1 / SIN(theta)
523
            startInterp = SIN((t - 1) * theta) * invSinTheta
524
            finishInterp = SIN(t * theta) * invSinTheta
525
        else
526
            startInterp = t - 1
527
            finishInterp = t
528
        end
529
    end
530
    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
531
end
532
 
533
function Clerp(a, b, t)
534
    local qa = {QuaternionFromCFrame(a)}
535
    local qb = {QuaternionFromCFrame(b)}
536
    local ax, ay, az = a.x, a.y, a.z
537
    local bx, by, bz = b.x, b.y, b.z
538
    local _t = 1 - t
539
    return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
540
end
541
 
542
function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
543
    local frame = IT("Frame")
544
    frame.BackgroundTransparency = TRANSPARENCY
545
    frame.BorderSizePixel = BORDERSIZEPIXEL
546
    frame.Position = POSITION
547
    frame.Size = SIZE
548
    frame.BackgroundColor3 = COLOR
549
    frame.BorderColor3 = BORDERCOLOR
550
    frame.Name = NAME
551
    frame.Parent = PARENT
552
    return frame
553
end
554
 
555
function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
556
    local label = IT("TextLabel")
557
    label.BackgroundTransparency = 1
558
    label.Size = UD2(1, 0, 1, 0)
559
    label.Position = UD2(0, 0, 0, 0)
560
    label.TextColor3 = TEXTCOLOR
561
    label.TextStrokeTransparency = STROKETRANSPARENCY
562
    label.TextTransparency = TRANSPARENCY
563
    label.FontSize = TEXTFONTSIZE
564
    label.Font = TEXTFONT
565
    label.BorderSizePixel = BORDERSIZEPIXEL
566
    label.TextScaled = false
567
    label.Text = TEXT
568
    label.Name = NAME
569
    label.Parent = PARENT
570
    return label
571
end
572
 
573
function NoOutlines(PART)
574
    PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
575
end
576
 
577
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
578
    local NEWWELD = IT(TYPE)
579
    NEWWELD.Part0 = PART0
580
    NEWWELD.Part1 = PART1
581
    NEWWELD.C0 = C0
582
    NEWWELD.C1 = C1
583
    NEWWELD.Parent = PARENT
584
    return NEWWELD
585
end
586
 
587
local S = IT("Sound")
588
function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
589
    local NEWSOUND = nil
590
    coroutine.resume(coroutine.create(function()
591
        NEWSOUND = S:Clone()
592
        NEWSOUND.Parent = PARENT
593
        NEWSOUND.Volume = VOLUME
594
        NEWSOUND.Pitch = PITCH
595
        NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
596
        NEWSOUND:play()
597
        if DOESLOOP == true then
598
            NEWSOUND.Looped = true
599
        else
600
            repeat wait(1) until NEWSOUND.Playing == false or NEWSOUND.Parent ~= PARENT
601
            NEWSOUND:remove()
602
        end
603
    end))
604
    return NEWSOUND
605
end
606
 
607
function CFrameFromTopBack(at, top, back)
608
    local right = top:Cross(back)
609
    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)
610
end
611
 
612
--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})
613
function WACKYEFFECT(Table)
614
    local TYPE = (Table.EffectType or "Sphere")
615
    local SIZE = (Table.Size or VT(1,1,1))
616
    local ENDSIZE = (Table.Size2 or VT(0,0,0))
617
    local TRANSPARENCY = (Table.Transparency or 0)
618
    local ENDTRANSPARENCY = (Table.Transparency2 or 1)
619
    local CFRAME = (Table.CFrame or Torso.CFrame)
620
    local MOVEDIRECTION = (Table.MoveToPos or nil)
621
    local ROTATION1 = (Table.RotationX or 0)
622
    local ROTATION2 = (Table.RotationY or 0)
623
    local ROTATION3 = (Table.RotationZ or 0)
624
    local MATERIAL = (Table.Material or "Neon")
625
    local COLOR = (Table.Color or C3(1,1,1))
626
    local TIME = (Table.Time or 45)
627
    local SOUNDID = (Table.SoundID or nil)
628
    local SOUNDPITCH = (Table.SoundPitch or nil)
629
    local SOUNDVOLUME = (Table.SoundVolume or nil)
630
    coroutine.resume(coroutine.create(function()
631
        local PLAYSSOUND = false
632
        local SOUND = nil
633
        local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
634
        if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
635
            PLAYSSOUND = true
636
            SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
637
        end
638
        EFFECT.Color = COLOR
639
        local MSH = nil
640
        if TYPE == "Sphere" then
641
            MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
642
        elseif TYPE == "Block" then
643
            MSH = IT("BlockMesh",EFFECT)
644
            MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
645
        elseif TYPE == "Wave" then
646
            MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
647
        elseif TYPE == "Ring" then
648
            MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
649
        elseif TYPE == "Slash" then
650
            MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
651
        elseif TYPE == "Round Slash" then
652
            MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
653
        elseif TYPE == "Swirl" then
654
            MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
655
        elseif TYPE == "Skull" then
656
            MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
657
        elseif TYPE == "Crystal" then
658
            MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
659
        end
660
        if MSH ~= nil then
661
            local MOVESPEED = nil
662
            if MOVEDIRECTION ~= nil then
663
                MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
664
            end
665
            local GROWTH = SIZE - ENDSIZE
666
            local TRANS = TRANSPARENCY - ENDTRANSPARENCY
667
            if TYPE == "Block" then
668
                EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
669
            else
670
                EFFECT.CFrame = CFRAME
671
            end
672
            for LOOP = 1, TIME+1 do
673
                Swait()
674
                MSH.Scale = MSH.Scale - GROWTH/TIME
675
                if TYPE == "Wave" then
676
                    MSH.Offset = VT(0,0,-MSH.Scale.X/8)
677
                end
678
                EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
679
                if TYPE == "Block" then
680
                    EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
681
                else
682
                    EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
683
                end
684
                if MOVEDIRECTION ~= nil then
685
                    local ORI = EFFECT.Orientation
686
                    EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
687
                    EFFECT.Orientation = ORI
688
                end
689
            end
690
            if PLAYSSOUND == false then
691
                EFFECT:remove()
692
            else
693
                SOUND.Stopped:Connect(function()
694
                    EFFECT:remove()
695
                end)
696
            end
697
        else
698
            if PLAYSSOUND == false then
699
                EFFECT:remove()
700
            else
701
                repeat Swait() until SOUND.Playing == false
702
                EFFECT:remove()
703
            end
704
        end
705
    end))
706
end
707
 
708
function MakeForm(PART,TYPE)
709
    if TYPE == "Cyl" then
710
        local MSH = IT("CylinderMesh",PART)
711
    elseif TYPE == "Ball" then
712
        local MSH = IT("SpecialMesh",PART)
713
        MSH.MeshType = "Sphere"
714
    elseif TYPE == "Wedge" then
715
        local MSH = IT("SpecialMesh",PART)
716
        MSH.MeshType = "Wedge"
717
    end
718
end
719
 
720
function SpawnTrail(FROM,TO,BIG)
721
    local TRAIL = CreatePart(3, Effects, "Neon", 0, 0.5, "New Yeller", "Trail", VT(0,0,0))
722
    MakeForm(TRAIL,"Cyl")
723
    local DIST = (FROM - TO).Magnitude
724
    if BIG == true then
725
        TRAIL.Size = VT(0.5,DIST,0.5)
726
    else
727
        TRAIL.Size = VT(0.25,DIST,0.25)
728
    end
729
    TRAIL.CFrame = CF(FROM, TO) * CF(0, 0, -DIST/2) * ANGLES(RAD(90),RAD(0),RAD(0))
730
    coroutine.resume(coroutine.create(function()
731
        for i = 1, 5 do
732
            Swait()
733
            TRAIL.Transparency = TRAIL.Transparency + 0.1
734
        end
735
        TRAIL:remove()
736
    end))
737
end
738
 
739
Debris = game:GetService("Debris")
740
 
741
function CastProperRay(StartPos, EndPos, Distance, Ignore)
742
    local DIRECTION = CF(StartPos,EndPos).lookVector
743
    return Raycast(StartPos, DIRECTION, Distance, Ignore)
744
end
745
 
746
function turnto(position)
747
    RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
748
end
749
local asd = Instance.new("ParticleEmitter")
750
asd.Color = ColorSequence.new(Color3.new(0.5, 0, 0), Color3.new(.3, 0, 0))
751
asd.LightEmission = .1
752
asd.Texture = "http://www.roblox.com/asset/?ID=291880914"
753
aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.6),NumberSequenceKeypoint.new(1, 2)})
754
bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)})
755
asd.Transparency = bbb
756
asd.Size = aaa
757
asd.ZOffset = .9
758
asd.Acceleration = Vector3.new(0, -15, 0)
759
asd.LockedToPart = false
760
asd.EmissionDirection = "Back"
761
asd.Lifetime = NumberRange.new(1, 2)
762
asd.Rotation = NumberRange.new(-100, 100)
763
asd.RotSpeed = NumberRange.new(-100, 100)
764
asd.Speed = NumberRange.new(10)
765
asd.Enabled = false
766
asd.VelocitySpread = 999
767
 
768
function getbloody(victim,amount)
769
    local PART = CreatePart(3, Effects, "Neon", 0, 1, "New Yeller", "Blood", victim.Size)
770
    PART.CFrame = victim.CFrame
771
    local HITPLAYERSOUNDS = {"356551938","264486467"}
772
    Debris:AddItem(PART,5)
773
    CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
774
    CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
775
    CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
776
    local prtcl = asd:Clone()
777
    prtcl.Parent = PART
778
    prtcl:Emit(amount*10)
779
end
780
 
781
local Particle = IT("ParticleEmitter",nil)
782
Particle.Enabled = false
783
Particle.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1),NumberSequenceKeypoint.new(0.3,0.95),NumberSequenceKeypoint.new(1,1)})
784
Particle.LightEmission = 0.5
785
Particle.Rate = 150
786
Particle.ZOffset = 1
787
Particle.Rotation = NumberRange.new(-180, 180)
788
Particle.RotSpeed = NumberRange.new(-180, 180)
789
Particle.Texture = "http://www.roblox.com/asset/?id=304437537"
790
Particle.Color = ColorSequence.new(C3(0,1,0),C3(0.4,0,0))
791
 
792
--ParticleEmitter({Speed = 5, Drag = 0, Size1 = 1, Size2 = 5, Lifetime1 = 1, Lifetime2 = 1.5, Parent = Torso, Emit = 100, Offset = 360, Enabled = false})
793
function ParticleEmitter(Table)
794
    local PRTCL = Particle:Clone()
795
    local Speed = Table.Speed or 5
796
    local Drag = Table.Drag or 0
797
    local Size1 = Table.Size1 or 1
798
    local Size2 = Table.Size2 or 5
799
    local Lifetime1 = Table.Lifetime1 or 1
800
    local Lifetime2 = Table.Lifetime2 or 1.5
801
    local Parent = Table.Parent or Torso
802
    local Emit = Table.Emit or 100
803
    local Offset = Table.Offset or 360
804
    local Acel = Table.Acel or VT(0,0,0)
805
    local Enabled = Table.Enabled or false
806
    PRTCL.Parent = Parent
807
    PRTCL.Size = NumberSequence.new(Size1,Size2)
808
    PRTCL.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
809
    PRTCL.Speed = NumberRange.new(Speed)
810
    PRTCL.VelocitySpread = Offset
811
    PRTCL.Drag = Drag
812
    PRTCL.Acceleration = Acel
813
    if Enabled == false then
814
        PRTCL:Emit(Emit)
815
        Debris:AddItem(PRTCL,Lifetime2)
816
    else
817
        PRTCL.Enabled = true
818
    end
819
    return PRTCL
820
end
821
 
822
function unanchor()
823
    if UNANCHOR == true then
824
        g = Character:GetChildren()
825
        for i = 1, #g do
826
            if g[i].ClassName == "Part" then
827
                g[i].Anchored = false
828
            end
829
        end
830
    end
831
end
832
 
833
function newTheme(ID,timepos,pitch,vol)
834
local kanz = kan
835
--kanz:Stop()
836
kanz.Volume = vol
837
--kanz.TimePosition = timepos
838
kanz.PlaybackSpeed = pitch
839
kanz.Pitch = pitch
840
kanz.SoundId = ID
841
kanz.Name = "wrecked"
842
kanz.Looped = true
843
currentThemePlaying = kanz.SoundId
844
currentVol = kanz.Volume
845
currentPitch = kanz.Pitch
846
--kanz:Play()
847
--coroutine.resume(coroutine.create(function()
848
--wait(0.05)
849
--end))
850
end
851
newTheme("rbxassetid://1191722766",0,1,1)
852
 
853
--//=================================\\
854
--||            Attacks
855
--\\=================================//
856
function switch()
857
    ATTACK = true
858
    Rooted = true
859
    CreateSound("363808674",workspace,8,1,false)
860
    for i=0, 1.5, 0.1 / Animation_Speed do
861
        Swait()
862
        Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(18), RAD(0)), 1 / Animation_Speed)
863
        RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(-24)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
864
        LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(12)) * LEFTSHOULDERC0, 1 / Animation_Speed)
865
        RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
866
        LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
867
    end
868
    CreateSound("363808674",workspace,8,1,false)
869
    for i=0, 1.5, 0.1 / Animation_Speed do
870
        Swait()
871
        Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(-18), RAD(0)), 1 / Animation_Speed)
872
        RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(-12)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
873
        LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(24)) * LEFTSHOULDERC0, 1 / Animation_Speed)
874
        RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
875
        LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
876
    end
877
if Mode == 1 and Mode ~= 2 then
878
Mode = 2
879
Speed = 38
880
Humanoid.WalkSpeed = Speed
881
newTheme("rbxassetid://228255592",0,1,1)
882
elseif Mode == 2 and Mode ~= 1 then
883
Mode = 1
884
Speed = 24
885
Humanoid.WalkSpeed = Speed
886
newTheme("rbxassetid://1191722766",0,1,1)
887
end
888
ATTACK = false
889
Rooted = false
890
end
891
 
892
function Spinning_Attack()
893
    ATTACK = true
894
    CreatePart("Block",LeftArm,"Plastic",0,1,BrickColor.new(0,0,0),"HitBox",Vector3.new(1,2,1),false)
895
    local HitBox = LeftArm.HitBox
896
    weldBetween(HitBox, LeftArm)
897
    Humanoid.WalkSpeed = 3.01
898
    for i = 0, 1.2, 0.1 do
899
        Swait()
900
        RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CFrame.new(0, -0.5, 0) * ANGLES(math.rad(0), math.rad(0), math.rad(-65)), 0.3)
901
        Torso.Neck.C0 = Clerp(Torso.Neck.C0, NECKC0 * ANGLES(math.rad(10), math.rad(0), math.rad(0)), 0.1)
902
        RightShoulder.C0 = Clerp(RightShoulder.C0, CFrame.new(1.5, 0.5, 0) * ANGLES(math.rad(0), math.rad(0), math.rad(10)), 0.1)
903
        LeftShoulder.C0 = Clerp(LeftShoulder.C0, CFrame.new(-1.5, 0.5, 0) * ANGLES(math.rad(-35), math.rad(0), math.rad(-10)), 0.3)
904
        RightHip.C0 = Clerp(RightHip.C0, CFrame.new(1, -1, 0) * RIGHTSHOULDERC0 * ANGLES(math.rad(-2.5), math.rad(-25), math.rad(-25)), 0.3)
905
        LeftHip.C0 = Clerp(LeftHip.C0, CFrame.new(-1, -1, 0) * LEFTSHOULDERC0 * ANGLES(math.rad(-2.5), math.rad(-0), math.rad(-20)), 0.3)
906
      end
907
    for i = 0, 4.6, 0.1 do
908
        Swait()
909
    CreateSound("2304904662",workspace,3,1,false)
910
        HitBox.Touched:connect(function(hit)
911
            if hit.Parent and hit.Parent ~= Character and hit.Parent:FindFirstChildOfClass('Humanoid') then
912
                hit.Parent:FindFirstChildOfClass('Humanoid').Health = 1 - 9999e+999
913
            end
914
        end)
915
        RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CFrame.new(0, -0.5, 0) * ANGLES(math.rad(0), math.rad(0), math.rad(65 + 255.45 * i)), 0.3)
916
        Torso.Neck.C0 = Clerp(Torso.Neck.C0, NECKC0 * ANGLES(math.rad(10), math.rad(0), math.rad(0)), 0.1)
917
        RightShoulder.C0 = Clerp(RightShoulder.C0, CFrame.new(1.5, 0.5, 0) * ANGLES(math.rad(-90), math.rad(0), math.rad(47)), 0.1)
918
        LeftShoulder.C0 = Clerp(LeftShoulder.C0, CFrame.new(-1.5, 0.5, 0) * ANGLES(math.rad(-90), math.rad(-90), math.rad(-47)), 0.3)
919
        RightHip.C0 = Clerp(RightHip.C0, CFrame.new(1, -1, 0) * RIGHTSHOULDERC0 * ANGLES(math.rad(-2.5), math.rad(-25), math.rad(95)), 0.3)
920
        LeftHip.C0 = Clerp(LeftHip.C0, CFrame.new(-1, -1, 0) * LEFTSHOULDERC0 * ANGLES(math.rad(-4.5), math.rad(0), math.rad(30)), 0.3)
921
      end
922
    ATTACK = false
923
    Humanoid.WalkSpeed = 8
924
    HitBox:Destroy()
925
end
926
 
927
--//=================================\\
928
--||          Key Functions
929
--\\=================================//
930
Mouse.KeyDown:connect(function(k)
931
    if(ATTACK)then return end
932
    if(k == 't')then
933
        switch()
934
    elseif(k == 'v')then
935
        Spinning_Attack()
936
    end
937
end)
938
--//=================================\\
939
--||           Animations
940
--\\=================================//
941
 
942
local CONNECT = nil
943
 
944
while true do
945
    Swait()
946
    ANIMATE.Parent = nil
947
    if Character:FindFirstChildOfClass("Humanoid") == nil then
948
        Humanoid = IT("Humanoid",Character)
949
    end
950
    for _,v in next, Humanoid:GetPlayingAnimationTracks() do
951
        v:Stop();
952
    end
953
    SINE = SINE + CHANGE
954
    local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
955
    local TORSOVERTICALVELOCITY = RootPart.Velocity.y
956
    local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
957
    local WALKSPEEDVALUE = 12 / (Humanoid.WalkSpeed / 12)
958
    if ANIM == "Walk" and TORSOVELOCITY > 1 then
959
        RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.15 * COS(SINE / (WALKSPEEDVALUE / 2))) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
960
        Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
961
        RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
962
        LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ -0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
963
    elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
964
        RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
965
        Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
966
        RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
967
        LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
968
    end
969
    if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
970
        ANIM = "Jump"
971
        if ATTACK == false then
972
            RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
973
            Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
974
            RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
975
            LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
976
            RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.3) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
977
            LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed)
978
        end
979
    elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
980
        ANIM = "Fall"
981
        if ATTACK == false then
982
            RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
983
            Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
984
            RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
985
            LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
986
            RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed)
987
            LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
988
        end
989
    elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
990
        ANIM = "Idle"
991
        if ATTACK == false and Mode == 1 then
992
            RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 0.15 / Animation_Speed)
993
            Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(45)), 0.15 / Animation_Speed)
994
            RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.5 + 0.2 * COS(SINE / 12), -0.1 + 0.2) * ANGLES(RAD(220), RAD(45), RAD(-75))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
995
            LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.2 * COS(SINE / 12), -0.1 + 0.2) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
996
            RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.1 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
997
            LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.1 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
998
        end
999
    if Mode == 2 then
1000
        ANIM = "Idle"
1001
RightHip.C0=Clerp(RightHip.C0,CF(1,-1 - 0.05 * math.cos(SINE / 32),0)*ANGLES(math.rad(0),math.rad(90),math.rad(0))*ANGLES(math.rad(-3),math.rad(0 - 1 * math.cos(SINE / 56)),math.rad(25 - 2 * math.cos(SINE / 32))),.1)
1002
LeftHip.C0=Clerp(LeftHip.C0,CF(-1,-1 - 0.05 * math.cos(SINE / 32),0)*ANGLES(math.rad(0),math.rad(-90),math.rad(0))*ANGLES(math.rad(-3),math.rad(0 - 1 * math.cos(SINE / 56)),math.rad(-25 + 2 * math.cos(SINE / 32))),.1)
1003
RootJoint.C0=Clerp(RootJoint.C0,ROOTC0*CF(0,-0.25 + 0.02 * math.cos(SINE / 32),-0.1 + 0.05 * math.cos(SINE / 32))*ANGLES(math.rad(25 - 2 * math.cos(SINE / 32)),math.rad(0),math.rad(0)),.1)
1004
Torso.Neck.C0=Clerp(Torso.Neck.C0,NECKC0*ANGLES(math.rad(25 + math.random(-1,1)),math.rad(math.random(-1,1)),math.rad(math.random(-1,1))),0.6)
1005
RightShoulder.C0=Clerp(RightShoulder.C0,CF(1.5,0.7 + 0.025 * math.cos(SINE / 45),-0.5)*ANGLES(math.rad(25 + 5 * math.cos(SINE / 74) + math.random(-1,1)),math.rad(1 - 3 * math.cos(SINE / 53)),math.rad(1 + 3 * math.cos(SINE / 45))),.1)
1006
LeftShoulder.C0=Clerp(LeftShoulder.C0,CF(-1.5,0.7 + 0.025 * math.cos(SINE / 45),-0.5)*ANGLES(math.rad(25 - 3 * math.cos(SINE / 73) + math.random(-1,1)),math.rad(2 - 1 * math.cos(SINE / 55)),math.rad(-3 - 3 * math.cos(SINE / 45))),.1)
1007
end
1008
    elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
1009
        ANIM = "Walk"
1010
        if ATTACK == false then
1011
            RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1012
            Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 8 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1013
            RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(5)) * RIGHTSHOULDERC0, 0.35 / Animation_Speed)
1014
            LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 0.35 / Animation_Speed)
1015
            RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 2 / Animation_Speed)
1016
            LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(15)), 2 / Animation_Speed)
1017
        end
1018
    end
1019
    unanchor()
1020
    Humanoid.MaxHealth = "inf"
1021
    Humanoid.Health = "inf"
1022
    if Rooted == false then
1023
        Disable_Jump = false
1024
        Humanoid.WalkSpeed = Speed
1025
    elseif Rooted == true then
1026
        Disable_Jump = true
1027
        Humanoid.WalkSpeed = 0
1028
    end
1029
end
1030
1031
end
1032
1033
1034
mouse.KeyDown:connect(function(key)
1035
	if key == "e" and henshine == false then
1036
    if hen ==  false then
1037
		henshin()
1038
		henshine = true
1039
        wait(1)
1040
1041
       hen =  true
1042
end
1043
		
1044
	end
1045
	end)