View difference between Paste ID: 5RsDFxSX and T0SdL73n
SHOW: | | - or go back to the newest paste.
1
--//====================================================\\--
2
--||                       !POTATO!
3
--\\====================================================//--
4
5
local MODULE = script
6
local CHARACTER = owner.Character
7
local PLAYER = game:GetService("Players"):GetPlayerFromCharacter(CHARACTER)
8
local HUM = CHARACTER.Humanoid
9
local EVENT = Instance.new("RemoteEvent",MODULE)
10
EVENT.Name = "Event"
11
local REMOTE = MODULE.Event
12
13
local ROOT = HUM.Torso
14
local HEAD = CHARACTER.Head
15
local TORSO = CHARACTER.Torso
16
local RIGHTARM = CHARACTER["Right Arm"]
17
local LEFTARM = CHARACTER["Left Arm"]
18
local RIGHTLEG = CHARACTER["Right Leg"]
19
local LEFTLEG = CHARACTER["Left Leg"]
20
local ROOTJOINT = ROOT["RootJoint"]
21
local NECK = TORSO["Neck"]
22
local RIGHTSHOULDER = TORSO["Right Shoulder"]
23
local LEFTSHOULDER = TORSO["Left Shoulder"]
24
local RIGHTHIP = TORSO["Right Hip"]
25
local LEFTHIP = TORSO["Left Hip"]
26
local MOUSEPOS = ROOT.Position
27
28
IT = Instance.new
29
CF = CFrame.new
30
VT = Vector3.new
31
RAD = math.rad
32
C3 = Color3.new
33
UD2 = UDim2.new
34
BRICKC = BrickColor.new
35
ANGLES = CFrame.Angles
36
EULER = CFrame.fromEulerAnglesXYZ
37
COS = math.cos
38
ACOS = math.acos
39
SIN = math.sin
40
ASIN = math.asin
41
ABS = math.abs
42
MRANDOM = math.random
43
FLOOR = math.floor
44
45
--//====================================================\\--
46
--||                       FE CODE
47
--\\====================================================//--
48
49
if game:GetService("RunService"):IsClient()then error("RUN SCRIPT AS R/ AND NOT RL/.")end;print("FE CODE BY WAVERLYCOLE");InternalData = {}
50
do
51
	script.Parent = owner.Character
52
	local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
53
	local function NewFakeEvent()
54
		local Bind = Instance.new("BindableEvent")
55
		local Fake;Fake = {Connections = {},
56
		fakeEvent=true;
57
		Connect=function(self,Func)
58
			Bind.Event:connect(Func)
59
			self.Connections[Bind] = true
60
			return setmetatable({Connected = true},{
61
			__index = function (self,Index)
62
				if Index:lower() == "disconnect" then
63
					return function() Fake.Connections[Bind] = false;self.Connected = false end
64
				end
65
				return Fake[Index]
66
			end;
67
			__tostring = function() return "Connection" end;
68
		})
69
		end}
70
		Fake.connect = Fake.Connect;return Fake;
71
	end
72
	local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
73
	local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
74
	local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
75
		self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
76
	end};ContextActionService.UnBindAction = ContextActionService.BindAction
77
	local function TriggerEvent(self,Event,...)
78
		local Trigger = Mouse[Event]
79
		if Trigger and Trigger.fakeEvent and Trigger.Connections then
80
			for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
81
		end
82
	end
83
	Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
84
	Event.OnServerEvent:Connect(function(FiredBy,Input)
85
		if FiredBy.Name ~= owner.Name then return end
86
		if Input.MouseEvent then
87
			Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
88
		else
89
			local Begin = Input.UserInputState == Enum.UserInputState.Begin
90
			if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
91
			for _,Action in pairs(ContextActionService.Actions) do
92
				for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
93
			end
94
			Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
95
			UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
96
		end
97
	end)
98
	InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
99
	Event.Parent = NLS([[
100
		local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
101
		local Input = function(Input,gameProcessedEvent)
102
			if gameProcessedEvent then return end
103
			Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
104
		end
105
		UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
106
		local Hit,Target
107
		while wait(1/30) do
108
			if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
109
				Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
110
			end
111
		end
112
	]],owner.Character)
113
end
114
RealGame = game;game = setmetatable({},{
115
	__index = function (self,Index)
116
		local Sandbox = function (Thing)
117
			if Thing:IsA("Player") then
118
				local RealPlayer = Thing
119
				return setmetatable({},{
120
					__index = function (self,Index)
121
						local Type = type(RealPlayer[Index])
122
						if Type == "function" then
123
							if Index:lower() == "getmouse" or Index:lower() == "mouse" then
124
								return function (self)return InternalData["Mouse"] end
125
							end
126
							return function (self,...)return RealPlayer[Index](RealPlayer,...) end
127
						end
128
						return RealPlayer[Index]
129
					end;
130
					__tostring = function(self) return RealPlayer.Name end
131
				})
132
			end
133
		end
134
		if RealGame[Index] then
135
			local Type = type(RealGame[Index])
136
			if Type == "function" then
137
				if Index:lower() == "getservice" or Index:lower() == "service" then
138
					return function (self,Service)
139
						local FakeServices = {
140
							["players"] = function()
141
								return setmetatable({},{
142
									__index = function (self2,Index2)
143
										local RealService = RealGame:GetService(Service)
144
										local Type2 = type(Index2)
145
										if Type2 == "function" then
146
											return function (self,...) return RealService[Index2](RealService,...)end
147
										else
148
											if Index2:lower() == "localplayer" then return Sandbox(owner) end
149
											return RealService[Index2]
150
										end
151
									end;
152
									__tostring = function(self) return RealGame:GetService(Service).Name end
153
								})
154
							end;
155
							["contextactionservice"] = function() return InternalData["ContextActionService"] end;
156
							["userinputservice"] = function() return InternalData["UserInputService"] end;
157
							["runservice"] = function()
158
								return setmetatable({},{
159
									__index = function(self2,Index2)
160
										local RealService = RealGame:GetService(Service)
161
										local Type2 = type(Index2)
162
										if Type2 == "function" then
163
											return function (self,...) return RealService[Index2](RealService,...) end
164
										else
165
											local RunServices = {
166
												["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
167
												["renderstepped"] = function() return RealService["Stepped"] end
168
											}
169
											if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
170
											return RealService[Index2]
171
										end
172
									end
173
								})
174
							end
175
						}
176
						if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
177
						return RealGame:GetService(Service)
178
					end
179
				end
180
				return function (self,...) return RealGame[Index](RealGame,...) end
181
			else
182
				if game:GetService(Index) then return game:GetService(Index) end
183
				return RealGame[Index]
184
			end
185
		end
186
		return nil
187
	end
188
});Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
189
190
191
--//====================================================\\--
192
--||                  BACKGROUND VALUES
193
--\\====================================================//--
194
195
local ANIM_SPEED = 3
196
local MOUSE = owner:GetMouse()
197
local FRAME_SPEED = 1 / 60 -- (1 / 30) OR (1 / 60)
198
local CHANGE = 2 / ANIM_SPEED
199
local DAMAGEMULTIPLIER = 1
200
local ANIM = "Idle"
201
local KEYHOLD = false
202
local MOUSEHOLD = false
203
local ATTACKING = false
204
local Debris = game:GetService("Debris")
205
local Effects = IT("Folder",CHARACTER)
206
Effects.Name = "FXFolder"
207
local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
208
local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
209
local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
210
local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
211
local ANIMATE = CHARACTER:FindFirstChild("Animate")
212
local CROUCHED = false
213
local POTATOMODEL= Instance.new("Part",MODULE)
214
POTATOMODEL.Name = "Potato"
215
POTATOMODEL.CanCollide = false
216
POTATOMODEL.Size = Vector3.new(0.992, 1.288, 0.993)
217
MESHPOTATO = Instance.new("SpecialMesh",POTATOMODEL)
218-
MESHPOTATO.MeshId = "rbxassetid://477543051"
218+
MESHPOTATO.MeshId = "rbxassetid://11563093"
219-
MESHPOTATO.TextureId = "rbxassetid://477543054"
219+
MESHPOTATO.TextureId = "rbxassetid://11563076"
220
local POTATO = MODULE.Potato
221
POTATO.Parent = nil
222
local DEAD = false
223
224
--//====================================================\\--
225
--||                     HEARTBEAT
226
--\\====================================================//--
227
228
ArtificialHB = Instance.new("BindableEvent", script)
229
ArtificialHB.Name = "ArtificialHB"
230
231
script:WaitForChild("ArtificialHB")
232
233
frame = FRAME_SPEED
234
tf = 0
235
allowframeloss = false
236
tossremainder = false
237
lastframe = tick()
238
script.ArtificialHB:Fire()
239
240
game:GetService("RunService").Heartbeat:connect(function(s, p)
241
	tf = tf + s
242
	if tf >= frame then
243
		if allowframeloss then
244
			ArtificialHB:Fire()
245
			lastframe = tick()
246
		else
247
			for i = 1, math.floor(tf / frame) do
248
				ArtificialHB:Fire()
249
			end
250
			lastframe = tick()
251
		end
252
		if tossremainder then
253
			tf = 0
254
		else
255
			tf = tf - frame * math.floor(tf / frame)
256
		end
257
	end
258
end)
259
260
function PositiveAngle(NUMBER)
261
	if NUMBER >= 0 then
262
		NUMBER = 0
263
	end
264
	return NUMBER
265
end
266
267
function NegativeAngle(NUMBER)
268
	if NUMBER <= 0 then
269
		NUMBER = 0
270
	end
271
	return NUMBER
272
end
273
274
function Swait(NUMBER)
275
	if NUMBER == 0 or NUMBER == nil then
276
		ArtificialHB.Event:wait()
277
	else
278
		for i = 1, NUMBER do
279
			ArtificialHB.Event:wait()
280
		end
281
	end
282
end
283
284
--//====================================================\\--
285
--||                       CLERP
286
--\\====================================================//--
287
288
function QuaternionFromCFrame(cf)
289
	local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
290
	local trace = m00 + m11 + m22
291
	if trace > 0 then 
292
		local s = math.sqrt(1 + trace)
293
		local recip = 0.5 / s
294
		return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
295
	else
296
		local i = 0
297
		if m11 > m00 then
298
			i = 1
299
		end
300
		if m22 > (i == 0 and m00 or m11) then
301
			i = 2
302
		end
303
		if i == 0 then
304
			local s = math.sqrt(m00 - m11 - m22 + 1)
305
			local recip = 0.5 / s
306
			return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
307
		elseif i == 1 then
308
			local s = math.sqrt(m11 - m22 - m00 + 1)
309
			local recip = 0.5 / s
310
			return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
311
		elseif i == 2 then
312
			local s = math.sqrt(m22 - m00 - m11 + 1)
313
			local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
314
		end
315
	end
316
end
317
 
318
function QuaternionToCFrame(px, py, pz, x, y, z, w)
319
	local xs, ys, zs = x + x, y + y, z + z
320
	local wx, wy, wz = w * xs, w * ys, w * zs
321
	local xx = x * xs
322
	local xy = x * ys
323
	local xz = x * zs
324
	local yy = y * ys
325
	local yz = y * zs
326
	local zz = z * zs
327
	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))
