View difference between Paste ID: 2Gy6ikGH and 2pBBRcyJ
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://3463834745"
196
minigear.Parent = geare
197
local geare = Instance.new("Part")
198
geare.Parent = Head
199
geare.BrickColor = BrickColor.new("New Yeller")
200
geare.CanCollide = false
201
local weldhead1 = Instance.new("Weld")
202
weldhead1.Part0 = geare
203
weldhead1.Part1 = Head
204
weldhead1.C0 = Head.CFrame*CFrame.new(-0.5,0,0.5)
205-
weldhead1.Parent = Blackhead
205+
weldhead1.Parent = Head
206
game:GetService('RunService').Stepped:Connect(function()
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
SongDriver15.Looped = true
240
Player = owner
241
Mouse = Player:GetMouse()
242
PlayerGui = Player.PlayerGui
243
Cam = workspace.CurrentCamera
244
Backpack = Player.Backpack
245
Character = Player.Character
246
Humanoid = Character.Humanoid
247
RootPart = Character["HumanoidRootPart"]
248
Torso = Character["Torso"]
249
Head = Character["Head"]
250
RightArm = Character["Right Arm"]
251
LeftArm = Character["Left Arm"]
252
RightLeg = Character["Right Leg"]
253
LeftLeg = Character["Left Leg"]
254
RootJoint = RootPart["RootJoint"]
255
Neck = Torso["Neck"]
256
RightShoulder = Torso["Right Shoulder"]
257
LeftShoulder = Torso["Left Shoulder"]
258
RightHip = Torso["Right Hip"]
259
LeftHip = Torso["Left Hip"]
260
local TIME = 0
261
local sick = Instance.new("Sound",Torso)
262
 
263
IT = Instance.new
264
CF = CFrame.new
265
VT = Vector3.new
266
RAD = math.rad
267
C3 = Color3.new
268
UD2 = UDim2.new
269
BRICKC = BrickColor.new
270
ANGLES = CFrame.Angles
271
EULER = CFrame.fromEulerAnglesXYZ
272
COS = math.cos
273
ACOS = math.acos
274
SIN = math.sin
275
ASIN = math.asin
276
ABS = math.abs
277
MRANDOM = math.random
278
FLOOR = math.floor
279
 
280
--//=================================\\
281
--||        Value shit things
282
--\\=================================//
283
 
284
Animation_Speed = 3
285
local FORCERESET = false
286
Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
287
local SIZE = 1
288
local Speed = 24
289
local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
290
local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
291
local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
292
local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
293
local DAMAGEMULTIPLIER = 1
294
local ANIM = "Idle"
295
local ATTACK = false
296
local EQUIPPED = false
297
local HOLD = false
298
local COMBO = 1
299
local Rooted = false
300
local SINE = 0
301
local KEYHOLD = false
302
local CHANGE = 2 / Animation_Speed
303
local WALKINGANIM = false
304
local VALUE1 = false
305
local VALUE2 = false
306
local ROBLOXIDLEANIMATION = IT("Animation")
307
ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
308
ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
309
--ROBLOXIDLEANIMATION.Parent = Humanoid
310
local WEAPONGUI = IT("ScreenGui", PlayerGui)
311
WEAPONGUI.Name = "BanishV3Gui"
312
local Weapon = IT("Model")
313
Weapon.Name = "Adds"
314
local Effects = IT("Folder", Weapon)
315
Effects.Name = "Effects"
316
local ANIMATOR = Humanoid.Animator
317
local ANIMATE = Character:FindFirstChild("Animate")
318
local UNANCHOR = true
319
local TOBANISH = {}
320
Player_Size = 1
321
local Mode = 1
322
local kan = Instance.new("Sound",Character)
323
kan.Volume = 0
324
kan.TimePosition = 0
325
kan.PlaybackSpeed = 1
326
kan.Pitch = 1
327
kan.SoundId = "rbxassetid://614032233"
328
kan.Name = "wrecked"
329
kan.Looped = true
330
kan:Play()
331
local currentThemePlaying = kan.SoundId
332
local currentPitch = kan.Pitch
333
local currentVol = kan.Volume
334
--//=================================\\
335
--\\=================================//
336
for i,v in pairs(Character:children()) do
337
    if v:IsA("Accessory") then
338
        v:Destroy()
339
    end
340
end
341
 
342
warn("CREATED BY AlmightyToast#6465")
343
warn("aka KrYn0MoRe or ShrekBenson")
344
warn("DOnt rEm0vE tH1s 0r uR gAy")
345
--//=================================\\
346
--|| SAZERENOS' ARTIFICIAL HEARTBEAT
347
--\\=================================//
348
 
349
ArtificialHB = Instance.new("BindableEvent", script)
350
ArtificialHB.Name = "ArtificialHB"
351
 
352
script:WaitForChild("ArtificialHB")
353
 
354
frame = Frame_Speed
355
tf = 0
356
allowframeloss = false
357
tossremainder = false
358
lastframe = tick()
359
script.ArtificialHB:Fire()
360
 
361
game:GetService("RunService").Heartbeat:connect(function(s, p)
362
    tf = tf + s
363
    if tf >= frame then
364
        if allowframeloss then
365
            script.ArtificialHB:Fire()
366
            lastframe = tick()
367
        else
368
            for i = 1, math.floor(tf / frame) do
369
                script.ArtificialHB:Fire()
370
            end
371
        lastframe = tick()
372
        end
373
        if tossremainder then
374
            tf = 0
375
        else
376
            tf = tf - frame * math.floor(tf / frame)
377
        end
378
    end
379
end)
380
 
381
--//=================================\\
382
--\\=================================//
383
 
384
--//=================================\\
385
--||          MOST FUNCTIONS
386
--\\=================================//
387
 
388
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
389
    return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
390
end
391
 
392
function PositiveAngle(NUMBER)
393
    if NUMBER >= 0 then
394
        NUMBER = 0
395
    end
396
    return NUMBER
397
end
398
 
399
function NegativeAngle(NUMBER)
400
    if NUMBER <= 0 then
401
        NUMBER = 0
402
    end
403
    return NUMBER
404
end
405
 
406
function Swait(NUMBER)
407
    if NUMBER == 0 or NUMBER == nil then
408
        ArtificialHB.Event:wait()
409
    else
410
        for i = 1, NUMBER do
411
            ArtificialHB.Event:wait()
412
        end
413
    end
414
end
415
 
416
function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
417
    local NEWMESH = IT(MESH)
418
    if MESH == "SpecialMesh" then
419
        NEWMESH.MeshType = MESHTYPE
420
        if MESHID ~= "nil" and MESHID ~= "" then
421
            NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
422
        end
423
        if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
424
            NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
425
        end
426
    end
427
    NEWMESH.Offset = OFFSET or VT(0, 0, 0)
428
    NEWMESH.Scale = SCALE
429
    NEWMESH.Parent = PARENT
430
    return NEWMESH
431
end
432
 
433
function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
434
    local NEWPART = IT("Part")
435
    NEWPART.formFactor = FORMFACTOR
436
    NEWPART.Reflectance = REFLECTANCE
437
    NEWPART.Transparency = TRANSPARENCY
438
    NEWPART.CanCollide = false
439
    NEWPART.Locked = true
440
    NEWPART.Anchored = true
441
    if ANCHOR == false then
442
        NEWPART.Anchored = false
443
    end
444
    NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
445
    NEWPART.Name = NAME
446
    NEWPART.Size = SIZE
447
    NEWPART.Position = Torso.Position
448
    NEWPART.Material = MATERIAL
449
    NEWPART:BreakJoints()
450
    NEWPART.Parent = PARENT
451
    return NEWPART
452
end
453
 
454
    local function weldBetween(a, b)
455
        local weldd = IT("Weld")
456
        weldd.Part0 = a
457
        weldd.Part1 = b
458
        weldd.C0 = CF()
459
        weldd.C1 = b.CFrame:inverse() * a.CFrame
460
        weldd.Parent = a
461
        return weldd
462
    end
463
 
464
 
465
function QuaternionFromCFrame(cf)
466
    local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
467
    local trace = m00 + m11 + m22
468
    if trace > 0 then
469
        local s = math.sqrt(1 + trace)
470
        local recip = 0.5 / s
471
        return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
472
    else
473
        local i = 0
474
        if m11 > m00 then
475
            i = 1
476
        end
477
        if m22 > (i == 0 and m00 or m11) then
478
            i = 2
479
        end
480
        if i == 0 then
481
            local s = math.sqrt(m00 - m11 - m22 + 1)
482
            local recip = 0.5 / s
483
            return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
484
        elseif i == 1 then
485
            local s = math.sqrt(m11 - m22 - m00 + 1)
486
            local recip = 0.5 / s
487
            return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
488
        elseif i == 2 then
489
            local s = math.sqrt(m22 - m00 - m11 + 1)
490
            local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
491
        end
492
    end
493
end
494
 
495
function QuaternionToCFrame(px, py, pz, x, y, z, w)
496
    local xs, ys, zs = x + x, y + y, z + z
497
    local wx, wy, wz = w * xs, w * ys, w * zs
498
    local xx = x * xs
499
    local xy = x * ys
500
    local xz = x * zs
501
    local yy = y * ys
502
    local yz = y * zs
503
    local zz = z * zs
504
    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))
