View difference between Paste ID: 0PEHZ52G and E2UxabF0
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,game,owner = owner,game
3
local RealPlayer = Player
4
do
5
	print("FE Compatibility code by Mokiros")
6
	local rp = RealPlayer
7
	script.Parent = rp.Character
8
	
9
	--RemoteEvent for communicating
10
	local Event = Instance.new("RemoteEvent")
11
	Event.Name = "UserInput_Event"
12
13
	--Fake event to make stuff like Mouse.KeyDown work
14
	local function fakeEvent()
15
		local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
16
		t.connect = t.Connect
17
		return t
18
	end
19
20
	--Creating fake input objects with fake variables
21
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
22
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
23
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
24
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
25
	end}
26
	--Merged 2 functions into one by checking amount of arguments
27
	CAS.UnbindAction = CAS.BindAction
28
29
	--This function will trigger the events that have been :Connect()'ed
30
	local function te(self,ev,...)
31
		local t = m[ev]
32
		if t and t._fakeEvent then
33
			for _,f in pairs(t.Functions) do
34
				f(...)
35
			end
36
		end
37
	end
38
	m.TrigEvent = te
39
	UIS.TrigEvent = te
40
41
	Event.OnServerEvent:Connect(function(plr,io)
42
	    if plr~=rp then return end
43
		m.Target = io.Target
44
		m.Hit = io.Hit
45
		if not io.isMouse then
46
			local b = io.UserInputState == Enum.UserInputState.Begin
47
			if io.UserInputType == Enum.UserInputType.MouseButton1 then
48
				return m:TrigEvent(b and "Button1Down" or "Button1Up")
49
			end
50
			for _,t in pairs(CAS.Actions) do
51
				for _,k in pairs(t.Keys) do
52
					if k==io.KeyCode then
53
						t.Function(t.Name,io.UserInputState,io)
54
					end
55
				end
56
			end
57
			m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
58
			UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
59
	    end
60
	end)
61
	Event.Parent = NLS([==[
62
	local Player = game:GetService("Players").LocalPlayer
63
	local Event = script:WaitForChild("UserInput_Event")
64
65
	local Mouse = Player:GetMouse()
66
	local UIS = game:GetService("UserInputService")
67
	local input = function(io,a)
68
		if a then return end
69
		--Since InputObject is a client-side instance, we create and pass table instead
70
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
71
	end
72
	UIS.InputBegan:Connect(input)
73
	UIS.InputEnded:Connect(input)
74
75
	local h,t
76
	--Give the server mouse data 30 times every second, but only if the values changed
77
	--If player is not moving their mouse, client won't fire events
78
	while wait(1/30) do
79
		if h~=Mouse.Hit or t~=Mouse.Target then
80
			h,t=Mouse.Hit,Mouse.Target
81
			Event:FireServer({isMouse=true,Target=t,Hit=h})
82
		end
83
	end]==],Player.Character)
84
85
	----Sandboxed game object that allows the usage of client-side methods and services
86
	--Real game object
87
	local _rg = game
88
89
	--Metatable for fake service
90
	local fsmt = {
91
		__index = function(self,k)
92
			local s = rawget(self,"_RealService")
93
			if s then return s[k] end
94
		end,
95
		__newindex = function(self,k,v)
96
			local s = rawget(self,"_RealService")
97
			if s then s[k]=v end
98
		end,
99
		__call = function(self,...)
100
			local s = rawget(self,"_RealService")
101
			if s then return s(...) end
102
		end
103
	}
104
	local function FakeService(t,RealService)
105
		t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
106
		return setmetatable(t,fsmt)
107
	end
108
109
	--Fake game object
110
	local g = {
111
		GetService = function(self,s)
112
			return self[s]
113
		end,
114
		Players = FakeService({
115
			LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
116
		},"Players"),
117
		UserInputService = FakeService(UIS,"UserInputService"),
118
		ContextActionService = FakeService(CAS,"ContextActionService"),
119
	}
120
	rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
121
	g.service = g.GetService
122
	