328
end
329
 
330
function QuaternionSlerp(a, b, t)
331
	local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
332
	local startInterp, finishInterp;
333
	if cosTheta >= 0.0001 then
334
		if (1 - cosTheta) > 0.0001 then
335
			local theta = ACOS(cosTheta)
336
			local invSinTheta = 1 / SIN(theta)
337
			startInterp = SIN((1 - t) * theta) * invSinTheta
338
			finishInterp = SIN(t * theta) * invSinTheta
339
		else
340
			startInterp = 1 - t
341
			finishInterp = t
342
		end
343
	else
344
		if (1 + cosTheta) > 0.0001 then
345
			local theta = ACOS(-cosTheta)
346
			local invSinTheta = 1 / SIN(theta)
347
			startInterp = SIN((t - 1) * theta) * invSinTheta
348
			finishInterp = SIN(t * theta) * invSinTheta
349
		else
350
			startInterp = t - 1
351
			finishInterp = t
352
		end
353
	end
354
	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
355
end
356
357
function Clerp(a, b, t)
358
	local qa = {QuaternionFromCFrame(a)}
359
	local qb = {QuaternionFromCFrame(b)}
360
	local ax, ay, az = a.x, a.y, a.z
361
	local bx, by, bz = b.x, b.y, b.z
362
	local _t = 1 - t
363
	return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
364
end
365
366
--//====================================================\\--
367
--||                     FUNCTIONS
368
--\\====================================================//--
369
370
function Animate(INOUT)
371
	if INOUT == "In" then
372
		ANIMATE.Parent = CHARACTER
373
		ROOTJOINT.C0 = ROOTC0
374
		NECK.C0 = NECKC0
375
		RIGHTSHOULDER.C0 = CF(1.5, 0.5, 0) * RIGHTSHOULDERC0
376
		LEFTSHOULDER.C0 = CF(-1.5, 0.5, 0) * LEFTSHOULDERC0
377
		RIGHTHIP.C0 = CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
378
		LEFTHIP.C0 = CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
379
	elseif INOUT == "Out" then
380
		for _,v in next, HUM:GetPlayingAnimationTracks() do
