View difference between Paste ID: nY4fD3sf and edWaWeZm
SHOW: | | - or go back to the newest paste.
1
--https://github.com/Mokiros/roblox-FE-compatibility
2
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
3
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
4
local RealPlayer = Player
5
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={},Soundscape=r:GetService("RunService").Heartbeat,BindToSoundscape=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
6
7
--//====================================================\\--
8
--||			   CREATED BY SHACKLUSTER
9
--\\====================================================//--
10
11
12
13
wait(0.2)
14
15
16
17
Player = game:GetService("Players").LocalPlayer
18
PlayerGui = Player.PlayerGui
19
Cam = workspace.CurrentCamera
20
Backpack = Player.Backpack
21
Character = Player.Character
22
Humanoid = Character.Humanoid
23
Mouse = Player:GetMouse()
24
RootPart = Character["HumanoidRootPart"]
25
Torso = Character["Torso"]
26
Head = Character["Head"]
27
RightArm = Character["Right Arm"]
28
LeftArm = Character["Left Arm"]
29
RightLeg = Character["Right Leg"]
30
LeftLeg = Character["Left Leg"]
31
RootJoint = RootPart["RootJoint"]
32
Neck = Torso["Neck"]
33
RightShoulder = Torso["Right Shoulder"]
34
LeftShoulder = Torso["Left Shoulder"]
35
RightHip = Torso["Right Hip"]
36
LeftHip = Torso["Left Hip"]
37
local sick = Instance.new("Sound",Character)
38-
sick.SoundId = "rbxassetid://1237585433"
38+
sick.SoundId = "rbxassetid://386781032"
39
sick.Looped = true
40-
sick.Pitch = .9
40+
sick.Pitch = 1
41-
sick.Volume = 1
41+
sick.Volume = 50
42
sick:Play()
43
44
IT = Instance.new
45
CF = CFrame.new
46
VT = Vector3.new
47
RAD = math.rad
48
C3 = Color3.new
49
UD2 = UDim2.new
50
BRICKC = BrickColor.new
51
ANGLES = CFrame.Angles
52
EULER = CFrame.fromEulerAnglesXYZ
53
COS = math.cos
54
ACOS = math.acos
55
SIN = math.sin
56
ASIN = math.asin
57
ABS = math.abs
58
MRANDOM = math.random
59
FLOOR = math.floor
60
61
--//=================================\\
62
--||		  CUSTOMIZATION
63
--\\=================================//
64
65
Class_Name = "Greed"
66
Weapon_Name = "Add-ons"
67
68
Custom_Colors = {
69
	Custom_Color_1 = BRICKC("Institutional white"); --1st color for the weapon.
70
	Custom_Color_2 = BRICKC("Institutional white"); --2nd color for the weapon.
71
72
	Custom_Color_3 = BRICKC("Institutional white"); --Color for the abilities.
73
	Custom_Color_4 = BRICKC("Institutional white"); --Color for the secondary bar.
74
	Custom_Color_5 = BRICKC("Institutional white"); --Color for the mana bar.
75
	Custom_Color_6 = BRICKC("Institutional white"); --Color for the health bar.
76
	Custom_Color_7 = BRICKC("Institutional white"); --Color for the stun bar.
77
78
	Custom_Color_8 = BRICKC("Institutional white"); --Background for the mana bar.
79
	Custom_Color_9 = BRICKC("Institutional white"); --Background for the secondary mana bar.
80
	Custom_Color_10 = BRICKC("Institutional white"); --Background for the stun bar.
81
	Custom_Color_11 = BRICKC("Institutional white"); --Background for the health bar.
82
	Custom_Color_12 = BRICKC("Institutional white"); --Background for the abilities.
83
}
84
85
86
Player_Size = 1 --Size of the player.
87
Animation_Speed = 3
88
Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
89
90
local Speed = 9
91
local Effects2 = {}
92
93
--//=================================\\
94
--|| 	  END OF CUSTOMIZATION
95
--\\=================================//
96
97
	local function weldBetween(a, b)
98
	    local weldd = Instance.new("ManualWeld")
99
	    weldd.Part0 = a
100
	    weldd.Part1 = b
101
	    weldd.C0 = CFrame.new()
102
	    weldd.C1 = b.CFrame:inverse() * a.CFrame
103
	    weldd.Parent = a
104
	    return weldd
105
	end
106
107
--//=================================\\
108
--|| 	      USEFUL VALUES
109
--\\=================================//
110
111
local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
112
local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
113
local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
114
local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
115
local CO1 = 0
116
local CO2 = 0
117
local CO3 = 0
118
local CO4 = 0
119
local CHANGEDEFENSE = 0
120
local CHANGEDAMAGE = 0
121
local CHANGEMOVEMENT = 0
122
local ANIM = "Idle"
123
local ATTACK = false
124
local EQUIPPED = false
125
local HOLD = false
126
local COMBO = 1
127
local LASTPOINT = nil
128
local BLCF = nil
129
local SCFR = nil
130
local STAGGERHITANIM = false
131
local STAGGERANIM = false
132
local STUNANIM = false
133
local CRITCHANCENUMBER = 0
134
local IDLENUMBER = 0
135
local DONUMBER = 0
136
local HANDIDLE = false
137
local Rooted = false
138
local SINE = 0
139
local CHANGE = 2 / Animation_Speed
140
local WALKINGANIM = false
141
local WALK = 0
142
local DISABLEJUMPING = false
143
local ROBLOXIDLEANIMATION = IT("Animation")
144
ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
145
ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
146
--ROBLOXIDLEANIMATION.Parent = Humanoid
147
local ANIMATOR = Humanoid.Animator
148
local ANIMATE = Character.Animate
149
local UNANCHOR = true
150
151
local SKILLTEXTCOLOR = C3(0,0,0)
152
153
--//=================================\\
154
--\\=================================//
155
156
157
--//=================================\\
158
--|| SAZERENOS' ARTIFICIAL HEARTBEAT
159
--\\=================================//
160
161
ArtificialHB = Instance.new("BindableEvent", script)
162
ArtificialHB.Name = "ArtificialHB"
163
164
script:WaitForChild("ArtificialHB")
165
166
frame = Frame_Speed
167
tf = 0
168
allowframeloss = false
169
tossremainder = false
170
lastframe = tick()
171
script.ArtificialHB:Fire()
172
173
game:GetService("RunService").Heartbeat:connect(function(s, p)
174
	tf = tf + s
175
	if tf >= frame then
176
		if allowframeloss then
177
			script.ArtificialHB:Fire()
178
			lastframe = tick()
179
		else
180
			for i = 1, math.floor(tf / frame) do
181
				script.ArtificialHB:Fire()
182
			end
183
		lastframe = tick()
184
		end
185
		if tossremainder then
186
			tf = 0
187
		else
188
			tf = tf - frame * math.floor(tf / frame)
189
		end
190
	end
191
end)
192
193
--//=================================\\
194
--\\=================================//
195
196
197
198
199
200
--//=================================\\
201
--|| 	      SOME FUNCTIONS
202
--\\=================================//
203
204
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
205
	return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
206
end
207
208
function PositiveAngle(NUMBER)
209
	if NUMBER >= 0 then
210
		NUMBER = 0
211
	end
212
	return NUMBER
213
end
214
215
function NegativeAngle(NUMBER)
216
	if NUMBER <= 0 then
217
		NUMBER = 0
218
	end
219
	return NUMBER
220
end
221
222
function Swait(NUMBER)
223
	if NUMBER == 0 or NUMBER == nil then
224
		ArtificialHB.Event:wait()
225
	else
226
		for i = 1, NUMBER do
227
			ArtificialHB.Event:wait()
228
		end
229
	end
230
end
231
232
function QuaternionFromCFrame(cf)
233
	local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
234
	local trace = m00 + m11 + m22
235
	if trace > 0 then 