123
	g.RunService = FakeService({
124
		RenderStepped = _rg:GetService("RunService").Heartbeat,
125
		BindToRenderStep = function(self,name,_,fun)
126
127
		end,
128
		UnbindFromRenderStep = function(self,name)
129
			self._btrs[name]:Disconnect()
130
		end,
131
	},"RunService")
132
133
	setmetatable(g,{
134
		__index=function(self,s)
135
			return _rg:GetService(s) or typeof(_rg[s])=="function"
136
			and function(_,...)return _rg[s](_rg,...)end or _rg[s]
137
		end,
138
		__newindex = fsmt.__newindex,
139
		__call = fsmt.__call
140
	})
141
	--Changing owner to fake player object to support owner:GetMouse()
142
	game,owner = g,g.Players.LocalPlayer
143
end
144
145
Player_Size = 1 --Size of the player.
146
local change = 1
147
148
local plr = owner
149
local mou = plr:GetMouse()
150
local char = plr.Character
151
local hum = char.Humanoid
152
local hed = char.Head
153
local root = char.HumanoidRootPart
154
local rootj = root.RootJoint
155
local tors = char.Torso
156
local ra = char["Right Arm"]
157
local la = char["Left Arm"]
158
local rl = char["Right Leg"]
159
local ll = char["Left Leg"]
160
local neck = tors["Neck"]
161
local mouse = plr:GetMouse()
162
local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
163
local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
164
local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
165
local maincolor = BrickColor.new("Dark green")
166
exploitable = true
167
local Player = game.Players.localPlayer
168
local Character = Player.Character
169
local Humanoid = Character.Humanoid
170
local Mouse = Player:GetMouse()
171
local LeftArm = Character["Left Arm"]
172
local RightArm = Character["Right Arm"]
173
local LeftLeg = Character["Left Leg"]
174
local RightLeg = Character["Right Leg"]
175
local Head = Character.Head
176
local Torso = Character.Torso
177
178
BTAUNT = Instance.new("Sound", tors)
179
BTAUNT.SoundId = "http://www.roblox.com/asset/?id=2783948945"
180
BTAUNT.Volume = 10
181
BTAUNT.Pitch = 1
182
BTAUNT.Looped = false
183
BTAUNT.TimePosition = 0.2
184
BTAUNT.Face.Texture = "http://www.roblox.com/asset/?id=146620806"
185
186
187
188
cam = game.Workspace.CurrentCamera
189
CF = CFrame.new
190
VT = Vector3.new
191
angles = CFrame.Angles
192
attack = false
193
Euler = CFrame.fromEulerAnglesXYZ
194
Rad = math.rad
195
IT = Instance.new
196
BrickC = BrickColor.new
197
Cos = math.cos
198
COS = math.cos
199
Acos = math.acos
200
Sin = math.sin
201
Asin = math.asin
202
Abs = math.abs
203
Mrandom = math.random
204
Floor = math.floor
205
206
Player = owner
207
PlayerGui = Player.PlayerGui
208
Cam = workspace.CurrentCamera
209
Backpack = Player.Backpack
210
Character = Player.Character
211
Humanoid = Character.Humanoid
212
Mouse = Player:GetMouse()
213
RootPart = Character["HumanoidRootPart"]
214
Torso = Character["Torso"]
215
Head = Character["Head"]
216
RightArm = Character["Right Arm"]
217
LeftArm = Character["Left Arm"]
218
RightLeg = Character["Right Leg"]
219
LeftLeg = Character["Left Leg"]
220
RootJoint = RootPart["RootJoint"]
221
Neck = Torso["Neck"]
222
RightShoulder = Torso["Right Shoulder"]
223
LeftShoulder = Torso["Left Shoulder"]
224
RightHip = Torso["Right Hip"]
225
LeftHip = Torso["Left Hip"]
226
local SIZE = 1
227
228
necko = CF(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
229
RSH, LSH = nil, nil
230
RW = Instance.new("Weld")
231
LW = Instance.new("Weld")
232
RH = tors["Right Hip"]
233
LH = tors["Left Hip"]
234
RSH = tors["Right Shoulder"]
235
LSH = tors["Left Shoulder"]
236
RSH.Parent = nil
237
LSH.Parent = nil
238
RW.Name = "RW"
239
RW.Part0 = tors
240
RW.C0 = CF(1.5, 0.5, 0)
241
RW.C1 = CF(0, 0.5, 0)
242
RW.Part1 = ra
243
RW.Parent = tors
244
LW.Name = "LW"
245
LW.Part0 = tors
246
LW.C0 = CF(-1.5, 0.5, 0)
247
LW.C1 = CF(0, 0.5, 0)
248
LW.Part1 = la
249
LW.Parent = tors
250
Effects = {}
251
252
local sine=0
253
Animation_Speed = 1
254
local CHANGE = 2 / Animation_Speed
255
256
rootj.Parent = root
257
neck.Parent = tors
258
RW.Parent = tors
259
LW.Parent = tors
260
RH.Parent = tors
261
LH.Parent = tors
262
----------------------------------------------------------------------------------
263
rootj.C0 = RootCF * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(0), Rad(0))
264
rootj.C1 = RootCF * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(0), Rad(0))
265
neck.C0 = necko * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * angles(Rad(0), Rad(0), Rad(0))
266
neck.C1 = CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * angles(Rad(-90), Rad(0), Rad(180))
267
RW.C0 = CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(0), Rad(0)) --* RIGHTSHOULDERC0
268
LW.C0 = CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(0), Rad(0)) --* LEFTSHOULDERC0
269
----------------------------------------------------------------------------------
270
RH.C0 = CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(90), Rad(0)) * angles(Rad(0), Rad(0), Rad(0))
271
LH.C0 = CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(-90), Rad(0)) * angles(Rad(0), Rad(0), Rad(0))
272
RH.C1 = CF(0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(90), Rad(0)) * angles(Rad(0), Rad(0), Rad(0))
273
LH.C1 = CF(-0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(-90), Rad(0)) * angles(Rad(0), Rad(0), Rad(0))
274
--hat.Parent = Character
275
----------------------------------------------------------------------------------
276
local SONG = 2177911889
277
local SONG2 = 0
278
local Music = Instance.new("Sound",tors)
279
Music.Volume = 2.5
280
Music.Looped = true
281
Music.Pitch = 1 --Pitcher
282
 function Cso(ID, PARENT, VOLUME, PITCH)
