Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --//====================================================\\--
- --|| !POTATO!
- --\\====================================================//--
- local MODULE = script
- local CHARACTER = owner.Character
- local PLAYER = game:GetService("Players"):GetPlayerFromCharacter(CHARACTER)
- local HUM = CHARACTER.Humanoid
- local EVENT = Instance.new("RemoteEvent",MODULE)
- EVENT.Name = "Event"
- local REMOTE = MODULE.Event
- local ROOT = HUM.Torso
- local HEAD = CHARACTER.Head
- local TORSO = CHARACTER.Torso
- local RIGHTARM = CHARACTER["Right Arm"]
- local LEFTARM = CHARACTER["Left Arm"]
- local RIGHTLEG = CHARACTER["Right Leg"]
- local LEFTLEG = CHARACTER["Left Leg"]
- local ROOTJOINT = ROOT["RootJoint"]
- local NECK = TORSO["Neck"]
- local RIGHTSHOULDER = TORSO["Right Shoulder"]
- local LEFTSHOULDER = TORSO["Left Shoulder"]
- local RIGHTHIP = TORSO["Right Hip"]
- local LEFTHIP = TORSO["Left Hip"]
- local MOUSEPOS = ROOT.Position
- IT = Instance.new
- CF = CFrame.new
- VT = Vector3.new
- RAD = math.rad
- C3 = Color3.new
- UD2 = UDim2.new
- BRICKC = BrickColor.new
- ANGLES = CFrame.Angles
- EULER = CFrame.fromEulerAnglesXYZ
- COS = math.cos
- ACOS = math.acos
- SIN = math.sin
- ASIN = math.asin
- ABS = math.abs
- MRANDOM = math.random
- FLOOR = math.floor
- --//====================================================\\--
- --|| FE CODE
- --\\====================================================//--
- if game:GetService("RunService"):IsClient()then error("RUN SCRIPT AS R/ AND NOT RL/.")end;print("FE CODE BY WAVERLYCOLE");InternalData = {}
- do
- script.Parent = owner.Character
- local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
- local function NewFakeEvent()
- local Bind = Instance.new("BindableEvent")
- local Fake;Fake = {Connections = {},
- fakeEvent=true;
- Connect=function(self,Func)
- Bind.Event:connect(Func)
- self.Connections[Bind] = true
- return setmetatable({Connected = true},{
- __index = function (self,Index)
- if Index:lower() == "disconnect" then
- return function() Fake.Connections[Bind] = false;self.Connected = false end
- end
- return Fake[Index]
- end;
- __tostring = function() return "Connection" end;
- })
- end}
- Fake.connect = Fake.Connect;return Fake;
- end
- local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
- local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
- local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
- self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
- end};ContextActionService.UnBindAction = ContextActionService.BindAction
- local function TriggerEvent(self,Event,...)
- local Trigger = Mouse[Event]
- if Trigger and Trigger.fakeEvent and Trigger.Connections then
- for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
- end
- end
- Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
- Event.OnServerEvent:Connect(function(FiredBy,Input)
- if FiredBy.Name ~= owner.Name then return end
- if Input.MouseEvent then
- Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
- else
- local Begin = Input.UserInputState == Enum.UserInputState.Begin
- if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
- for _,Action in pairs(ContextActionService.Actions) do
- for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
- end
- Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
- UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
- end
- end)
- InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
- Event.Parent = NLS([[
- local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
- local Input = function(Input,gameProcessedEvent)
- if gameProcessedEvent then return end
- Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
- end
- UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
- local Hit,Target
- while wait(1/30) do
- if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
- Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
- end
- end
- ]],owner.Character)
- end
- RealGame = game;game = setmetatable({},{
- __index = function (self,Index)
- local Sandbox = function (Thing)
- if Thing:IsA("Player") then
- local RealPlayer = Thing
- return setmetatable({},{
- __index = function (self,Index)
- local Type = type(RealPlayer[Index])
- if Type == "function" then
- if Index:lower() == "getmouse" or Index:lower() == "mouse" then
- return function (self)return InternalData["Mouse"] end
- end
- return function (self,...)return RealPlayer[Index](RealPlayer,...) end
- end
- return RealPlayer[Index]
- end;
- __tostring = function(self) return RealPlayer.Name end
- })
- end
- end
- if RealGame[Index] then
- local Type = type(RealGame[Index])
- if Type == "function" then
- if Index:lower() == "getservice" or Index:lower() == "service" then
- return function (self,Service)
- local FakeServices = {
- ["players"] = function()
- return setmetatable({},{
- __index = function (self2,Index2)
- local RealService = RealGame:GetService(Service)
- local Type2 = type(Index2)
- if Type2 == "function" then
- return function (self,...) return RealService[Index2](RealService,...)end
- else
- if Index2:lower() == "localplayer" then return Sandbox(owner) end
- return RealService[Index2]
- end
- end;
- __tostring = function(self) return RealGame:GetService(Service).Name end
- })
- end;
- ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
- ["userinputservice"] = function() return InternalData["UserInputService"] end;
- ["runservice"] = function()
- return setmetatable({},{
- __index = function(self2,Index2)
- local RealService = RealGame:GetService(Service)
- local Type2 = type(Index2)
- if Type2 == "function" then
- return function (self,...) return RealService[Index2](RealService,...) end
- else
- local RunServices = {
- ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
- ["renderstepped"] = function() return RealService["Stepped"] end
- }
- if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
- return RealService[Index2]
- end
- end
- })
- end
- }
- if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
- return RealGame:GetService(Service)
- end
- end
- return function (self,...) return RealGame[Index](RealGame,...) end
- else
- if game:GetService(Index) then return game:GetService(Index) end
- return RealGame[Index]
- end
- end
- return nil
- end
- });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
- --//====================================================\\--
- --|| BACKGROUND VALUES
- --\\====================================================//--
- local ANIM_SPEED = 3
- local MOUSE = owner:GetMouse()
- local FRAME_SPEED = 1 / 60 -- (1 / 30) OR (1 / 60)
- local CHANGE = 2 / ANIM_SPEED
- local DAMAGEMULTIPLIER = 1
- local ANIM = "Idle"
- local KEYHOLD = false
- local MOUSEHOLD = false
- local ATTACKING = false
- local Debris = game:GetService("Debris")
- local Effects = IT("Folder",CHARACTER)
- Effects.Name = "FXFolder"
- local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
- local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
- local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
- local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
- local ANIMATE = CHARACTER:FindFirstChild("Animate")
- local CROUCHED = false
- local POTATOMODEL= Instance.new("Part",MODULE)
- POTATOMODEL.Name = "Potato"
- POTATOMODEL.CanCollide = false
- POTATOMODEL.Size = Vector3.new(0.992, 1.288, 0.993)
- MESHPOTATO = Instance.new("SpecialMesh",POTATOMODEL)
- MESHPOTATO.MeshId = "rbxassetid://11563093"
- MESHPOTATO.TextureId = "rbxassetid://11563076"
- local POTATO = MODULE.Potato
- POTATO.Parent = nil
- local DEAD = false
- --//====================================================\\--
- --|| HEARTBEAT
- --\\====================================================//--
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "ArtificialHB"
- script:WaitForChild("ArtificialHB")
- frame = FRAME_SPEED
- tf = 0
- allowframeloss = false
- tossremainder = false
- lastframe = tick()
- script.ArtificialHB:Fire()
- game:GetService("RunService").Heartbeat:connect(function(s, p)
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- ArtificialHB:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- ArtificialHB:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end)
- function PositiveAngle(NUMBER)
- if NUMBER >= 0 then
- NUMBER = 0
- end
- return NUMBER
- end
- function NegativeAngle(NUMBER)
- if NUMBER <= 0 then
- NUMBER = 0
- end
- return NUMBER
- end
- function Swait(NUMBER)
- if NUMBER == 0 or NUMBER == nil then
- ArtificialHB.Event:wait()
- else
- for i = 1, NUMBER do
- ArtificialHB.Event:wait()
- end
- end
- end
- --//====================================================\\--
- --|| CLERP
- --\\====================================================//--
- function QuaternionFromCFrame(cf)
- local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
- local trace = m00 + m11 + m22
- if trace > 0 then
- local s = math.sqrt(1 + trace)
- local recip = 0.5 / s
- return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
- else
- local i = 0
- if m11 > m00 then
- i = 1
- end
- if m22 > (i == 0 and m00 or m11) then
- i = 2
- end
- if i == 0 then
- local s = math.sqrt(m00 - m11 - m22 + 1)
- local recip = 0.5 / s
- return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
- elseif i == 1 then
- local s = math.sqrt(m11 - m22 - m00 + 1)
- local recip = 0.5 / s
- return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
- elseif i == 2 then
- local s = math.sqrt(m22 - m00 - m11 + 1)
- local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
- end
- end
- end
- function QuaternionToCFrame(px, py, pz, x, y, z, w)
- local xs, ys, zs = x + x, y + y, z + z
- local wx, wy, wz = w * xs, w * ys, w * zs
- local xx = x * xs
- local xy = x * ys
- local xz = x * zs
- local yy = y * ys
- local yz = y * zs
- local zz = z * zs
- 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))
- end
- function QuaternionSlerp(a, b, t)
- local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
- local startInterp, finishInterp;
- if cosTheta >= 0.0001 then
- if (1 - cosTheta) > 0.0001 then
- local theta = ACOS(cosTheta)
- local invSinTheta = 1 / SIN(theta)
- startInterp = SIN((1 - t) * theta) * invSinTheta
- finishInterp = SIN(t * theta) * invSinTheta
- else
- startInterp = 1 - t
- finishInterp = t
- end
- else
- if (1 + cosTheta) > 0.0001 then
- local theta = ACOS(-cosTheta)
- local invSinTheta = 1 / SIN(theta)
- startInterp = SIN((t - 1) * theta) * invSinTheta
- finishInterp = SIN(t * theta) * invSinTheta
- else
- startInterp = t - 1
- finishInterp = t
- end
- end
- 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
- end
- function Clerp(a, b, t)
- local qa = {QuaternionFromCFrame(a)}
- local qb = {QuaternionFromCFrame(b)}
- local ax, ay, az = a.x, a.y, a.z
- local bx, by, bz = b.x, b.y, b.z
- local _t = 1 - t
- return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
- end
- --//====================================================\\--
- --|| FUNCTIONS
- --\\====================================================//--
- function Animate(INOUT)
- if INOUT == "In" then
- ANIMATE.Parent = CHARACTER
- ROOTJOINT.C0 = ROOTC0
- NECK.C0 = NECKC0
- RIGHTSHOULDER.C0 = CF(1.5, 0.5, 0) * RIGHTSHOULDERC0
- LEFTSHOULDER.C0 = CF(-1.5, 0.5, 0) * LEFTSHOULDERC0
- RIGHTHIP.C0 = CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
- LEFTHIP.C0 = CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
- elseif INOUT == "Out" then
- for _,v in next, HUM:GetPlayingAnimationTracks() do
- v:Stop();
- end
- ANIMATE.Parent = nil
- end
- end
- function WeldParts(A,B)
- local WLD = IT("ManualWeld")
- WLD.Part0 = A
- WLD.Part1 = B
- WLD.C1 = B.CFrame:inverse() * A.CFrame
- WLD.Parent = A
- return WLD
- end
- --NewSound({ID = 0,PARENT = ROOT,VOLUME = 0.5,PITCH = 1,LOOP = false,MAXDISTANCE = 1000,EMITTERSIZE = 10,PLAYING = true,PLAYONREMOVE = false,DOESDEBRIS = true})
- function NewSound(TABLE)
- local ID = "rbxassetid://"..(TABLE.ID or 0)
- local PARENT = (TABLE.PARENT or ROOT)
- local VOLUME = (TABLE.VOLUME or 0.5)
- local PITCH = (TABLE.PITCH or 1)
- local LOOP = (TABLE.LOOP or false)
- local MAXDISTANCE = (TABLE.MAXDISTANCE or 100)
- local EMITTERSIZE = (TABLE.EMITTERSIZE or 10)
- local PLAYING = (TABLE.PLAYING or true)
- local PLAYONREMOVE = (TABLE.PLAYONREMOVE or false)
- local DOESDEBRIS = (TABLE.DOESDEBRIS or true)
- if ID ~= "rbxassetid://0" then
- local SOUND = IT("Sound",PARENT)
- SOUND.SoundId = ID
- SOUND.Volume = VOLUME
- SOUND.Pitch = PITCH
- SOUND.Looped = LOOP
- SOUND.MaxDistance = MAXDISTANCE
- SOUND.EmitterSize = EMITTERSIZE
- SOUND.PlayOnRemove = PLAYONREMOVE
- if DOESDEBRIS == true and PLAYING == true and LOOP == false then
- Debris:AddItem(SOUND,SOUND.TimeLength+5)
- end
- if PLAYING == true then
- SOUND:Play()
- end
- return SOUND
- end
- end
- function AttachmentCFrame(A)
- return A.Parent.CFrame*CF(A.Position)
- end
- function CastProperRay(StartPos, EndPos, Distance, Ignore)
- local DIRECTION = CF(StartPos,EndPos).lookVector
- return Raycast(StartPos, DIRECTION, Distance, Ignore)
- end
- function ApplyDamageTo(HUM,DAMAGE)
- if HUM.Health >= 0 then
- HUM.Health = HUM.Health - DAMAGE
- if HUM.Health <= 0 then
- HUM.Parent:Destroy()
- end
- end
- end
- function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
- return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
- end
- function Chatter(Text,Timer)
- local chat = coroutine.wrap(function()
- if CHARACTER:FindFirstChild("SpeechBoard")~= nil then
- CHARACTER:FindFirstChild("SpeechBoard"):destroy()
- end
- local naeeym2 = IT("BillboardGui",CHARACTER)
- naeeym2.Size = UD2(0,100,0,40)
- naeeym2.StudsOffset = Vector3.new(0,2,0)
- naeeym2.Adornee = HEAD
- naeeym2.Name = "SpeechBoard"
- naeeym2.AlwaysOnTop = true
- local tecks2 = IT("TextLabel",naeeym2)
- tecks2.BackgroundTransparency = 1
- tecks2.BorderSizePixel = 0
- tecks2.Text = ""
- tecks2.Font = "Legacy"
- tecks2.TextSize = 15
- tecks2.TextStrokeTransparency = 0
- tecks2.TextColor3 = Color3.new(1,1,1)
- tecks2.TextStrokeColor3 = Color3.new(0,0,0)
- tecks2.Size = UDim2.new(1,0,0.5,0)
- for i = 1,string.len(Text),1 do
- if naeeym2.Parent ~= CHARACTER then
- break
- end
- tecks2.Text = string.sub(Text,1,i)
- wait(Timer)
- end
- wait(1)
- naeeym2:Destroy()
- end)
- chat()
- end
- --//====================================================\\--
- --|| ABILITIES
- --\\====================================================//--
- function Potato()
- if CROUCHED == false then
- Animate("Out")
- ATTACKING = true
- local TARGET = nil
- local POTAT = POTATO:Clone()
- POTAT.Parent = Effects
- POTAT.CFrame = RIGHTARM.CFrame*CF(0,-1.1,0) * ANGLES(RAD(90), RAD(0), RAD(0))
- local WLD = WeldParts(RIGHTARM,POTAT)
- Chatter("AAAAAAAAAAAAAAA",0)
- NewSound({ID = 314568939,PARENT = HEAD,VOLUME = 20,PITCH = 1,LOOP = false,MAXDISTANCE = 200,EMITTERSIZE = 15,PLAYING = true,PLAYONREMOVE = false,DOESDEBRIS = true})
- for i=0, 0.5, 0.1 / ANIM_SPEED do
- Swait()
- ROOTJOINT.C0 = Clerp(ROOTJOINT.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(-35)), 2 / ANIM_SPEED)
- NECK.C0 = Clerp(NECK.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(35)), 2 / ANIM_SPEED)
- RIGHTSHOULDER.C0 = Clerp(RIGHTSHOULDER.C0, CF(1.5, 1, 0.2) * ANGLES(RAD(170), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / ANIM_SPEED)
- LEFTSHOULDER.C0 = Clerp(LEFTSHOULDER.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(15), RAD(-45)) * LEFTSHOULDERC0, 1 / ANIM_SPEED)
- 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)
- 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)
- end
- for i=0, 0.1, 0.1 / ANIM_SPEED do
- Swait()
- ROOTJOINT.C0 = Clerp(ROOTJOINT.C0,ROOTC0 * CF(0, -1, -0.5) * ANGLES(RAD(45), RAD(0), RAD(50)), 2 / ANIM_SPEED)
- NECK.C0 = Clerp(NECK.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(45), RAD(0), RAD(-10)), 2 / ANIM_SPEED)
- 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)
- LEFTSHOULDER.C0 = Clerp(LEFTSHOULDER.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-25), RAD(15), RAD(-15)) * LEFTSHOULDERC0, 1 / ANIM_SPEED)
- 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)
- 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)
- end
- local FOES = {}
- for index, CHILD in pairs(workspace:GetChildren()) do
- if CHILD:FindFirstChildOfClass("Humanoid") and CHILD ~= CHARACTER then
- local HUMAN = CHILD:FindFirstChildOfClass("Humanoid")
- local ROOT2 = HUMAN.Torso
- if ROOT2 and CHILD:FindFirstChild("Head") then
- if (ROOT2.Position - ROOT.CFrame*CF(0,0,-1.25).p).Magnitude <= 3 then
- table.insert(FOES,CHILD.Head)
- end
- end
- end
- end
- if #FOES > 0 then
- local DIST = math.huge
- for E = 1, #FOES do
- if (FOES[E].Position - ROOT.Position).Magnitude < DIST then
- DIST = (FOES[E].Position - ROOT.Position).Magnitude
- TARGET = FOES[E]
- end
- end
- end
- if TARGET then
- NewSound({ID = 2174934221,PARENT = TARGET,VOLUME = 5,PITCH = MRANDOM(9,11)/10,LOOP = false,MAXDISTANCE = 200,EMITTERSIZE = 15,PLAYING = true,PLAYONREMOVE = false,DOESDEBRIS = true})
- local BV = IT("BodyVelocity")
- BV.MaxForce = BV.MaxForce * 500
- BV.Velocity = CF(ROOT.Position,TARGET.Position+VT(0,0.5,0)).lookVector*25
- BV.Parent = TARGET
- Debris:AddItem(BV,0.05)
- local HUM = TARGET.Parent:FindFirstChildOfClass("Humanoid")
- if HUM then
- ApplyDamageTo(HUM,25)
- end
- WLD:Remove()
- POTAT.CFrame = CF(TARGET.Position,VT(ROOT.Position.X,TARGET.Position.Y,ROOT.Position.Z))*CF(0,0,-0.75)
- WeldParts(POTAT,TARGET)
- POTAT.Parent = TARGET.Parent
- end
- for i=0, 0.9, 0.1 / ANIM_SPEED do
- Swait()
- ROOTJOINT.C0 = Clerp(ROOTJOINT.C0,ROOTC0 * CF(0, -1, -0.5) * ANGLES(RAD(45), RAD(0), RAD(50)), 2 / ANIM_SPEED)
- NECK.C0 = Clerp(NECK.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(45), RAD(0), RAD(-10)), 2 / ANIM_SPEED)
- 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)
- LEFTSHOULDER.C0 = Clerp(LEFTSHOULDER.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-25), RAD(15), RAD(-15)) * LEFTSHOULDERC0, 1 / ANIM_SPEED)
- 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)
- 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)
- end
- if TARGET == nil then
- POTAT:Remove()
- end
- Animate("In")
- ATTACKING = false
- end
- end
- function Dance()
- if CROUCHED == false then
- local SONGS = {327877536,3417112199,3200099211,2674055620,3325079068,3445097687,1154495956,2784767783,2700993009,2972978104,3116013016,2868252780,3037386129,2729624531}
- local SONG = SONGS[MRANDOM(1,#SONGS)]
- Animate("Out")
- HUM.WalkSpeed = 0
- HUM.JumpPower = 0
- ATTACKING = true
- local REMOVETRACK = false
- local TRACK = nil
- if ROOT:FindFirstChild("BGM_MUSIC") then
- TRACK = ROOT:FindFirstChild("BGM_MUSIC")
- else
- TRACK = NewSound({ID = SONG,PARENT = ROOT,VOLUME = 1.5,PITCH = 1,LOOP = true,MAXDISTANCE = 300,EMITTERSIZE = 300,PLAYING = true,PLAYONREMOVE = false,DOESDEBRIS = true})
- REMOVETRACK = true
- end
- TRACK.SoundId = "rbxassetid://"..SONG
- TRACK:Play()
- local DONEWITHDANCING = false
- MOUSE.KeyDown:connect(function(Press)
- Press=Press:lower()
- if Press=="m" and TRACK.Playing==true then
- DONEWITHDANCING = true
- TRACK.Playing = false
- end
- if Press=="t" and TRACK.Playing==true then
- text()
- end
- end)
- local LOOP = 0
- local RAVE = IT("PointLight",ROOT)
- RAVE.Brightness = 100
- repeat
- LOOP = LOOP + 5
- RAVE.Color = BrickColor.random().Color
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- Swait()
- until TRACK.Playing == false or HUM.Health <= 0
- TRACK:Destroy()
- RAVE:Remove()
- ROOTJOINT.C0 = ROOTC0
- NECK.C0 = NECKC0
- RIGHTSHOULDER.C0 = CF(1.5, 0.5, 0) * RIGHTSHOULDERC0
- LEFTSHOULDER.C0 = CF(-1.5, 0.5, 0) * LEFTSHOULDERC0
- RIGHTHIP.C0 = CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
- LEFTHIP.C0 = CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
- if REMOVETRACK == true then
- TRACK:Remove()
- else
- TRACK:Play()
- TRACK.SoundId = "rbxassetid://185558852"
- end
- ATTACKING = false
- HUM.WalkSpeed = 30
- HUM.JumpPower = 50
- Animate("In")
- end
- end
- function Crouch()
- if CROUCHED == false then
- ROOTJOINT.C0 = ROOTC0 * CF(0, 0, -1) * ANGLES(RAD(45), RAD(0), RAD(0))
- NECK.C0 = NECKC0 * ANGLES(RAD(-45), RAD(0), RAD(0))
- RIGHTSHOULDER.C0 = CF(1.5, 0.5, 0) * RIGHTSHOULDERC0
- LEFTSHOULDER.C0 = CF(-1.5, 0.5, 0) * LEFTSHOULDERC0
- RIGHTHIP.C0 = CF(1, 0, -1) * ANGLES(RAD(0), RAD(90), RAD(0))
- LEFTHIP.C0 = CF(-1, 0, -1) * ANGLES(RAD(0), RAD(-90), RAD(0))
- CROUCHED = true
- elseif CROUCHED == true then
- ROOTJOINT.C0 = ROOTC0
- NECK.C0 = NECKC0
- RIGHTSHOULDER.C0 = CF(1.5, 0.5, 0) * RIGHTSHOULDERC0
- LEFTSHOULDER.C0 = CF(-1.5, 0.5, 0) * LEFTSHOULDERC0
- RIGHTHIP.C0 = CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
- LEFTHIP.C0 = CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
- CROUCHED = false
- end
- end
- function text()
- 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"}
- Chatter(TEXT[MRANDOM(1,#TEXT)],0)
- end
- --//====================================================\\--
- --|| WRAP
- --\\====================================================//--
- MOUSE.KeyDown:connect(function(Press)
- Press=Press:lower()
- if Press=="z" and ATTACKING==false then
- Potato()
- end
- if Press=="t" and ATTACKING==false then
- text()
- end
- if Press=="c" and ATTACKING==false then
- Crouch()
- end
- if Press=="m" and ATTACKING==false then
- Dance()
- end
- if Press=="n" and ATTACKING==false then
- DONEWITHDANCING = true
- Animate("In")
- ATTACKED = false
- end
- if Press=="e" and ATTACKING==false then
- if ROOT:FindFirstChild("BGM_MUSIC") then
- ROOT:FindFirstChild("BGM_MUSIC"):Remove()
- else
- local M = NewSound({ID = 185558852,PARENT = ROOT,VOLUME = 10,PITCH = 1,LOOP = true,MAXDISTANCE = 300,EMITTERSIZE = 300,PLAYING = true,PLAYONREMOVE = false,DOESDEBRIS = true})
- M.Name = "BGM_MUSIC"
- end
- end
- end)
- REMOTE.OnServerEvent:Connect(function(PLR,V1,V2)
- if PLR == PLAYER and DEAD == false then
- --if V1 == "MousePositionUpdate" then
- --MOUSEPOS = V2
- if V1 == "KeyUp" then
- KEYHOLD = false
- elseif V1 == "MouseUp" then
- MOUSEHOLD = false
- end
- if ATTACKING == false then
- if V1 == "MouseDown" then
- MOUSEHOLD = true
- elseif V1 == "KeyDown" then
- KEYHOLD = true
- if V2 == "z" then
- Potato()
- elseif V2 == "c" then
- Crouch()
- elseif V2 == "t" then
- text()
- elseif V2 == "m" then
- Dance()
- elseif V2 == "e" then
- if ROOT:FindFirstChild("BGM_MUSIC") then
- ROOT:FindFirstChild("BGM_MUSIC"):Remove()
- else
- local M = NewSound({ID = 185558852,PARENT = ROOT,VOLUME = 10,PITCH = 1,LOOP = true,MAXDISTANCE = 300,EMITTERSIZE = 300,PLAYING = true,PLAYONREMOVE = false,DOESDEBRIS = true})
- M.Name = "BGM_MUSIC"
- end
- end
- end
- end
- end
- end)
- local M = NewSound({ID = 603548670,PARENT = ROOT,VOLUME = 10,PITCH = 1,LOOP = true,MAXDISTANCE = 300,EMITTERSIZE = 300,PLAYING = true,PLAYONREMOVE = false,DOESDEBRIS = true})
- M.Name = "BGM_MUSIC"
- HUM.WalkSpeed = 30
- HUM.Died:Connect(function()
- ApplyDamageTo(HUM,100000)
- DEAD = true
- Chatter("OW IM DEAD",0)
- NewSound({ID = 2542613889,PARENT = HEAD,VOLUME = 10,PITCH = MRANDOM(9,11)/10,LOOP = false,MAXDISTANCE = 200,EMITTERSIZE = 15,PLAYING = true,PLAYONREMOVE = false,DOESDEBRIS = true})
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement