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