381
			v:Stop();
382
		end
383
		ANIMATE.Parent = nil
384
	end
385
end
386
387
function WeldParts(A,B)
388
	local WLD = IT("ManualWeld")
389
	WLD.Part0 = A
390
	WLD.Part1 = B
391
	WLD.C1 = B.CFrame:inverse() * A.CFrame
392
	WLD.Parent = A
393
	return WLD
394
end
395
396
--NewSound({ID = 0,PARENT = ROOT,VOLUME = 0.5,PITCH = 1,LOOP = false,MAXDISTANCE = 1000,EMITTERSIZE = 10,PLAYING = true,PLAYONREMOVE = false,DOESDEBRIS = true})
397
function NewSound(TABLE)
398
	local ID = "rbxassetid://"..(TABLE.ID or 0)
399
	local PARENT = (TABLE.PARENT or ROOT)
400
	local VOLUME = (TABLE.VOLUME or 0.5)
401
	local PITCH = (TABLE.PITCH or 1)
402
	local LOOP = (TABLE.LOOP or false)
403
	local MAXDISTANCE = (TABLE.MAXDISTANCE or 100)
404
	local EMITTERSIZE = (TABLE.EMITTERSIZE or 10)
405
	local PLAYING = (TABLE.PLAYING or true)
406
	local PLAYONREMOVE = (TABLE.PLAYONREMOVE or false)
407
	local DOESDEBRIS = (TABLE.DOESDEBRIS or true)
408
	if ID ~= "rbxassetid://0" then
409
		local SOUND = IT("Sound",PARENT)
410
		SOUND.SoundId = ID
411
		SOUND.Volume = VOLUME
412
		SOUND.Pitch = PITCH
413
		SOUND.Looped = LOOP
414
		SOUND.MaxDistance = MAXDISTANCE
415
		SOUND.EmitterSize = EMITTERSIZE
416
		SOUND.PlayOnRemove = PLAYONREMOVE
417
		if DOESDEBRIS == true and PLAYING == true and LOOP == false then
418
			Debris:AddItem(SOUND,SOUND.TimeLength+5)
419
		end
420
		if PLAYING == true then
421
			SOUND:Play()
422
		end
423
		return SOUND
424
	end
425
end
426
427
function AttachmentCFrame(A)
428
	return A.Parent.CFrame*CF(A.Position)
429
end
430
431
function CastProperRay(StartPos, EndPos, Distance, Ignore)
432
	local DIRECTION = CF(StartPos,EndPos).lookVector
433
	return Raycast(StartPos, DIRECTION, Distance, Ignore)
434
end
435
436
function ApplyDamageTo(HUM,DAMAGE)
437
	if HUM.Health >= 0 then
438
		HUM.Health = HUM.Health - DAMAGE
439
		if HUM.Health <= 0 then
440
			HUM.Parent:Destroy()
441
		end
442
	end
443
end
444
445
function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
446
	return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
447
end
448
449
function Chatter(Text,Timer)
450
	local chat = coroutine.wrap(function()
451
		if CHARACTER:FindFirstChild("SpeechBoard")~= nil then
452
			CHARACTER:FindFirstChild("SpeechBoard"):destroy()
453
		end
454
		local naeeym2 = IT("BillboardGui",CHARACTER)
455
		naeeym2.Size = UD2(0,100,0,40)
456
		naeeym2.StudsOffset = Vector3.new(0,2,0)
457
		naeeym2.Adornee = HEAD
458
		naeeym2.Name = "SpeechBoard"
459
		naeeym2.AlwaysOnTop = true
460
		local tecks2 = IT("TextLabel",naeeym2)
461
		tecks2.BackgroundTransparency = 1
462
		tecks2.BorderSizePixel = 0
463
		tecks2.Text = ""
464
		tecks2.Font = "Legacy"
465
		tecks2.TextSize = 15
466
		tecks2.TextStrokeTransparency = 0
467
		tecks2.TextColor3 = Color3.new(1,1,1)
468
		tecks2.TextStrokeColor3 = Color3.new(0,0,0)
469
		tecks2.Size = UDim2.new(1,0,0.5,0)
470
		for i = 1,string.len(Text),1 do
471
			if naeeym2.Parent ~= CHARACTER then 
472
				break
473
			end
474
			tecks2.Text = string.sub(Text,1,i)
475
			wait(Timer)
476
		end
477
		wait(1)
478
		naeeym2:Destroy()
479
	end)
480
	chat()