283
	local NSound = nil
284
	coroutine.resume(coroutine.create(function()
285
		NSound = IT("Sound", PARENT)
286
		NSound.Volume = VOLUME
287
		NSound.Pitch = PITCH
288
		NSound.SoundId = "http://www.roblox.com/asset/?id="..ID
289
		swait()
290
		NSound:play()
291
		game:GetService("Debris"):AddItem(NSound, 10)
292
	end))
293
	return NSound
294
end
295
----------------------------------------------------------------------------------
296
local equipped = false
297
local idle = 0
298
local change = 1
299
local val = 0
300
local toim = 0
301
local idleanim = 0.4
302
local sine = 0
303
local Sit = 1
304
----------------------------------------------------------------------------------
305
hum.WalkSpeed = 16
306
hum.JumpPower = 70
307
----------------------------------------------------------------------------------
308
function clerp(a, b, t)
309
    local qa = {
310
        QuaternionFromCFrame(a)
311
    }
312
    local qb = {
313
        QuaternionFromCFrame(b)
314
    }
315
    local ax, ay, az = a.x, a.y, a.z
316
    local bx, by, bz = b.x, b.y, b.z
317
    local _t = 1 - t
318
    return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
319
end
320
321
function swait(num)
322
    if num == 0 or num == nil then
323
        game:service("RunService").Stepped:wait(0)
324
    else
325
        for i = 0, num do
326
            game:service("RunService").Stepped:wait(0)
327
        end
328
    end
329
end
330
331
function QuaternionFromCFrame(cf)
332
    local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
333
    local trace = m00 + m11 + m22
334
    if trace > 0 then