236
		local s = math.sqrt(1 + trace)
237
		local recip = 0.5 / s
238
		return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
239
	else
240
		local i = 0
241
		if m11 > m00 then
242
			i = 1
243
		end
244
		if m22 > (i == 0 and m00 or m11) then
245
			i = 2
246
		end
247
		if i == 0 then
248
			local s = math.sqrt(m00 - m11 - m22 + 1)
249
			local recip = 0.5 / s
250
			return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
251
		elseif i == 1 then
252
			local s = math.sqrt(m11 - m22 - m00 + 1)
253
			local recip = 0.5 / s
254
			return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
255
		elseif i == 2 then
256
			local s = math.sqrt(m22 - m00 - m11 + 1)
257
			local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
258
		end
259
	end
260
end
261
 
262
function QuaternionToCFrame(px, py, pz, x, y, z, w)
263
	local xs, ys, zs = x + x, y + y, z + z
264
	local wx, wy, wz = w * xs, w * ys, w * zs
265
	local xx = x * xs
266
	local xy = x * ys
267
	local xz = x * zs
268
	local yy = y * ys
269
	local yz = y * zs
270
	local zz = z * zs
271
	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))
272
end
273
 
274
function QuaternionSlerp(a, b, t)
275
	local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
276
	local startInterp, finishInterp;
277
	if cosTheta >= 0.0001 then
278
		if (1 - cosTheta) > 0.0001 then
279
			local theta = ACOS(cosTheta)
280
			local invSinTheta = 1 / SIN(theta)
281
			startInterp = SIN((1 - t) * theta) * invSinTheta
282
			finishInterp = SIN(t * theta) * invSinTheta
283
		else
284
			startInterp = 1 - t
285
			finishInterp = t
286
		end
287
	else
288
		if (1 + cosTheta) > 0.0001 then
289
			local theta = ACOS(-cosTheta)
290
			local invSinTheta = 1 / SIN(theta)
291
			startInterp = SIN((t - 1) * theta) * invSinTheta
292
			finishInterp = SIN(t * theta) * invSinTheta
293
		else
294
			startInterp = t - 1
295
			finishInterp = t
296
		end
297
	end
298
	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
299
end
300
301
function Clerp(a, b, t)
302
	local qa = {QuaternionFromCFrame(a)}
303
	local qb = {QuaternionFromCFrame(b)}
304
	local ax, ay, az = a.x, a.y, a.z
305
	local bx, by, bz = b.x, b.y, b.z
306
	local _t = 1 - t
307
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
308
end
309
310
function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
311
	local frame = IT("Frame")
312
	frame.BackgroundTransparency = TRANSPARENCY
313
	frame.BorderSizePixel = BORDERSIZEPIXEL
314
	frame.Position = POSITION
315
	frame.Size = SIZE
316
	frame.BackgroundColor3 = COLOR
317
	frame.BorderColor3 = BORDERCOLOR
318
	frame.Name = NAME
319
	frame.Parent = PARENT
320
	return frame
321
end
322
323
function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
324
	local label = IT("TextLabel")
325
	label.BackgroundTransparency = 1
326
	label.Size = UD2(1, 0, 1, 0)
327
	label.Position = UD2(0, 0, 0, 0)
328
	label.TextColor3 = TEXTCOLOR
329
	label.TextStrokeTransparency = STROKETRANSPARENCY
330
	label.TextTransparency = TRANSPARENCY
331
	label.FontSize = TEXTFONTSIZE
332
	label.Font = TEXTFONT
333
	label.BorderSizePixel = BORDERSIZEPIXEL
334
	label.TextScaled = false
335
	label.Text = TEXT
336
	label.Name = NAME
337
	label.Parent = PARENT
338
	return label
339
end
340
341
function NoOutlines(PART)
342
	PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
343
end
344
345
346
function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
347
	local NEWWELD = IT(TYPE)
348
	NEWWELD.Part0 = PART0
349
	NEWWELD.Part1 = PART1