481
end
482
483
--//====================================================\\--
484
--||                     ABILITIES
485
--\\====================================================//--
486
487
function Potato()
488
	if CROUCHED == false then
489
		Animate("Out")
490
		ATTACKING = true
491
		local TARGET = nil
492
		local POTAT = POTATO:Clone()
493
		POTAT.Parent = Effects
494
		POTAT.CFrame = RIGHTARM.CFrame*CF(0,-1.1,0) * ANGLES(RAD(90), RAD(0), RAD(0))
495
		local WLD = WeldParts(RIGHTARM,POTAT)
496-
		Chatter("GRIFFIIIIINNNN",0)
496+
		Chatter("AAAAAAAAAAAAAAA",0)
497-
		NewSound({ID = 1526471893,PARENT = HEAD,VOLUME = 5,PITCH = MRANDOM(9,11)/5,LOOP = false,MAXDISTANCE = 200,EMITTERSIZE = 15,PLAYING = true,PLAYONREMOVE = false,DOESDEBRIS = true})
497+
		NewSound({ID = 314568939,PARENT = HEAD,VOLUME = 20,PITCH = 1,LOOP = false,MAXDISTANCE = 200,EMITTERSIZE = 15,PLAYING = true,PLAYONREMOVE = false,DOESDEBRIS = true})
498
		for i=0, 0.5, 0.1 / ANIM_SPEED do
499
			Swait()
500
			ROOTJOINT.C0 = Clerp(ROOTJOINT.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-35)), 2 / ANIM_SPEED)
501
			NECK.C0 = Clerp(NECK.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(35)), 2 / ANIM_SPEED)
502
			RIGHTSHOULDER.C0 = Clerp(RIGHTSHOULDER.C0, CF(1.5, 1, 0.2) * ANGLES(RAD(170), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / ANIM_SPEED)
503
			LEFTSHOULDER.C0 = Clerp(LEFTSHOULDER.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(15), RAD(-45)) * LEFTSHOULDERC0, 1 / ANIM_SPEED)
504
			RIGHTHIP.C0 = Clerp(RIGHTHIP.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 2 / ANIM_SPEED)
505
			LEFTHIP.C0 = Clerp(LEFTHIP.C0, CF(-1, -0.5, -0.5) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-20)), 2 / ANIM_SPEED)
506
		end
507
		for i=0, 0.1, 0.1 / ANIM_SPEED do
508
			Swait()
509
			ROOTJOINT.C0 = Clerp(ROOTJOINT.C0,ROOTC0 * CF(0, -1, -0.5) * ANGLES(RAD(45), RAD(0), RAD(50)), 2 / ANIM_SPEED)
510
			NECK.C0 = Clerp(NECK.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(45), RAD(0), RAD(-10)), 2 / ANIM_SPEED)
511
			RIGHTSHOULDER.C0 = Clerp(RIGHTSHOULDER.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(25), RAD(0), RAD(25))*CF(0,-0.5,0) * RIGHTSHOULDERC0, 1 / ANIM_SPEED)
512
			LEFTSHOULDER.C0 = Clerp(LEFTSHOULDER.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-25), RAD(15), RAD(-15)) * LEFTSHOULDERC0, 1 / ANIM_SPEED)
513
			RIGHTHIP.C0 = Clerp(RIGHTHIP.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 2 / ANIM_SPEED)
514
			LEFTHIP.C0 = Clerp(LEFTHIP.C0, CF(-1, -0.7, -0.5) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(45)), 2 / ANIM_SPEED)
515
		end
516
		local FOES = {}
517
		for index, CHILD in pairs(workspace:GetChildren()) do
518
			if CHILD:FindFirstChildOfClass("Humanoid") and CHILD ~= CHARACTER then
519
				local HUMAN = CHILD:FindFirstChildOfClass("Humanoid")
520
				local ROOT2 = HUMAN.Torso
521
				if ROOT2 and CHILD:FindFirstChild("Head") then
522
					if (ROOT2.Position - ROOT.CFrame*CF(0,0,-1.25).p).Magnitude <= 3 then
523
						table.insert(FOES,CHILD.Head)
524
					end
525
				end
526
			end
527
		end
528
		if #FOES > 0 then
529
			local DIST = math.huge
530
			for E = 1, #FOES do
531
				if (FOES[E].Position - ROOT.Position).Magnitude < DIST then
532
					DIST = (FOES[E].Position - ROOT.Position).Magnitude
533
					TARGET = FOES[E]
534
				end
535
			end
536
		end
537
		if TARGET then