335
        local s = math.sqrt(1 + trace)
336
        local recip = 0.5 / s
337
        return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
338
    else
339
        local i = 0
340
        if m00 < m11 then
341
            i = 1
342
        end
343
        if m22 > (i == 0 and m00 or m11) then
344
            i = 2
345
        end
346
        if i == 0 then
347
            local s = math.sqrt(m00 - m11 - m22 + 1)
348
            local recip = 0.5 / s
349
            return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
350
        elseif i == 1 then
351
            local s = math.sqrt(m11 - m22 - m00 + 1)
352
            local recip = 0.5 / s
353
            return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
354
        elseif i == 2 then
355
            local s = math.sqrt(m22 - m00 - m11 + 1)
356
            local recip = 0.5 / s
357
            return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
358
        end
359
    end
360
end
361
function QuaternionToCFrame(px, py, pz, x, y, z, w)
362
    local xs, ys, zs = x + x, y + y, z + z
363
    local wx, wy, wz = w * xs, w * ys, w * zs
364
    local xx = x * xs
365
    local xy = x * ys
366
    local xz = x * zs
367
    local yy = y * ys
368
    local yz = y * zs
369
    local zz = z * zs
370
    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))
371
end
372
--------------------
373
Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
374
375
ArtificialHB = Instance.new("BindableEvent", script)
376
ArtificialHB.Name = "ArtificialHB"
377
378
script:WaitForChild("ArtificialHB")
379
380
frame = Frame_Speed
381
tf = 0
382
allowframeloss = false
383
tossremainder = false
384
lastframe = tick()
385
script.ArtificialHB:Fire()
386
387
game:GetService("RunService").Heartbeat:connect(function(s, p)
388
	tf = tf + s
389
	if tf >= frame then
390
		if allowframeloss then
391
			script.ArtificialHB:Fire()
392
			lastframe = tick()
393
		else
394
			for i = 1, math.floor(tf / frame) do
395
				script.ArtificialHB:Fire()
396
			end
397
		lastframe = tick()
398
		end
399
		if tossremainder then
400
			tf = 0
401
		else
402
			tf = tf - frame * math.floor(tf / frame)
403
		end
404
	end
405
end)
406
407
408
function Swait(NUMBER)
409
	if NUMBER == 0 or NUMBER == nil then
410
		ArtificialHB.Event:wait()
411
	else
412
		for i = 1, NUMBER do
413
			ArtificialHB.Event:wait()
414
		end
415
	end
416
end
417
--------------------
418
local RbxUtility = LoadLibrary("RbxUtility")
419
local Create = RbxUtility.Create
420
----------------------------
421
function QuaternionSlerp(a, b, t)
422
    local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
423
    local startInterp, finishInterp
424
    if cosTheta >= 1.0E-4 then
425
        if 1 - cosTheta > 1.0E-4 then
426
            local theta = math.acos(cosTheta)
427
            local invSinTheta = 1 / Sin(theta)
428
            startInterp = Sin((1 - t) * theta) * invSinTheta
429
            finishInterp = Sin(t * theta) * invSinTheta
430
        else
431
            startInterp = 1 - t
432
            finishInterp = t
433
        end
434
    elseif 1 + cosTheta > 1.0E-4 then
435
        local theta = math.acos(-cosTheta)
436
        local invSinTheta = 1 / Sin(theta)
437
        startInterp = Sin((t - 1) * theta) * invSinTheta
438
        finishInterp = Sin(t * theta) * invSinTheta
439
    else
440
        startInterp = t - 1
441
        finishInterp = t
442
    end
443
    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
444
end
445
446
function rayCast(Position, Direction, Range, Ignore)
447
    return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
448
end
449
-------------------------
450-
char.Head.face.Texture = "http://www.roblox.com/asset/?id=10770432"
450+
451
char.Head.face.Texture = "http://www.roblox.com/asset/?id=149118048"
452
-------------------------
453
function CreateSound(ID, PARENT, VOLUME, PITCH)
454
	local NEWSOUND = nil