505
end
506
 
507
function QuaternionSlerp(a, b, t)
508
    local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
509
    local startInterp, finishInterp;
510
    if cosTheta >= 0.0001 then
511
        if (1 - cosTheta) > 0.0001 then
512
            local theta = ACOS(cosTheta)
513
            local invSinTheta = 1 / SIN(theta)
514
            startInterp = SIN((1 - t) * theta) * invSinTheta
515
            finishInterp = SIN(t * theta) * invSinTheta
516
        else
517
            startInterp = 1 - t
518
            finishInterp = t
519
        end
520
    else
521
        if (1 + cosTheta) > 0.0001 then
522
            local theta = ACOS(-cosTheta)
523
            local invSinTheta = 1 / SIN(theta)
524
            startInterp = SIN((t - 1) * theta) * invSinTheta
525
            finishInterp = SIN(t * theta) * invSinTheta
526
        else
527
            startInterp = t - 1
528
            finishInterp = t
529
        end
530
    end
531
    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
532
end
533
 
534
function Clerp(a, b, t)
535
    local qa = {QuaternionFromCFrame(a)}
536
    local qb = {QuaternionFromCFrame(b)}
537
    local ax, ay, az = a.x, a.y, a.z
538
    local bx, by, bz = b.x, b.y, b.z
539
    local _t = 1 - t
540
    return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
541
end
542
 
543
function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
544
    local frame = IT("Frame")
545
    frame.BackgroundTransparency = TRANSPARENCY
546
    frame.BorderSizePixel = BORDERSIZEPIXEL
547
    frame.Position = POSITION
548
    frame.Size = SIZE
549
    frame.BackgroundColor3 = COLOR
550
    frame.BorderColor3 = BORDERCOLOR
551
    frame.Name = NAME
552
    frame.Parent = PARENT
553
    return frame
554
end
555
 
556
function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
557
    local label = IT("TextLabel")
558
    label.BackgroundTransparency = 1
559
    label.Size = UD2(1, 0, 1, 0)
560
    label.Position = UD2(0, 0, 0, 0)
561
    label.TextColor3 = TEXTCOLOR
562
    label.TextStrokeTransparency = STROKETRANSPARENCY
563
    label.TextTransparency = TRANSPARENCY
564
    label.FontSize = TEXTFONTSIZE
565
    label.Font = TEXTFONT
566
    label.BorderSizePixel = BORDERSIZEPIXEL
567
    label.TextScaled = false
568
    label.Text = TEXT
569
    label.Name = NAME
570
    label.Parent = PARENT
571
    return label
572
end
573
 
574
function NoOutlines(PART)
575
    PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
576
end
577
 
578
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
579
    local NEWWELD = IT(TYPE)
580
    NEWWELD.Part0 = PART0
581
    NEWWELD.Part1 = PART1
582
    NEWWELD.C0 = C0
583
    NEWWELD.C1 = C1
584
    NEWWELD.Parent = PARENT
585
    return NEWWELD
586
end
587
 
588
local S = IT("Sound")
589
function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
590
    local NEWSOUND = nil
591
    coroutine.resume(coroutine.create(function()
592
        NEWSOUND = S:Clone()
593
        NEWSOUND.Parent = PARENT
594
        NEWSOUND.Volume = VOLUME
595
        NEWSOUND.Pitch = PITCH
596
        NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
597
        NEWSOUND:play()
598
        if DOESLOOP == true then
599
            NEWSOUND.Looped = true
600
        else
601
            repeat wait(1) until NEWSOUND.Playing == false or NEWSOUND.Parent ~= PARENT
602
            NEWSOUND:remove()
603
        end
604
    end))
605
    return NEWSOUND
606
end
607
 
608
function CFrameFromTopBack(at, top, back)
609
    local right = top:Cross(back)
610
    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)
611
end
612
 
613
--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})
614
function WACKYEFFECT(Table)
615
    local TYPE = (Table.EffectType or "Sphere")
616
    local SIZE = (Table.Size or VT(1,1,1))
617
    local ENDSIZE = (Table.Size2 or VT(0,0,0))
618
    local TRANSPARENCY = (Table.Transparency or 0)
619
    local ENDTRANSPARENCY = (Table.Transparency2 or 1)
620
    local CFRAME = (Table.CFrame or Torso.CFrame)
621
    local MOVEDIRECTION = (Table.MoveToPos or nil)
622
    local ROTATION1 = (Table.RotationX or 0)
623
    local ROTATION2 = (Table.RotationY or 0)
624
    local ROTATION3 = (Table.RotationZ or 0)
625
    local MATERIAL = (Table.Material or "Neon")
626
    local COLOR = (Table.Color or C3(1,1,1))
627
    local TIME = (Table.Time or 45)
628
    local SOUNDID = (Table.SoundID or nil)
629
    local SOUNDPITCH = (Table.SoundPitch or nil)
630
    local SOUNDVOLUME = (Table.SoundVolume or nil)
631
    coroutine.resume(coroutine.create(function()
632
        local PLAYSSOUND = false
633
        local SOUND = nil
634
        local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
635
        if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
636
            PLAYSSOUND = true
637
            SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
638
        end
639
        EFFECT.Color = COLOR
640
        local MSH = nil
641
        if TYPE == "Sphere" then
642
            MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
643
        elseif TYPE == "Block" then
644
            MSH = IT("BlockMesh",EFFECT)
645
            MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
646
        elseif TYPE == "Wave" then
647
            MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
648
        elseif TYPE == "Ring" then
649
            MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
650
        elseif TYPE == "Slash" then
651
            MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
652
        elseif TYPE == "Round Slash" then
653
            MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
654
        elseif TYPE == "Swirl" then
655
            MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
656
        elseif TYPE == "Skull" then
657
            MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
658
        elseif TYPE == "Crystal" then
659
            MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
660
        end
661
        if MSH ~= nil then
662
            local MOVESPEED = nil
663
            if MOVEDIRECTION ~= nil then
664
                MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
665
            end
666
            local GROWTH = SIZE - ENDSIZE
667
            local TRANS = TRANSPARENCY - ENDTRANSPARENCY
668
            if TYPE == "Block" then
669
                EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
670
            else
671
                EFFECT.CFrame = CFRAME
672
            end
673
            for LOOP = 1, TIME+1 do
674
                Swait()
675
                MSH.Scale = MSH.Scale - GROWTH/TIME
676
                if TYPE == "Wave" then
677
                    MSH.Offset = VT(0,0,-MSH.Scale.X/8)
678
                end
679
                EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
680
                if TYPE == "Block" then
681
                    EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
682
                else
683
                    EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
684
                end
685
                if MOVEDIRECTION ~= nil then
686
                    local ORI = EFFECT.Orientation
687
                    EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
688
                    EFFECT.Orientation = ORI
689
                end
690
            end
691
            if PLAYSSOUND == false then
692
                EFFECT:remove()
693
            else
694
                SOUND.Stopped:Connect(function()
695
                    EFFECT:remove()
696
                end)
697
            end
698
        else
699
            if PLAYSSOUND == false then
700
                EFFECT:remove()
701
            else
702
                repeat Swait() until SOUND.Playing == false
703
                EFFECT:remove()
704
            end
705
        end
706
    end))
707
end
708
 
709
function MakeForm(PART,TYPE)
710
    if TYPE == "Cyl" then
711
        local MSH = IT("CylinderMesh",PART)
712
    elseif TYPE == "Ball" then
713
        local MSH = IT("SpecialMesh",PART)
714
        MSH.MeshType = "Sphere"
715
    elseif TYPE == "Wedge" then
716
        local MSH = IT("SpecialMesh",PART)
717
        MSH.MeshType = "Wedge"
718
    end
719
end
720
 
721
function SpawnTrail(FROM,TO,BIG)
722
    local TRAIL = CreatePart(3, Effects, "Neon", 0, 0.5, "New Yeller", "Trail", VT(0,0,0))
723
    MakeForm(TRAIL,"Cyl")
724
    local DIST = (FROM - TO).Magnitude
725
    if BIG == true then
726
        TRAIL.Size = VT(0.5,DIST,0.5)
727
    else
728
        TRAIL.Size = VT(0.25,DIST,0.25)
729
    end
730
    TRAIL.CFrame = CF(FROM, TO) * CF(0, 0, -DIST/2) * ANGLES(RAD(90),RAD(0),RAD(0))
731
    coroutine.resume(coroutine.create(function()
732
        for i = 1, 5 do
733
            Swait()
734
            TRAIL.Transparency = TRAIL.Transparency + 0.1
735
        end
736
        TRAIL:remove()
737
    end))
738
end
739
 
740
Debris = game:GetService("Debris")
741
 
742
function CastProperRay(StartPos, EndPos, Distance, Ignore)
743
    local DIRECTION = CF(StartPos,EndPos).lookVector
744
    return Raycast(StartPos, DIRECTION, Distance, Ignore)
745
end
746
 
747
function turnto(position)
748
    RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
749
end
750
local asd = Instance.new("ParticleEmitter")
751
asd.Color = ColorSequence.new(Color3.new(0.5, 0, 0), Color3.new(.3, 0, 0))
752
asd.LightEmission = .1
753
asd.Texture = "http://www.roblox.com/asset/?ID=291880914"
754
aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.6),NumberSequenceKeypoint.new(1, 2)})
755
bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)})
756
asd.Transparency = bbb
757
asd.Size = aaa
758
asd.ZOffset = .9
759
asd.Acceleration = Vector3.new(0, -15, 0)
760
asd.LockedToPart = false
761
asd.EmissionDirection = "Back"
762
asd.Lifetime = NumberRange.new(1, 2)
763
asd.Rotation = NumberRange.new(-100, 100)
764
asd.RotSpeed = NumberRange.new(-100, 100)
765
asd.Speed = NumberRange.new(10)
766
asd.Enabled = false
767
asd.VelocitySpread = 999
768
 
769
function getbloody(victim,amount)
770
    local PART = CreatePart(3, Effects, "Neon", 0, 1, "New Yeller", "Blood", victim.Size)
771
    PART.CFrame = victim.CFrame
772
    local HITPLAYERSOUNDS = {"356551938","264486467"}
773
    Debris:AddItem(PART,5)
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
    CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
777
    local prtcl = asd:Clone()
778
    prtcl.Parent = PART
779
    prtcl:Emit(amount*10)
780
end
781
 
782
local Particle = IT("ParticleEmitter",nil)
783
Particle.Enabled = false
784
Particle.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1),NumberSequenceKeypoint.new(0.3,0.95),NumberSequenceKeypoint.new(1,1)})
785
Particle.LightEmission = 0.5
786
Particle.Rate = 150
787
Particle.ZOffset = 1
788
Particle.Rotation = NumberRange.new(-180, 180)
789
Particle.RotSpeed = NumberRange.new(-180, 180)
790
Particle.Texture = "http://www.roblox.com/asset/?id=304437537"
791
Particle.Color = ColorSequence.new(C3(0,1,0),C3(0.4,0,0))
792
 
793
--ParticleEmitter({Speed = 5, Drag = 0, Size1 = 1, Size2 = 5, Lifetime1 = 1, Lifetime2 = 1.5, Parent = Torso, Emit = 100, Offset = 360, Enabled = false})
794
function ParticleEmitter(Table)
795
    local PRTCL = Particle:Clone()
796
    local Speed = Table.Speed or 5
797
    local Drag = Table.Drag or 0
798
    local Size1 = Table.Size1 or 1
799
    local Size2 = Table.Size2 or 5
800
    local Lifetime1 = Table.Lifetime1 or 1
801
    local Lifetime2 = Table.Lifetime2 or 1.5
802
    local Parent = Table.Parent or Torso
803
    local Emit = Table.Emit or 100
804
    local Offset = Table.Offset or 360
805
    local Acel = Table.Acel or VT(0,0,0)
806
    local Enabled = Table.Enabled or false
807
    PRTCL.Parent = Parent
808
    PRTCL.Size = NumberSequence.new(Size1,Size2)
809
    PRTCL.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
810
    PRTCL.Speed = NumberRange.new(Speed)
811
    PRTCL.VelocitySpread = Offset
812
    PRTCL.Drag = Drag
813
    PRTCL.Acceleration = Acel
814
    if Enabled == false then
815
        PRTCL:Emit(Emit)
816
        Debris:AddItem(PRTCL,Lifetime2)
817
    else
818
        PRTCL.Enabled = true
819
    end
820
    return PRTCL
821
end
822
 
823
function unanchor()
824
    if UNANCHOR == true then
825
        g = Character:GetChildren()
826
        for i = 1, #g do
827
            if g[i].ClassName == "Part" then
828
                g[i].Anchored = false
829
            end
830
        end
831
    end
832
end
833
 
834
function newTheme(ID,timepos,pitch,vol)
835
local kanz = kan
836
--kanz:Stop()
837
kanz.Volume = vol
838
--kanz.TimePosition = timepos
839
kanz.PlaybackSpeed = pitch
840
kanz.Pitch = pitch
841
kanz.SoundId = ID
842
kanz.Name = "wrecked"
843
kanz.Looped = true
844
currentThemePlaying = kanz.SoundId
845
currentVol = kanz.Volume
846
currentPitch = kanz.Pitch
847
--kanz:Play()
848
--coroutine.resume(coroutine.create(function()
849
--wait(0.05)
850
--end))
851
end
852
newTheme("rbxassetid://1191722766",0,1,1)
853
 
854
--//=================================\\
855
--||            Attacks
856
--\\=================================//
857
function switch()
858
    ATTACK = true
859
    Rooted = true
860
    CreateSound("363808674",workspace,8,1,false)
861
    for i=0, 1.5, 0.1 / Animation_Speed do
862
        Swait()
863
        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)
864
        RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(-24)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
865
        LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(12)) * LEFTSHOULDERC0, 1 / Animation_Speed)
866
        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)
867
        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)
868
    end
869
    CreateSound("363808674",workspace,8,1,false)
870
    for i=0, 1.5, 0.1 / Animation_Speed do
871
        Swait()
872
        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)
873
        RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(-12)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
874
        LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(24)) * LEFTSHOULDERC0, 1 / Animation_Speed)
875
        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)
876
        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)
877
    end
878
if Mode == 1 and Mode ~= 2 then
879
Mode = 2
880
Speed = 38
881
Humanoid.WalkSpeed = Speed
882
newTheme("rbxassetid://228255592",0,1,1)
883
elseif Mode == 2 and Mode ~= 1 then
884
Mode = 1
885
Speed = 24
886
Humanoid.WalkSpeed = Speed
887
newTheme("rbxassetid://1191722766",0,1,1)
888
end
889
ATTACK = false
890
Rooted = false
891
end
892
 
893
function Spinning_Attack()
894
    ATTACK = true
895
    CreatePart("Block",LeftArm,"Plastic",0,1,BrickColor.new(0,0,0),"HitBox",Vector3.new(1,2,1),false)
896
    local HitBox = LeftArm.HitBox
897
    weldBetween(HitBox, LeftArm)
898
    Humanoid.WalkSpeed = 3.01
899
    for i = 0, 1.2, 0.1 do
900
        Swait()
901
        RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CFrame.new(0, -0.5, 0) * ANGLES(math.rad(0), math.rad(0), math.rad(-65)), 0.3)
902
        Torso.Neck.C0 = Clerp(Torso.Neck.C0, NECKC0 * ANGLES(math.rad(10), math.rad(0), math.rad(0)), 0.1)
903
        RightShoulder.C0 = Clerp(RightShoulder.C0, CFrame.new(1.5, 0.5, 0) * ANGLES(math.rad(0), math.rad(0), math.rad(10)), 0.1)
904
        LeftShoulder.C0 = Clerp(LeftShoulder.C0, CFrame.new(-1.5, 0.5, 0) * ANGLES(math.rad(-35), math.rad(0), math.rad(-10)), 0.3)
905
        RightHip.C0 = Clerp(RightHip.C0, CFrame.new(1, -1, 0) * RIGHTSHOULDERC0 * ANGLES(math.rad(-2.5), math.rad(-25), math.rad(-25)), 0.3)
906
        LeftHip.C0 = Clerp(LeftHip.C0, CFrame.new(-1, -1, 0) * LEFTSHOULDERC0 * ANGLES(math.rad(-2.5), math.rad(-0), math.rad(-20)), 0.3)
907
      end
908
    for i = 0, 4.6, 0.1 do
909
        Swait()
910
    CreateSound("2304904662",workspace,3,1,false)