538
			NewSound({ID = 2174934221,PARENT = TARGET,VOLUME = 5,PITCH = MRANDOM(9,11)/10,LOOP = false,MAXDISTANCE = 200,EMITTERSIZE = 15,PLAYING = true,PLAYONREMOVE = false,DOESDEBRIS = true})
539
			local BV = IT("BodyVelocity")
540
			BV.MaxForce = BV.MaxForce * 500
541
			BV.Velocity = CF(ROOT.Position,TARGET.Position+VT(0,0.5,0)).lookVector*25
542
			BV.Parent = TARGET
543
			Debris:AddItem(BV,0.05)
544
			local HUM = TARGET.Parent:FindFirstChildOfClass("Humanoid")
545
			if HUM then
546
				ApplyDamageTo(HUM,25)
547
			end
548
			WLD:Remove()
549
			POTAT.CFrame = CF(TARGET.Position,VT(ROOT.Position.X,TARGET.Position.Y,ROOT.Position.Z))*CF(0,0,-0.75)
550
			WeldParts(POTAT,TARGET)
551
			POTAT.Parent = TARGET.Parent
552
		end
553
		for i=0, 0.9, 0.1 / ANIM_SPEED do
554
			Swait()
555
			ROOTJOINT.C0 = Clerp(ROOTJOINT.C0,ROOTC0 * CF(0, -1, -0.5) * ANGLES(RAD(45), RAD(0), RAD(50)), 2 / ANIM_SPEED)
556
			NECK.C0 = Clerp(NECK.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(45), RAD(0), RAD(-10)), 2 / ANIM_SPEED)
557
			RIGHTSHOULDER.C0 = Clerp(RIGHTSHOULDER.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(25), RAD(0), RAD(25))*CF(0,-0.5,0) * RIGHTSHOULDERC0, 1 / ANIM_SPEED)
558
			LEFTSHOULDER.C0 = Clerp(LEFTSHOULDER.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-25), RAD(15), RAD(-15)) * LEFTSHOULDERC0, 1 / ANIM_SPEED)
559
			RIGHTHIP.C0 = Clerp(RIGHTHIP.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 2 / ANIM_SPEED)
560
			LEFTHIP.C0 = Clerp(LEFTHIP.C0, CF(-1, -0.7, -0.5) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(45)), 2 / ANIM_SPEED)
561
		end
562
		if TARGET == nil then
563
			POTAT:Remove()
564
		end
565
		Animate("In")
566
		ATTACKING = false
567
	end
568
end
569
570
function Dance()
571
if CROUCHED == false then
572-
		local SONGS = {322621962,569026863,502771070,408862087,1471935327,236336857,2280063143,334259331,344685843,1479420512,297754476,591661590,1571736139,2988953773,130768805,2516100492,580535766,213546066}
572+
		local SONGS = {327877536,3417112199,3200099211,2674055620,3325079068,3445097687,1154495956,2784767783,2700993009,2972978104,3116013016,2868252780,3037386129,2729624531}
573
		local SONG = SONGS[MRANDOM(1,#SONGS)]
574
		Animate("Out")
575
		HUM.WalkSpeed = 0
576
		HUM.JumpPower = 0
577
		ATTACKING = true
578
		local REMOVETRACK = false
579
		local TRACK = nil
580
		if ROOT:FindFirstChild("BGM_MUSIC") then
581
			TRACK = ROOT:FindFirstChild("BGM_MUSIC")
582
		else
583
			TRACK = NewSound({ID = SONG,PARENT = ROOT,VOLUME = 1.5,PITCH = 1,LOOP = true,MAXDISTANCE = 300,EMITTERSIZE = 300,PLAYING = true,PLAYONREMOVE = false,DOESDEBRIS = true})
584
			REMOVETRACK = true
585
		end
586
		TRACK.SoundId = "rbxassetid://"..SONG
587
		TRACK:Play()
588
		local DONEWITHDANCING = false
589
MOUSE.KeyDown:connect(function(Press)
590
Press=Press:lower()
591
if Press=="m" and TRACK.Playing==true then
592
				DONEWITHDANCING = true
593
TRACK.Playing = false
594
end
595
if Press=="t" and TRACK.Playing==true then
596
text()
597
end
598
end)
599
		local LOOP = 0
600
		local RAVE = IT("PointLight",ROOT)
601
		RAVE.Brightness = 100
602
		repeat
603
			LOOP = LOOP + 5
604
			RAVE.Color = BrickColor.random().Color
605
			ROOTJOINT.C0 = Clerp(ROOTJOINT.C0,ROOTC0 * CF(-0.25 * COS(LOOP / 50), 0, -0.5 - 0.5 * COS(LOOP / 25)) * ANGLES(RAD(0), RAD(0), RAD(45 * SIN(LOOP / 50))) * ANGLES(RAD(45 + 22.5 * COS(LOOP / 25)), RAD(0), RAD(0)), 2 / ANIM_SPEED)
606
			NECK.C0 = Clerp(NECK.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-45 - 22.5 * COS(LOOP / 25)), RAD(0), RAD(-45 * SIN(LOOP / 50))), 2 / ANIM_SPEED)
