Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- local RealPlayer = Player
- 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
- Player = owner
- Character = Player.Character
- Mouse = Player:GetMouse()
- Humanoid = Character.Humanoid
- RootPart = Character.HumanoidRootPart
- Torso = Character.Torso
- Head = Character.Head
- RightArm = Character["Right Arm"]
- LeftArm = Character["Left Arm"]
- RightLeg = Character["Right Leg"]
- LeftLeg = Character["Left Leg"]
- RootJoint = RootPart.RootJoint
- Neck = Torso.Neck
- RightShoulder = Torso["Right Shoulder"]
- LeftShoulder = Torso["Left Shoulder"]
- RightHip = Torso["Right Hip"]
- LeftHip = Torso["Left Hip"]
- 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
- Animation_Speed = 3
- local SIZE = 0.4
- local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
- local NECKC0 = CF(0, 1*SIZE, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
- local RIGHTSHOULDERC0 = CF(0, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
- local LEFTSHOULDERC0 = CF(0, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
- RootPart.Size = RootPart.Size*SIZE
- Torso.Size = Torso.Size*SIZE
- RightArm.Size = RightArm.Size*SIZE
- RightLeg.Size = RightLeg.Size*SIZE
- LeftArm.Size = LeftArm.Size*SIZE
- LeftLeg.Size = LeftLeg.Size*SIZE
- RootJoint.C0 = ROOTC0 * CF(0 * SIZE, 0 * SIZE, 0 * SIZE) * ANGLES(RAD(0), RAD(0), RAD(0))
- RootJoint.C1 = ROOTC0 * CF(0 * SIZE, 0 * SIZE, 0 * SIZE) * ANGLES(RAD(0), RAD(0), RAD(0))
- Neck.C0 = NECKC0 * CF(0 * SIZE, 0 * SIZE, 0 + ((1 * SIZE) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0))
- Neck.C1 = CF(0 * SIZE, -0.5 * SIZE, 0 * SIZE) * ANGLES(RAD(-90), RAD(0), RAD(180))
- RightShoulder.C1 = CF(0, 1.25 * SIZE, 1 * SIZE)
- LeftShoulder.C1 = CF(0, 1.25 * SIZE, 1 * SIZE)
- RightHip.C0 = CF(1 * SIZE, -1 * SIZE, -0 * SIZE) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0))
- LeftHip.C0 = CF(-1 * SIZE, -1 * SIZE, -0 * SIZE) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0))
- RightHip.C1 = CF(0.5 * SIZE, 1 * SIZE, 0 * SIZE) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0))
- LeftHip.C1 = CF(-0.5 * SIZE, 1 * SIZE, 0 * SIZE) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0))
- Head.Size = Head.Size*SIZE
- RootJoint.Parent = RootPart
- Neck.Parent = Torso
- RightShoulder.Parent = Torso
- LeftShoulder.Parent = Torso
- RightHip.Parent = Torso
- LeftHip.Parent = Torso
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "ArtificialHB"
- script:WaitForChild("ArtificialHB")
- Frame_Speed = 0.016666666666666666
- 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 Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
- return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
- 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
- function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
- local NEWMESH = IT(MESH)
- if MESH == "SpecialMesh" then
- NEWMESH.MeshType = MESHTYPE
- if MESHID ~= "nil" and MESHID ~= "" then
- NEWMESH.MeshId = "http://www.roblox.com/asset/?id=" .. MESHID
- end
- if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
- NEWMESH.TextureId = "http://www.roblox.com/asset/?id=" .. TEXTUREID
- end
- end
- NEWMESH.Offset = OFFSET or VT(0, 0, 0)
- NEWMESH.Scale = SCALE
- NEWMESH.Parent = PARENT
- return NEWMESH
- end
- function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
- local NEWPART = IT("Part")
- NEWPART.formFactor = FORMFACTOR
- NEWPART.Reflectance = REFLECTANCE
- NEWPART.Transparency = TRANSPARENCY
- NEWPART.CanCollide = false
- NEWPART.Locked = true
- NEWPART.Anchored = true
- if ANCHOR == false then
- NEWPART.Anchored = false
- end
- NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
- NEWPART.Name = NAME
- NEWPART.Size = SIZE
- NEWPART.Position = Torso.Position
- NEWPART.Material = MATERIAL
- NEWPART:BreakJoints()
- NEWPART.Parent = PARENT
- return NEWPART
- end
- local weldBetween = function(a, b)
- local weldd = Instance.new("ManualWeld")
- weldd.Part0 = a
- weldd.Part1 = b
- weldd.C0 = CFrame.new()
- weldd.C1 = b.CFrame:inverse() * a.CFrame
- weldd.Parent = a
- return weldd
- end
- 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 m00 < m11 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 >= 1.0E-4 then
- if 1 - cosTheta > 1.0E-4 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
- elseif 1 + cosTheta > 1.0E-4 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
- 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
- function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
- local label = IT("TextLabel")
- label.BackgroundTransparency = 1
- label.Size = UD2(1, 0, 1, 0)
- label.Position = UD2(0, 0, 0, 0)
- label.TextColor3 = TEXTCOLOR
- label.TextStrokeTransparency = STROKETRANSPARENCY
- label.TextTransparency = TRANSPARENCY
- label.FontSize = TEXTFONTSIZE
- label.Font = TEXTFONT
- label.BorderSizePixel = BORDERSIZEPIXEL
- label.TextScaled = false
- label.Text = TEXT
- label.Name = NAME
- label.Parent = PARENT
- return label
- end
- function NoOutlines(PART)
- PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
- end
- function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
- local NEWWELD = IT(TYPE)
- NEWWELD.Part0 = PART0
- NEWWELD.Part1 = PART1
- NEWWELD.C0 = C0
- NEWWELD.C1 = C1
- NEWWELD.Parent = PARENT
- return NEWWELD
- end
- function MakeForm(PART, TYPE)
- if TYPE == "Cyl" then
- local MSH = IT("CylinderMesh", PART)
- elseif TYPE == "Ball" then
- local MSH = IT("SpecialMesh", PART)
- MSH.MeshType = "Sphere"
- elseif TYPE == "Wedge" then
- local MSH = IT("SpecialMesh", PART)
- MSH.MeshType = "Wedge"
- end
- end
- Debris = game:GetService("Debris")
- function CastProperRay(StartPos, EndPos, Distance, Ignore)
- local DIRECTION = CF(StartPos, EndPos).lookVector
- local Ignore = type(Ignore) == "table" and Ignore or {Ignore}
- return game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, DIRECTION * Distance), Ignore)
- end
- local Particle = IT("ParticleEmitter", nil)
- Particle.Enabled = false
- Particle.LightEmission = 0.9
- Particle.Rate = 150
- Particle.ZOffset = 0.2
- Particle.Rotation = NumberRange.new(-180, 180)
- ANIM = "Idle"
- local top = Instance.new("Shirt")
- top.ShirtTemplate = "rbxassetid://4067677780"
- top.Parent = Character
- top.Name = "Cloth"
- local bottom = Instance.new("Pants")
- bottom.PantsTemplate = "rbxassetid://4067677780"
- bottom.Parent = Character
- bottom.Name = "Cloth"
- function ParticleEmitter(Table)
- local PRTCL = Particle:Clone()
- local Color1 = Table.Color1 or C3(1, 1, 1)
- local Color2 = Table.Color2 or C3(1, 1, 1)
- local Speed = Table.Speed or 5
- local Drag = Table.Drag or 0
- local Size1 = Table.Size1 or 1
- local Size2 = Table.Size2 or 5
- local Lifetime1 = Table.Lifetime1 or 1
- local Lifetime2 = Table.Lifetime2 or 1.5
- local Parent = Table.Parent or Torso
- local Emit = Table.Emit or 100
- local Offset = Table.Offset or 360
- local Acel = Table.Acel or VT(0, 0, 0)
- local Enabled = Table.Enabled or false
- local Texture = Table.Texture or "281983280"
- local RotS = Table.RotSpeed or NumberRange.new(-15, 15)
- local Trans1 = Table.Transparency1 or 1
- local Trans2 = Table.Transparency2 or 0
- PRTCL.Parent = Parent
- PRTCL.RotSpeed = RotS
- PRTCL.Transparency = NumberSequence.new({
- NumberSequenceKeypoint.new(0, Trans1),
- NumberSequenceKeypoint.new(1, Trans2)
- })
- PRTCL.Texture = "http://www.roblox.com/asset/?id=" .. Texture
- PRTCL.Color = ColorSequence.new(Color1, Color2)
- PRTCL.Size = NumberSequence.new(Size1, Size2)
- PRTCL.Lifetime = NumberRange.new(Lifetime1, Lifetime2)
- PRTCL.Speed = NumberRange.new(Speed)
- PRTCL.VelocitySpread = Offset
- PRTCL.Drag = Drag
- PRTCL.Acceleration = Acel
- if Enabled == false then
- PRTCL:Emit(Emit)
- Debris:AddItem(PRTCL, Lifetime2)
- else
- PRTCL.Enabled = true
- end
- return PRTCL
- end
- function GetRoot(MODEL, ROOT)
- if ROOT == true then
- return MODEL:FindFirstChild("HumanoidRootPart") or MODEL:FindFirstChild("Torso") or MODEL:FindFirstChild("UpperTorso")
- else
- return MODEL:FindFirstChild("Torso") or MODEL:FindFirstChild("UpperTorso")
- end
- end
- local FAKEHEAD = CreatePart(3, Character, "Fabric", 0, 0, BRICKC("Pearl"), "NewHead", VT(1, 1, 1), true)
- FAKEHEAD.CanCollide = false
- CreateMesh("SpecialMesh", FAKEHEAD, "FileMesh", "16973748", "16973739", VT(1*SIZE, 1*SIZE, 1*SIZE), VT(0, 0, 0))
- local SCARF = CreatePart(3, Character, "Fabric", 0, 0, BRICKC("Black"), "Scarf", VT(1, 1, 1), false)
- CreateWeldOrSnapOrMotor("Weld", Torso, Torso, SCARF, CF(0, 0, 0), CF(0, 0, 0))
- --local GLASSES = CreatePart(3, Character, "Fabric", 0, 0, BRICKC("Pearl"), "Scarf", VT(1, 1, 0.9), false)
- --GLASSES.CFrame = FAKEHEAD.CFrame
- CreateMesh("SpecialMesh", SCARF, "FileMesh", "448710145", "", VT(0.6*SIZE, 1*SIZE, 1*SIZE), VT(0, 0.15, 0))
- --CreateMesh("SpecialMesh", GLASSES, "FileMesh", "134026193", "134026217", VT(1.5, 1, 2), VT(0, 0.3, -0.3))
- local FACE1 = CreatePart(3, Character, "Neon", 0, 0, BRICKC("Persimmon"), "Fire", VT(1.3*SIZE, 1*SIZE, 0.6*SIZE), false)
- MakeForm(FACE1, "Ball")
- local FACE2 = CreatePart(3, Character, "Neon", 0, 0, BRICKC("Persimmon"), "Fire", VT(1.3*SIZE, 0.65*SIZE, 0.55*SIZE), false)
- MakeForm(FACE2, "Ball")
- local FACE3 = CreatePart(3, Character, "Neon", 0, 0, BRICKC("Persimmon"), "Fire", VT(1.3*SIZE, 0.5*SIZE, 0.6*SIZE), false)
- MakeForm(FACE3, "Ball")
- local FACE4 = CreatePart(3, Character, "Neon", 0, 0, BRICKC("Persimmon"), "Fire", VT(1*SIZE, 0.1*SIZE, 1*SIZE), false)
- MakeForm(FACE4, "Ball")
- --CreateWeldOrSnapOrMotor("Weld", FAKEHEAD, FAKEHEAD, GLASSES, CF(0, 0, 0), CF(0, 0, 0))
- local L1 = CreateWeldOrSnapOrMotor("Weld", FAKEHEAD, FAKEHEAD, FACE1, CF(0*SIZE, 0*SIZE, -0.5*SIZE), CF(0, 0, 0))
- local L2 = CreateWeldOrSnapOrMotor("Weld", FAKEHEAD, FAKEHEAD, FACE2, CF(0*SIZE, 0.2*SIZE, -0.5*SIZE), CF(0, 0, 0))
- local L3 = CreateWeldOrSnapOrMotor("Weld", FAKEHEAD, FAKEHEAD, FACE3, CF(0*SIZE, 0.3*SIZE, -0.35*SIZE), CF(0, 0, 0))
- local L4 = CreateWeldOrSnapOrMotor("Weld", FAKEHEAD, FAKEHEAD, FACE4, CF(0*SIZE, -0.5*SIZE, 0*SIZE), CF(0, 0, 0))
- local NECKK
- Head:ClearAllChildren()
- Head.Transparency = 1
- local NCK = IT("Attachment", Torso)
- NCK.Position = VT(0, 1, 0)
- --[[
- local NECKFIRE = ParticleEmitter({
- Acel = VT(0, 3.5, 0),
- Speed = 1.5,
- RotSpeed = NumberRange.new(-15, 15),
- Drag = 0.1,
- Size1 = 0.6*SIZE,
- Size2 = 0*SIZE,
- Lifetime1 = 0,
- Lifetime2 = 0.45,
- Parent = NCK,
- Emit = 100,
- Offset = 360*SIZE,
- Enabled = true,
- Color1 = BRICKC("Persimmon").Color,
- Color2 = BRICKC("Persimmon").Color,
- Texture = "296874871"
- })
- NECKFIRE.LockedToPart = true
- NECKFIRE.Rate = 999
- ]]--
- print("Pump-vil by youngmacka123")
- local HEADTURN = true
- local char = Character
- local RS = char.Torso["Right Shoulder"]
- local LS = char.Torso["Left Shoulder"]
- local RH = char.Torso["Right Hip"]
- local LH = char.Torso["Left Hip"]
- local neck = char.Torso["Neck"]
- local rootj = char.HumanoidRootPart.RootJoint
- local sine = 0
- local RSnor = RS.C0
- local LSnor = LS.C0
- local RHnor = RH.C0
- local LHnor = LH.C0
- local rootjnor = rootj.C0
- local necknor = neck.C0
- local RootPart = rootj.Parent
- local Animator = Humanoid.Animator
- local SINE = 0
- local KEYHOLD = false
- local Rooted = false
- local ATTACK = false
- local HOLD = false
- local BMUSIC = IT("Sound", RootPart)
- local SONGID = 0
- local VOLUME = 10
- local PITCH = 1
- function Taunt()
- ATTACK = true
- Rooted = true
- HEADTURN = false
- local function E()
- for i = 0, 0.45, 0.1 / Animation_Speed do
- Swait()
- RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, -0.035) * ANGLES(RAD(25), RAD(0), RAD(0)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(15), RAD(0), RAD(0)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(2.1*SIZE, 0.5, 0.4) * ANGLES(RAD(45), RAD(-12), RAD(5)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-2.1*SIZE, 0.5, 0.4) * ANGLES(RAD(45), RAD(12), RAD(-5)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(0, -0.5, 0) * ANGLES(RAD(35), RAD(85), RAD(0)) * ANGLES(RAD(-2), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(0, -0.5, 0) * ANGLES(RAD(35), RAD(-85), RAD(0)) * ANGLES(RAD(-2), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- end
- repeat
- E()
- SONGID = 2377141094
- for i = 0, 0.45, 0.1 / Animation_Speed do
- Swait()
- RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0.08, 0, 0) * ANGLES(RAD(0), RAD(5), RAD(0)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(2*SIZE, 0*SIZE, 0) * ANGLES(RAD(160), RAD(-12), RAD(35)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-2*SIZE, 0*SIZE, 0) * ANGLES(RAD(160), RAD(12), RAD(-35)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(0, -0.5, 0) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(3), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(0, -0.5, 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-7), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- E()
- for i = 0, 0.45, 0.1 / Animation_Speed do
- Swait()
- RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(-0.08, 0, 0) * ANGLES(RAD(0), RAD(-5), RAD(0)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(2*SIZE, 0*SIZE, 0) * ANGLES(RAD(160), RAD(-12), RAD(35)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-2*SIZE, 0*SIZE, 0) * ANGLES(RAD(160), RAD(12), RAD(-35)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(0, -0.5, 0) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-7), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(0, -0.5, 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(3), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- until KEYHOLD == false
- HEADTURN = true
- ATTACK = false
- Rooted = false
- SONGID = 0
- end
- function MouseDown(Mouse)
- if ATTACK == false then
- end
- end
- function MouseUp(Mouse)
- HOLD = false
- end
- function KeyDown(Key)
- KEYHOLD = true
- if Key == "t" and ATTACK == false then
- Taunt()
- end
- if Key == "n" and ATTACK == false then
- if HEADTURN == true then
- HEADTURN = false
- elseif HEADTURN == false then
- HEADTURN = true
- end
- end
- end
- function KeyUp(Key)
- KEYHOLD = false
- end
- Mouse.Button1Down:connect(function(NEWKEY)
- MouseDown(NEWKEY)
- end)
- Mouse.Button1Up:connect(function(NEWKEY)
- MouseUp(NEWKEY)
- end)
- Mouse.KeyDown:connect(function(NEWKEY)
- KeyDown(NEWKEY)
- end)
- Mouse.KeyUp:connect(function(NEWKEY)
- KeyUp(NEWKEY)
- end)
- while true do
- Swait()
- SINE = SINE + 1
- Animator.Parent = nil
- local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
- local TORSOVERTICALVELOCITY = RootPart.Velocity.y
- local HITFLOOR = Raycast(RootPart.Position, CF(RootPart.Position, RootPart.Position + VT(0, -1, 0)).lookVector, 4, Character)
- local WALKSPEEDVALUE = 8 / (Humanoid.WalkSpeed / 16)
- local SPEED = WALKSPEEDVALUE
- if ANIM == "Walk" and TORSOVELOCITY > 1 then
- RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0.1 * COS(SINE / (WALKSPEEDVALUE / 2))) * ANGLES(RAD(0), RAD(0), RAD(0)), 2 / Animation_Speed)
- Neck.C1 = Clerp(Neck.C1, CF(0, -0.5*SIZE, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.6 / Animation_Speed)
- RightHip.C1 = Clerp(RightHip.C1, CF(0.2, 0.8, 0 - 0 * COS(sine / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0 + 0 * COS(SINE / WALKSPEEDVALUE))), 0.6 * SPEED / Animation_Speed)
- LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.2, 0.8, 0 - 0 * COS(sine / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-0 + 0 * COS(SINE / WALKSPEEDVALUE))), 0.6 * SPEED / Animation_Speed)
- elseif ANIM ~= "Walk" or TORSOVELOCITY < 1 then
- RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
- Neck.C1 = Clerp(Neck.C1, CF(0, -0.5*SIZE, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
- RightHip.C1 = Clerp(RightHip.C1, CF(-0.2, 0.25, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.7 / Animation_Speed)
- LeftHip.C1 = Clerp(LeftHip.C1, CF(0.2, 0.25, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.7 / Animation_Speed)
- end
- if TORSOVELOCITY < 1 and HITFLOOR ~= nil then
- ANIM = "Idle"
- if ATTACK == false then
- rootj.C0 = Clerp(rootj.C0, ROOTC0 * CF(0 - 0 * SIN(SINE / 24)*SIZE, 0*SIZE, 0 + 0.01 * COS(SINE / 12)*SIZE) * ANGLES(RAD(0), RAD(0 - 2.5 * SIN(SINE / 24)), RAD(0)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0*SIZE, 0*SIZE, 0*SIZE) * ANGLES(RAD(0 - 5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(0.6, 0.75, 0) * ANGLES(RAD(0), RAD(-12 + 2.5 * SIN(SINE / 12)), RAD(55 + 2.5 * SIN(SINE / 12) - 2.5 * COS(SINE / 6))) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.6, 0.75, 0) * ANGLES(RAD(0), RAD(12 - 2.5 * SIN(SINE / 12)), RAD(-55 - 2.5 * SIN(SINE / 12) - 2.5 * COS(SINE / 6))) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(0, -0.5 + 0.001 * SIN(SINE / 24) - 0.02 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-2 - 2.5 * SIN(SINE / 24)), RAD(0), RAD(0)), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(0, -0.5 - 0.001 * SIN(SINE / 24) - 0.02 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-2 + 2.5 * SIN(SINE / 24)), RAD(0), RAD(0)), 1 / Animation_Speed)
- end
- elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
- ANIM = "Walk"
- if ATTACK == false then
- if Humanoid.WalkSpeed < 25 then
- RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, -0.05) * ANGLES(RAD(5), RAD(0), RAD(-7 * COS(SINE / WALKSPEEDVALUE))), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(5 - 1 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(7 * COS(SINE / WALKSPEEDVALUE))), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(0.6, 0.75, 0 + 0.25 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(0), RAD(50 - 5 * SIN(SINE / (WALKSPEEDVALUE / 2)))) * ANGLES(RAD(60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.6, 0.75, 0 - 0.25 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(0), RAD(-50 + 5 * SIN(SINE / (WALKSPEEDVALUE / 2)))) * ANGLES(RAD(-60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(0)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(0, 0, 0 + 0.25 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10 + 50 * COS(SINE / WALKSPEEDVALUE))), 2 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(0, 0, 0 - 0.25 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-10 + 50 * COS(SINE / WALKSPEEDVALUE))), 2 / Animation_Speed)
- else
- RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(-35), RAD(0), RAD(0)), 1 / Animation_Speed)
- Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(-15), RAD(0), RAD(0)), 1 / Animation_Speed)
- RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.6, 0.4) * ANGLES(RAD(-125 + 5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(-12 + 5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(5)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
- LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.35, 0.6, 0.4) * ANGLES(RAD(-125 + 5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(12 - 5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(-5)) * LEFTSHOULDERC0, 1 / Animation_Speed)
- RightHip.C0 = Clerp(RightHip.C0, CF(0, -0.5, 0 + 0.1 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(-45), RAD(85), RAD(0)) * ANGLES(RAD(10 + 50 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(0 + 0 * COS(SINE / WALKSPEEDVALUE))), 1 / Animation_Speed)
- LeftHip.C0 = Clerp(LeftHip.C0, CF(-0, -0.5, 0 - 0.1 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(-45), RAD(-85), RAD(0)) * ANGLES(RAD(-10 + 50 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-0 + 0 * COS(SINE / WALKSPEEDVALUE))), 1 / Animation_Speed)
- end
- end
- end
- if HEADTURN == true and ANIM == "Idle" then
- if NECKK then
- NECKK:Remove()
- NECKK = nil
- end
- if Mouse.Hit.p then
- FAKEHEAD.CFrame = CF(Head.CFrame * CF(0, 0.5, 0).p) * ANGLES(RAD(0), RAD(FAKEHEAD.Orientation.Y), RAD(0))
- FAKEHEAD.CFrame = Clerp(FAKEHEAD.CFrame, CF(FAKEHEAD.Position, Mouse.Hit.p), 0.1)
- end
- FAKEHEAD.Anchored = true
- --GLASSES.CFrame = FAKEHEAD.CFrame
- FACE1.CFrame = FAKEHEAD.CFrame * L1.C0
- FACE2.CFrame = FAKEHEAD.CFrame * L2.C0
- FACE3.CFrame = FAKEHEAD.CFrame * L3.C0
- FACE4.CFrame = FAKEHEAD.CFrame * L4.C0
- FAKEHEAD.Velocity = VT(0, 0, 0)
- --GLASSES.Velocity = VT(0, 0, 0)
- FACE1.Velocity = VT(0, 0, 0)
- FACE2.Velocity = VT(0, 0, 0)
- FACE3.Velocity = VT(0, 0, 0)
- FACE4.Velocity = VT(0, 0, 0)
- else
- if NECKK == nil then
- NECKK = weldBetween(FAKEHEAD, Head)
- else
- NECKK.C1 = Clerp(NECKK.C1, CF(0, 0.55, 0), 0.2)
- end
- FAKEHEAD.Anchored = false
- end
- BMUSIC.SoundId = "rbxassetid://" .. SONGID
- BMUSIC.Looped = true
- BMUSIC.Pitch = PITCH
- BMUSIC.Volume = VOLUME
- BMUSIC.Playing = true
- BMUSIC.EmitterSize = 50
- if BMUSIC.Parent ~= RootPart then
- print("Fixing music")
- BMUSIC = IT("Sound", RootPart)
- BMUSIC.SoundId = "rbxassetid://" .. SONGID
- BMUSIC.Looped = true
- BMUSIC.Pitch = PITCH
- BMUSIC.Volume = VOLUME
- BMUSIC.Playing = true
- BMUSIC.EmitterSize = 50
- BMUSIC.TimePosition = TIMESTAMP
- FIXING = true
- elseif FIXING == false then
- TIMESTAMP = BMUSIC.TimePosition
- else
- FIXING = false
- end
- for _, c in pairs(Character:GetChildren()) do
- if c.ClassName == "Part" and c.Name ~= "Eye" and c ~= FACE1 and c ~= FACE2 and c ~= FACE3 and c ~= FACE4 and c ~= FAKEHEAD then
- c.Material = "Fabric"
- if c:FindFirstChildOfClass("ParticleEmitter") then
- c:FindFirstChildOfClass("ParticleEmitter"):remove()
- end
- c.Color = C3(0, 0, 0)
- if c == Head then
- c:ClearAllChildren()
- c.Transparency = 1
- end
- elseif c.ClassName == "CharacterMesh" or c.ClassName == "Accessory" or c.Name == "Body Colors" then
- c:remove()
- elseif (c.ClassName == "Shirt" or c.ClassName == "Pants") and c.Name ~= "Cloth" then
- c:remove()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement