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