607
			RIGHTSHOULDER.C0 = Clerp(RIGHTSHOULDER.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(175+65 * SIN(LOOP / 25)), RAD(0), RAD(-45 * SIN(LOOP / 12.5))) * CF(0,-0.5,0) * RIGHTSHOULDERC0, 1 / ANIM_SPEED)
608
			LEFTSHOULDER.C0 = Clerp(LEFTSHOULDER.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(175+65 * SIN(LOOP / 25)), RAD(0), RAD(45 * SIN(LOOP / 12.5))) * CF(0,-0.5,0) * LEFTSHOULDERC0, 1 / ANIM_SPEED)
609
			RIGHTHIP.C0 = Clerp(RIGHTHIP.C0, CF(1, -0.5 + 0.5 * COS(LOOP / 25), -0.5 - 0.5 * COS(LOOP / 25)) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 2 / ANIM_SPEED)
610
			LEFTHIP.C0 = Clerp(LEFTHIP.C0, CF(-1, -0.5 + 0.5 * COS(LOOP / 25), -0.5 - 0.5 * COS(LOOP / 25)) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 2 / ANIM_SPEED)
611
			Swait()
612
		until TRACK.Playing == false or HUM.Health <= 0
613
TRACK:Destroy()
614
		RAVE:Remove()
615
		ROOTJOINT.C0 = ROOTC0
616
		NECK.C0 = NECKC0
617
		RIGHTSHOULDER.C0 = CF(1.5, 0.5, 0) * RIGHTSHOULDERC0
618
		LEFTSHOULDER.C0 = CF(-1.5, 0.5, 0) * LEFTSHOULDERC0
619
		RIGHTHIP.C0 = CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
620
		LEFTHIP.C0 = CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
621
		if REMOVETRACK == true then
622
			TRACK:Remove()
623
		else
624
			TRACK:Play()
625
			TRACK.SoundId = "rbxassetid://185558852"
626
		end
627
		ATTACKING = false
628-
		HUM.WalkSpeed = 20
628+
		HUM.WalkSpeed = 30
629
		HUM.JumpPower = 50
630
		Animate("In")
631
	end
632
end
633
634
function Crouch()
635
	if CROUCHED == false then
636
		ROOTJOINT.C0 = ROOTC0 * CF(0, 0, -1) * ANGLES(RAD(45), RAD(0), RAD(0))
637
		NECK.C0 = NECKC0 * ANGLES(RAD(-45), RAD(0), RAD(0))
638
		RIGHTSHOULDER.C0 = CF(1.5, 0.5, 0) * RIGHTSHOULDERC0
639
		LEFTSHOULDER.C0 = CF(-1.5, 0.5, 0) * LEFTSHOULDERC0
640
		RIGHTHIP.C0 = CF(1, 0, -1) * ANGLES(RAD(0), RAD(90), RAD(0))
641
		LEFTHIP.C0 = CF(-1, 0, -1) * ANGLES(RAD(0), RAD(-90), RAD(0))
642
		CROUCHED = true
643
	elseif CROUCHED == true then
644
		ROOTJOINT.C0 = ROOTC0
645
		NECK.C0 = NECKC0
646
		RIGHTSHOULDER.C0 = CF(1.5, 0.5, 0) * RIGHTSHOULDERC0
647
		LEFTSHOULDER.C0 = CF(-1.5, 0.5, 0) * LEFTSHOULDERC0
648
		RIGHTHIP.C0 = CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
649
		LEFTHIP.C0 = CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
650
		CROUCHED = false
651
	end
652
end
653
654
function text()
655-
	local TEXT = {"I am going to slap a rabbit out of your nose","No it was your mom","Pics or it didnt happen","nein thoust","potato","no u, humans i swear","ok","m","literally a lemon",PLAYER.Name.." is here","literally consumes potatoes","i diagnose you with dead","GJIEUDJGHBEUYDTJGHGESIGUJSHGNUIESJDGTHNSEIUDGJHSEDNGIUKJSEDYHGNISUKEDJGHSNEIDUGJHSENDGUJSEHGNUISEJGM","gsap","toast when","I NEVER LEARNED HOW TO READ","help"}