350
	NEWWELD.C0 = C0
351
	NEWWELD.C1 = C1
352
	NEWWELD.Parent = PARENT
353
	return NEWWELD
354
end
355
356
function CreateSound(ID, PARENT, VOLUME, PITCH)
357
	local NEWSOUND = nil
358
	coroutine.resume(coroutine.create(function()
359
		NEWSOUND = IT("Sound", PARENT)
360
		NEWSOUND.Volume = VOLUME
361
		NEWSOUND.Pitch = PITCH
362
		NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
363
		Swait()
364
		NEWSOUND:play()
365
		game:GetService("Debris"):AddItem(NEWSOUND, 10)
366
	end))
367
	return NEWSOUND
368
end
369
370
function CFrameFromTopBack(at, top, back)
371
	local right = top:Cross(back)
372
	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)
373
end
374
375
--//=================================\\
376
--|| 			SPEECH
377
--\\=================================//
378
379
local speak = Instance.new("Sound",Head)
380
speak.SoundId = "rbxassetid://418252437"
381
speak.Volume = 4
382
383
function chatfunc(text,waitt)
384
local chat = coroutine.wrap(function()
385
if Character:FindFirstChild("TalkingBillBoard")~= nil then
386
Character:FindFirstChild("TalkingBillBoard").Parent = nil
387
end
388
local naeeym2 = Instance.new("BillboardGui",Character)
389
naeeym2.Size = UDim2.new(0,100,0,40)
390
naeeym2.StudsOffset = Vector3.new(0,2,0)
391
naeeym2.Adornee = Character.Head
392
naeeym2.Name = "TalkingBillBoard"
393
naeeym2.AlwaysOnTop = true
394
local tecks2 = Instance.new("TextLabel",naeeym2)
395
tecks2.BackgroundTransparency = 1
396
tecks2.BorderSizePixel = 0
397
tecks2.Text = ""
398
tecks2.Font = "Fantasy"
399
tecks2.TextSize = 30
400
tecks2.TextStrokeTransparency = 1
401
tecks2.TextColor3 = SKILLTEXTCOLOR
402
tecks2.TextStrokeColor3 = Color3.new(0,0,0)
403
tecks2.Size = UDim2.new(1,0,0.5,0)
404
for i = 1,string.len(text),1 do
405
if naeeym2.Parent ~= nil then
406
	tecks2.Text = string.sub(text,1,i)
407
	speak.PlaybackSpeed = (math.random(8,9)/10)
408
	speak:Play()
409
	Swait(3)
410
end
411
end
412
wait(waitt)
413
coroutine.resume(coroutine.create(function()
414
	for i = 1, 10 do
415
		tecks2.TextTransparency = tecks2.TextTransparency + 0.1
416
		Swait()
417
	end
418
	naeeym2:Destroy()
419
end))
420
end)
421
chat()
422
end
423
424
--//=================================\\
425
--||			DAMAGING
426
--\\=================================//
427
428
function goldify(hit)
429
	local GOLDNAMES = {"Gold","Shiny rock","Munz","$$"}
430
	hit.Anchored = false
431
	hit.CanCollide = true
432
	hit.Parent = workspace
433
	hit.Name = GOLDNAMES[MRANDOM(1,#GOLDNAMES)]
434
	hit.Material = "Glass"
435-
	hit.BrickColor = BRICKC("Bright yellow")
435+
	hit.BrickColor = BRICKC("White")
436
	if hit:FindFirstChildOfClass("SpecialMesh") then
437
		local mesh = hit:FindFirstChildOfClass("SpecialMesh")
438
		mesh.TextureId = ""
439
	end
440
	if hit:FindFirstChildOfClass("Decal") then
441
		local mesh = hit:FindFirstChildOfClass("Decal")
442
		mesh:remove()
443
	end
444
	if hit.ClassName == "MeshPart" then
445
		hit.TextureID = ""
446
	end
447
	if hit.ClassName == "UnionOperation" then
448
		hit.UsePartColor = true
449
	end
450
end
451
452
function turntogold(hit)
453
	if hit.Parent ~= Character then
454
		if hit.Parent ~= workspace then
455
			print("My gold...")
456
			local body = hit.Parent:GetChildren()
457
			for part = 1, #body do
458
				local child = body[part]
459
				if child.ClassName == "Part" or child.ClassName == "MeshPart" or child.ClassName == "UnionOperation" then
460
					if child.Name == "Head" then
461
						CreateSound("1037197054", child, 2, 1)
462
					end
463
					goldify(child)
464
				elseif child.ClassName == "Accessory" or child.ClassName == "Hat" then
465
					if child:FindFirstChild("Handle") then
466
						goldify(child.Handle)
467
					end
468
				end
469
			end
470
		else
471
			goldify(hit)
472
		end
473
	end
474
end
475
476
--//=================================\\
477
--||	ATTACK FUNCTIONS AND STUFF
478
--\\=================================//
479
480
local hit = Torso.Touched:Connect(function(hit)
481
	if hit.Parent:FindFirstChild("Humanoid") then
482
		turntogold(hit)
483
	end
484
end)
485
local hit = RightArm.Touched:Connect(function(hit)
486
	if hit.Parent:FindFirstChild("Humanoid") then
487
		turntogold(hit)
488
	end
489
end)
490
local hit = LeftArm.Touched:Connect(function(hit)
491
	if hit.Parent:FindFirstChild("Humanoid") then
492
		turntogold(hit)
493
	end
494
end)
495
local hit = RightLeg.Touched:Connect(function(hit)
496
	if hit.Parent:FindFirstChild("Humanoid") then
497
		turntogold(hit)
498
	end
499
end)
500
local hit = LeftLeg.Touched:Connect(function(hit)
501
	if hit.Parent:FindFirstChild("Humanoid") then
502
		turntogold(hit)
503
	end
504
end)
505
local hit = Head.Touched:Connect(function(hit)
506
	if hit.Parent:FindFirstChild("Humanoid") then
507
		turntogold(hit)
508
	end
509
end)
510
511
--//=================================\\
512
--||	  ASSIGN THINGS TO KEYS
513
--\\=================================//
514
515
function KeyDown(Key)
516
	if Key == "t" and ATTACK == false then
517
		chatfunc("!",100)
518
		Swait(150)
519
		chatfunc("Gold!",5)
520
		Swait(150)
521
		chatfunc("Hell..?",1)
522
		Swait(45)
523
		chatfunc("Maybe i can take this easier",1)
524
	end
525
end
526
527
function KeyUp(Key)
528
end
529
530
	Mouse.KeyDown:connect(function(NEWKEY)
531
		KeyDown(NEWKEY)
532
	end)
533
	Mouse.KeyUp:connect(function(NEWKEY)
534
		KeyUp(NEWKEY)
535
	end)
536
537
538
--//=================================\\
539
--\\=================================//
540
541
542
function unanchor()
543
	if UNANCHOR == true then
544
		g = Character:GetChildren()
545
		for i = 1, #g do
546
			if g[i].ClassName == "Part" then
547
				g[i].Anchored = false
548
			end
549
		end
550
	end
551
end
552
553
554
--//=================================\\
555
--||	WRAP THE WHOLE SCRIPT UP
556
--\\=================================//
557
558
559
		ANIMATE.Parent = nil
560
		local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
561
		IDLEANIMATION:Play()
562
563
while true do
564
	Swait()
565
	SINE = SINE + CHANGE
566
	local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
567
	local TORSOVERTICALVELOCITY = RootPart.Velocity.y
568
	local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position)
569
	local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character)
570
	local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
571
		if ANIM == "Walk" and TORSOVELOCITY > 1 then
572
			RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.1 * COS(SINE / (WALKSPEEDVALUE / 2)) * Player_Size) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
573
			Neck.C1 = Clerp(Neck.C1, CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * 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)