911
        HitBox.Touched:connect(function(hit)
912
            if hit.Parent and hit.Parent ~= Character and hit.Parent:FindFirstChildOfClass('Humanoid') then
913
                hit.Parent:FindFirstChildOfClass('Humanoid').Health = 1 - 9999e+999
914
            end
915
        end)
916
        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)
917
        Torso.Neck.C0 = Clerp(Torso.Neck.C0, NECKC0 * ANGLES(math.rad(10), math.rad(0), math.rad(0)), 0.1)
918
        RightShoulder.C0 = Clerp(RightShoulder.C0, CFrame.new(1.5, 0.5, 0) * ANGLES(math.rad(-90), math.rad(0), math.rad(47)), 0.1)
919
        LeftShoulder.C0 = Clerp(LeftShoulder.C0, CFrame.new(-1.5, 0.5, 0) * ANGLES(math.rad(-90), math.rad(-90), math.rad(-47)), 0.3)
920
        RightHip.C0 = Clerp(RightHip.C0, CFrame.new(1, -1, 0) * RIGHTSHOULDERC0 * ANGLES(math.rad(-2.5), math.rad(-25), math.rad(95)), 0.3)
921
        LeftHip.C0 = Clerp(LeftHip.C0, CFrame.new(-1, -1, 0) * LEFTSHOULDERC0 * ANGLES(math.rad(-4.5), math.rad(0), math.rad(30)), 0.3)
922
      end
923
    ATTACK = false
924
    Humanoid.WalkSpeed = 8
925
    HitBox:Destroy()
926
end
927
 
928
--//=================================\\
929
--||          Key Functions
930
--\\=================================//
931
Mouse.KeyDown:connect(function(k)
932
    if(ATTACK)then return end
933
    if(k == 't')then
934
        switch()
935
    elseif(k == 'v')then
936
        Spinning_Attack()
937
    end
938
end)
939
--//=================================\\
940
--||           Animations
941
--\\=================================//
942
 
943
local CONNECT = nil
944
 
945
while true do
946
    Swait()
947
    ANIMATE.Parent = nil
948
    if Character:FindFirstChildOfClass("Humanoid") == nil then
949
        Humanoid = IT("Humanoid",Character)
950
    end
951
    for _,v in next, Humanoid:GetPlayingAnimationTracks() do
952
        v:Stop();
953
    end
954
    SINE = SINE + CHANGE
955
    local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
956
    local TORSOVERTICALVELOCITY = RootPart.Velocity.y
957
    local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
958
    local WALKSPEEDVALUE = 12 / (Humanoid.WalkSpeed / 12)
959
    if ANIM == "Walk" and TORSOVELOCITY > 1 then
960
        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)
961
        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)
962
        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)
963
        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)
964
    elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
965
        RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
966
        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)
967
        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)
968
        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)
969
    end
970
    if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
971
        ANIM = "Jump"
972
        if ATTACK == false then
973
            RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
974
            Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
975
            RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
976
            LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
977
            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)
978
            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)
979
        end
980
    elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
981
        ANIM = "Fall"
982
        if ATTACK == false then
983
            RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
984
            Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
985
            RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
986
            LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
987
            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)
988
            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)
989
        end
990
    elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
991
        ANIM = "Idle"
992
        if ATTACK == false and Mode == 1 then
993
            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)
994
            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)
995
            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)
996
            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)
997
            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)
998
            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)
999
        end
1000
    if Mode == 2 then
1001
        ANIM = "Idle"
1002
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)
1003
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)
1004
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)
1005
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)
1006
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)
1007
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)
1008
end
1009
    elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
1010
        ANIM = "Walk"
1011
        if ATTACK == false then
1012
            RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
1013
            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)
1014
            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)
1015
            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)
1016
            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)
1017
            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)
1018
        end
1019
    end
1020
    unanchor()
1021
    Humanoid.MaxHealth = "inf"
1022
    Humanoid.Health = "inf"
1023
    if Rooted == false then
1024
        Disable_Jump = false
1025
        Humanoid.WalkSpeed = Speed
1026
    elseif Rooted == true then
1027
        Disable_Jump = true
1028
        Humanoid.WalkSpeed = 0
1029
    end
1030
end
1031
1032
end
1033
1034
1035
mouse.KeyDown:connect(function(key)
1036
	if key == "e" and henshine == false then
1037
    if hen ==  false then
1038
		henshin()
1039
		henshine = true
1040
        wait(1)
1041
1042
       hen =  true
1043
end
1044
		
1045
	end
1046
	end)