655+
	local TEXT = {"I am going to slap a rabbit out of your nose","No it was your mom","Pics or it didnt happen","eggs","potato","no u, humans i swear","ok","m","literally a lemon",PLAYER.Name.." is here","literally consumes potatoes","i diagnose you with dead","consume egg white","gasp","toast when","I NEVER LEARNED HOW TO READ","help"}
656
	Chatter(TEXT[MRANDOM(1,#TEXT)],0)
657
end
658
659
--//====================================================\\--
660
--||                       WRAP
661
--\\====================================================//--
662
663
MOUSE.KeyDown:connect(function(Press)
664
Press=Press:lower()
665
if Press=="z" and ATTACKING==false then
666
Potato()
667
end
668
if Press=="t" and ATTACKING==false then
669
text()
670
end
671
if Press=="c" and ATTACKING==false then
672
Crouch()
673
end
674
if Press=="m" and ATTACKING==false then
675
Dance()
676
end
677
if Press=="n" and ATTACKING==false then
678
DONEWITHDANCING = true
679
Animate("In")
680
ATTACKED = false
681
end
682
if Press=="e" and ATTACKING==false then
683
					if ROOT:FindFirstChild("BGM_MUSIC") then
684
						ROOT:FindFirstChild("BGM_MUSIC"):Remove()
685
					else
686
						local M = NewSound({ID = 185558852,PARENT = ROOT,VOLUME = 10,PITCH = 1,LOOP = true,MAXDISTANCE = 300,EMITTERSIZE = 300,PLAYING = true,PLAYONREMOVE = false,DOESDEBRIS = true})
687
						M.Name = "BGM_MUSIC"
688
					end
689
end
690
end)
691
692
693
REMOTE.OnServerEvent:Connect(function(PLR,V1,V2)
694
	if PLR == PLAYER and DEAD == false then
695
		--if V1 == "MousePositionUpdate" then
696
			--MOUSEPOS = V2
697
		if V1 == "KeyUp" then
698
			KEYHOLD = false
699
		elseif V1 == "MouseUp" then
700
			MOUSEHOLD = false
701
		end
702
		if ATTACKING == false then
703
			if V1 == "MouseDown" then
704
				MOUSEHOLD = true
705
			elseif V1 == "KeyDown" then
706
				KEYHOLD = true
707
				if V2 == "z" then
708
					Potato()
709
				elseif V2 == "c" then
710
					Crouch()
711
				elseif V2 == "t" then
712
					text()
713
				elseif V2 == "m" then
714
					Dance()
715
				elseif V2 == "e" then
716
					if ROOT:FindFirstChild("BGM_MUSIC") then
717
						ROOT:FindFirstChild("BGM_MUSIC"):Remove()
718
					else
719
						local M = NewSound({ID = 185558852,PARENT = ROOT,VOLUME = 10,PITCH = 1,LOOP = true,MAXDISTANCE = 300,EMITTERSIZE = 300,PLAYING = true,PLAYONREMOVE = false,DOESDEBRIS = true})
720
						M.Name = "BGM_MUSIC"
721
					end
722
				end
723
			end
724
		end
725
	end
726
end)
727-
local M = NewSound({ID = 185558852,PARENT = ROOT,VOLUME = 10,PITCH = 1,LOOP = true,MAXDISTANCE = 300,EMITTERSIZE = 300,PLAYING = true,PLAYONREMOVE = false,DOESDEBRIS = true})
727+
local M = NewSound({ID = 603548670,PARENT = ROOT,VOLUME = 10,PITCH = 1,LOOP = true,MAXDISTANCE = 300,EMITTERSIZE = 300,PLAYING = true,PLAYONREMOVE = false,DOESDEBRIS = true})
728
M.Name = "BGM_MUSIC"
729-
HUM.WalkSpeed = 20
729+
HUM.WalkSpeed = 30
730
731
HUM.Died:Connect(function()
732
	ApplyDamageTo(HUM,100000)
733
	DEAD = true
734
	Chatter("OW IM DEAD",0)
735
	NewSound({ID = 2542613889,PARENT = HEAD,VOLUME = 10,PITCH = MRANDOM(9,11)/10,LOOP = false,MAXDISTANCE = 200,EMITTERSIZE = 15,PLAYING = true,PLAYONREMOVE = false,DOESDEBRIS = true})
736
end)