574
			RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 0.875 * Player_Size - 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, -0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(30 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
575
			LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 0.875 * Player_Size + 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, 0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(30 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
576
		elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
577
			RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
578
			Neck.C1 = Clerp(Neck.C1, CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
579
			RightHip.C1 = Clerp(RightHip.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)), 0.2 / Animation_Speed)
580
			LeftHip.C1 = Clerp(LeftHip.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)), 0.2 / Animation_Speed)
581
		end
582
		if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
583
			ANIM = "Jump"
584
			if ATTACK == false then
585
				RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
586
				Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
587
				RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
588
				LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
589
				RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
590
				LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed)
591
	        end
592
		elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
593
			ANIM = "Fall"
594
			if ATTACK == false then
595
				RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
596
				Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
597
				RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(60)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
598
				LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
599
				RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed)
600
				LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
601
			end
602
		elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
603
			ANIM = "Idle"
604
			if ATTACK == false then
605
				RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
606
				Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(25 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
607
				RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
608
				LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
609
				RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size - 0.05 * COS(SINE / 12) * Player_Size, -0.01 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
610
				LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size - 0.05 * COS(SINE / 12) * Player_Size, -0.01 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
611
			end
612
		elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
613
			ANIM = "Walk"
614
			WALK = WALK + 1 / Animation_Speed
615
			if WALK >= 15 - (5 * (Humanoid.WalkSpeed / 16 / Player_Size)) then
616
				WALK = 0
617
				if WALKINGANIM == true then
618
					WALKINGANIM = false
619
				elseif WALKINGANIM == false then
620
					WALKINGANIM = true
621
				end
622
			end
623
			--RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 0.875 * Player_Size - 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, -0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
624
			--LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 0.875 * Player_Size + 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, 0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
625
			if ATTACK == false then
626
				RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
627
				Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(25 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
628
				RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(30 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
629
				LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-30 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
630
				RightHip.C0 = Clerp(RightHip.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)), 0.15 / Animation_Speed)
631
				LeftHip.C0 = Clerp(LeftHip.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)), 0.15 / Animation_Speed)
632
			end
633
		end
634
if #Effects2>0 then
635
for e=1,#Effects2 do
636
if Effects2[e]~=nil then
637
local Thing=Effects2[e]
638
if Thing~=nil then
639
local Part=Thing[1]
640
local Mode=Thing[2]
641
local Delay=Thing[3]
642
local IncX=Thing[4]
643
local IncY=Thing[5]
644
local IncZ=Thing[6]
645
local Part2=Thing[8]
646
if Thing[1].Transparency<=1 then
647
if Thing[2]=="Block1" then
648
Thing[1].CFrame=Thing[1].CFrame
649
Mesh=Thing[1].Mesh
650
Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
651
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
652
elseif Thing[2]=="Cylinder" then
653
Mesh=Thing[1].Mesh
654
Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
655
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
656
elseif Thing[2]=="Blood" then
657
Mesh=Thing[7]
658
Thing[1].CFrame=Thing[1].CFrame*CF(0,.5,0)
659
Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6])
660
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
661
elseif Thing[2]=="Elec" then
662
Mesh=Thing[1].Mesh
663
Mesh.Scale=Mesh.Scale+VT(Thing[7],Thing[8],Thing[9])
664
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
665
elseif Thing[2]=="Disappear" then
666
Thing[1].Transparency=Thing[1].Transparency+Thing[3]
667
end
668
else
669
Part.Parent=nil
670
table.remove(Effects2,e)
671
end
672
end
673
end
674
end
675
end
676
unanchor()
677
if Rooted == false then
678
	Disable_Jump = false
679
	Humanoid.WalkSpeed = Speed
680
elseif Rooted == true then
681
	Disable_Jump = true
682
	Humanoid.WalkSpeed = 0
683
end
684
end
685
686
--//=================================\\
687
--\\=================================//
688
689
690
691
692
693
--//====================================================\\--
694
--||			  		 END OF SCRIPT
695
--\\====================================================//--