455
	coroutine.resume(coroutine.create(function()
456
		NEWSOUND = IT("Sound", PARENT)
457
		NEWSOUND.Volume = VOLUME
458
		NEWSOUND.Pitch = PITCH
459
		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
460
		Swait()
461
		NEWSOUND:play()
462
		game:GetService("Debris"):AddItem(NEWSOUND, 10)
463
	end))
464
	return NEWSOUND
465
end
466
---------------------------------------------
467
function Taunt()
468
        attack = true
469
	hum.WalkSpeed = 0
470
        BTAUNT:Play()
471
        repeat
472
        swait()
473
        BTAUNT.Parent = tors
474
        rootj.C0 = clerp(rootj.C0, RootCF * CF(0* Player_Size, 0* Player_Size, -0.1 + 0.1* Player_Size * Cos(sine / 20)) * angles(Rad(10), Rad(0), Rad(0)), 0.08)
475
	tors.Neck.C0 = clerp(tors.Neck.C0, necko* CF(0, 0, 0 + ((1* Player_Size) - 1)) * angles(Rad(25 - 2.5 * Sin(sine / 30)), Rad(0), Rad(-2.5 * Cos(sine / 1.5))), 0.08)
476
	RH.C0 = clerp(RH.C0, CF(1* Player_Size, -0.9 - 0.1 * Cos(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(0), Rad(80), Rad(0)) * angles(Rad(-10.5), Rad(-2.5 * Cos(sine / 1.5)), Rad(10)), 0.08)
477
	LH.C0 = clerp(LH.C0, CF(-1* Player_Size, -0.9 - 0.1 * Cos(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(0), Rad(-80), Rad(0)) * angles(Rad(-10.5), Rad(-2.5 * Cos(sine / 1.5)), Rad(-10)), 0.08)
478
        RW.C0 = clerp(RW.C0, CF(1.5* Player_Size, 0.5 + 0.02 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(0), Rad(-.6), Rad(210)), 0.08)
479
	LW.C0 = clerp(LW.C0, CF(-1 * Player_Size, 0.5 + 0.02 * Sin(sine / 20)* Player_Size, .6* Player_Size) * angles(Rad(-20), Rad(-.6), Rad(43)), 0.08)
480
	until BTAUNT.Playing == false
481
        attack = false
482
	hum.WalkSpeed = 16
483
end
484
---------------------------------------------
485
function kdown(k)
486
    if k == "t" then
487
        Taunt()
488
    end
489
end
490
 
491
mou.KeyDown:connect(kdown)
492
-----------------------------------------------------------------
493
local equipped = false
494
local idle = 0
495
local change = 1
496
local val = 0
497
local toim = 0
498
local idleanim = 0.4
499
hum.Animator.Parent = nil
500
while true do
501
    swait()
502
    sine = sine + change
503
   
504
    Music.Parent = char
505
    local torvel = (root.Velocity * Vector3.new(1, 0, 1)).magnitude
506
    local velderp = root.Velocity.y
507
    hitfloor, posfloor = rayCast(root.Position, CFrame.new(root.Position, root.Position - Vector3.new(0, 1, 0)).lookVector, 4, char)
508
    if equipped == true or equipped == false then
509
        if attack == false then
510
            idle = idle + 1
511
        else
512
            idle = 0
513
        end
514
        if 1 < root.Velocity.y and hitfloor == nil then
515
            Anim = "Jump"
516
            if attack == false then
517
                rootj.C0 = clerp(rootj.C0, RootCF * angles(math.min(math.max(root.Velocity.Y/100,-Rad(65)),Rad(65)),0,0),0.3)
518
                tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(-10), Rad(0), Rad(0)), 0.3)
519
                RW.C0 = clerp(RW.C0, CF(1.5, 0.5, 0) * angles(math.min(math.max(root.Velocity.Y/100,-Rad(65)),Rad(65)),0,Rad(15)),0.3)
520
                LW.C0 = clerp(LW.C0, CF(-1.5, 0.5, 0) * angles(math.min(math.max(root.Velocity.Y/100,-Rad(65)),Rad(65)),0,Rad(-15)),0.3)
521
                LH.C0=clerp(LH.C0, CF(-1,-.4-0.1 * Cos(sine / 20), -.6) * LHCF * angles(Rad(-5), Rad(-0), Rad(20)), 0.15)
522
                RH.C0=clerp(RH.C0, CF(1,-1-0.1 * Cos(sine / 20), -.3) * angles(Rad(0), Rad(90), Rad(0)), .3)
523
            end
524
        elseif -1 > root.Velocity.y and hitfloor == nil then
525
            Anim = "Fall"
526
            if attack == false then
527
                rootj.C0 = clerp(rootj.C0, RootCF * angles(math.min(math.max(root.Velocity.Y/100,-Rad(65)),Rad(65)),0,0),0.3)
528
                tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(10), Rad(0), Rad(0)), 0.3)
529
                RW.C0 = clerp(RW.C0, CF(1.5, 0.5, 0) * angles(math.min(math.max(root.Velocity.Y/100,-Rad(65)),Rad(65)),0,Rad(90)),0.3)
530
                LW.C0 = clerp(LW.C0, CF(-1.5, 0.5, 0) * angles(math.min(math.max(root.Velocity.Y/100,-Rad(65)),Rad(65)),0,Rad(-90)),0.3)
531
                LH.C0 = clerp(LH.C0, CF(-1,-.4-0.1 * Cos(sine / 20), -.6) * LHCF * angles(Rad(-5), Rad(-0), Rad(20)), 0.15)
532
                RH.C0 = clerp(RH.C0, CF(1,-1-0.1 * Cos(sine / 20), -.3) * angles(Rad(0), Rad(90), Rad(0)), .3)
533
            end
534
        elseif torvel < 1 and hitfloor ~= nil then
535
            Anim = "Idle"
536
            change = 1
537
            if attack == false then
538
                rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.1 + 0.1 * Cos(sine / 20)) * angles(Rad(0), Rad(0), Rad(0)), 0.15)
539
                tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(-2.5 * Sin(sine / 20)), Rad(0), Rad(0)), 0.3)
540
                RH.C0 = clerp(RH.C0, CF(1, -0.9 - 0.1 * Cos(sine / 20), 0.025 * Cos(sine / 20)) * RHCF * angles(Rad(-4.5), Rad(0), Rad(0)), 0.15)
541
                LH.C0 = clerp(LH.C0, CF(-1, -0.9 - 0.1 * Cos(sine / 20), 0.025 * Cos(sine / 20)) * LHCF * angles(Rad(-6.5), Rad(0), Rad(0)), 0.15)
542
                RW.C0 = clerp(RW.C0, CF(1.5, 0.5 + 0.05 * Sin(sine / 20), 0.025 * Cos(sine / 20)) * angles(Rad(0), Rad(-10 * Cos(sine / 20)), Rad(5 - 2.5 * Sin(sine / 20))), 0.1)
543
                LW.C0 = clerp(LW.C0, CF(-1.5, 0.5 + 0.05 * Sin(sine / 20), 0.025 * Cos(sine / 20)) * angles(Rad(0), Rad(10 * Cos(sine / 20)), Rad(-5 + 2.5 * Sin(sine / 20))), 0.1)
544
            end
545
        elseif tors.Velocity.magnitude < 50 and hitfloor ~= nil then
546
            Anim = "Walk"
547
            change = 1
548
            if attack == false then
549
                rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.175 + 0.025 * Cos(sine / 3.5) + -Sin(sine / 3.5) / 7) * angles(Rad(4-2.5 * Cos(sine / 3.5)), Rad(0) - root.RotVelocity.Y / 75, Rad(5 * Cos(sine / 7))), 0.15)
550
                tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(-2.5 * Sin(sine / 20)), Rad(0), Rad(0) - hed.RotVelocity.Y / 15), 0.3)
551
                RH.C0 = clerp(RH.C0, CF(1, -0.925 - 0.5 * Cos(sine / 7) / 2, 0.5 * Cos(sine / 7) / 2) * angles(Rad(-15 - 5 * Cos(sine / 7)) - rl.RotVelocity.Y / 75 + -Sin(sine / 7) / 2.5, Rad(90 - 0.1 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 + 0.1 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3)
552
                LH.C0 = clerp(LH.C0, CF(-1, -0.925 + 0.5 * Cos(sine / 7) / 2, -0.5 * Cos(sine / 7) / 2) * angles(Rad(-15 + 5 * Cos(sine / 7)) + ll.RotVelocity.Y / 75 + Sin(sine / 7) / 2.5, Rad(-90 - 0.1 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 - 0.1 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3)
553
                RW.C0 = clerp(RW.C0, CF(1.5, 0.5 + 0.05 * Sin(sine / 7), 0.15 * Cos(sine / 7)) * angles(Rad(45)  * Cos(sine / 7) , Rad(0), Rad(5) - ra.RotVelocity.Y / 75), 0.1)
554
                LW.C0 = clerp(LW.C0, CF(-1.5, 0.5 + 0.05 * Sin(sine / 7), -0.15 * Cos(sine / 7)) * angles(Rad(-45)  * Cos(sine / 7) , Rad(0) ,  Rad(-5) + la.RotVelocity.Y / 75), 0.1)
555
            end
556
        end
557
    end
558
    Music.SoundId = "rbxassetid://"..SONG
559
    Music.Looped = true
560
    Music.Pitch = 1
561
    Music.Volume = 3
562
    Music.Parent = tors
563
    Music:Resume()
564
    if 0 < #Effects then
565
        for e = 1, #Effects do
566
            if Effects[e] ~= nil then
567
                local Thing = Effects[e]
568
                if Thing ~= nil then
569
                    local Part = Thing[1]
570
                    local Mode = Thing[2]
571
                    local Delay = Thing[3]
572
                    local IncX = Thing[4]
573
                    local IncY = Thing[5]
574
                    local IncZ = Thing[6]
575
                    if 1 >= Thing[1].Transparency then
576
                        if Thing[2] == "Block1" then
577
                            Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
578
                            local Mesh = Thing[1].Mesh
579
                            Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
580
                            Thing[1].Transparency = Thing[1].Transparency + Thing[3]
581
                        elseif Thing[2] == "Block2" then
582
                            Thing[1].CFrame = Thing[1].CFrame + Vector3.new(0, 0, 0)
583
                            local Mesh = Thing[7]
584
                            Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
585
                            Thing[1].Transparency = Thing[1].Transparency + Thing[3]
586
                        elseif Thing[2] == "Block3" then
587
                            Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) + Vector3.new(0, 0.15, 0)
588
                            local Mesh = Thing[7]
589
                            Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
590
                            Thing[1].Transparency = Thing[1].Transparency + Thing[3]
591
                        elseif Thing[2] == "Cylinder" then
592
                            local Mesh = Thing[1].Mesh
593
                            Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
594
                            Thing[1].Transparency = Thing[1].Transparency + Thing[3]
595
                        elseif Thing[2] == "Blood" then
596
                            local Mesh = Thing[7]
597
                            Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0)
598
                            Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
599
                            Thing[1].Transparency = Thing[1].Transparency + Thing[3]
600
                        elseif Thing[2] == "Elec" then
601
                            local Mesh = Thing[1].Mesh
602
                            Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
603
                            Thing[1].Transparency = Thing[1].Transparency + Thing[3]
604
                        elseif Thing[2] == "Disappear" then
605
                            Thing[1].Transparency = Thing[1].Transparency + Thing[3]
606
                        elseif Thing[2] == "Shatter" then
607
                            Thing[1].Transparency = Thing[1].Transparency + Thing[3]
608
                            Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
609
                            Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
610
                            Thing[6] = Thing[6] + Thing[5]
611
                        end
612
                    else
613
                        Part.Parent = nil
614
                        table.remove(Effects, e)
615
                    end
616
                end
617
            end
618
        end
619
    end
620
end
621
-------------------------------------------------------
622
--End Animations And Script--
623
-------------------------------------------------------