Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Tween Version by basstracker1970
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "Heartbeat"
- script:WaitForChild("Heartbeat")
- Player = owner
- PlayerGui = nil
- Cam = workspace.CurrentCamera
- Backpack = nil
- Character = Player.Character
- Humanoid = Character.Humanoid
- Mouse = nil
- 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"]
- Humanoid = Character.Humanoid
- local BODY = {}
- for _, c in pairs(Character:GetDescendants()) do
- if c:IsA("BasePart") and c.Name ~= "Handle" then
- if c ~= RootPart and c ~= Torso and c ~= Head and c ~= RightArm and c ~= LeftArm and c ~= RightLeg and c ~= LeftLeg then
- c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
- end
- table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency,c.Size,c.Name})
- elseif c:IsA("JointInstance") then
- table.insert(BODY,{c,c.Parent,nil,nil,nil,nil,nil})
- end
- end
- local music = Instance.new("Sound",Character)
- music.Name = "spoopymonth"
- music.SoundId = "rbxassetid://5797107302"
- music.Looped = true
- music:Play()
- function refit()
- Character.Parent = workspace
- for e = 1, #BODY do
- if BODY[e] ~= nil then
- local STUFF = BODY[e]
- local PART = STUFF[1]
- local PARENT = STUFF[2]
- local MATERIAL = STUFF[3]
- local COLOR = STUFF[4]
- local TRANSPARENCY = STUFF[5]
- --local SIZE = STUFF[6]
- local NAME = STUFF[7]
- if PART.ClassName == "Part" and PART ~= RootPart then
- PART.Material = MATERIAL
- PART.Transparency = TRANSPARENCY
- PART.Name = NAME
- end
- if PART.Parent ~= PARENT then
- Humanoid:remove()
- PART.Parent = PARENT
- Humanoid = IT("Humanoid",Character)
- end
- end
- end
- end
- Humanoid.Died:connect(function()
- refit()
- end)
- PlayerGui = nil
- Cam = workspace.CurrentCamera
- Backpack = nil
- Humanoid = Character.Humanoid
- Mouse = nil
- 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
- local Speed = 0.1
- AnimationSpeed=.8
- SmoothTime=2
- function swait(num)
- if num==0 or num==nil then
- --if Stagger.Value==false or Stun.Value<=100 then
- --Player.PlayerGui.Pacemaker.Heartbeat.Event:wait()
- script.Heartbeat.Event:wait()
- --end
- else
- for i=0,num do
- --Player.PlayerGui.Pacemaker.Heartbeat.Event:wait()
- script.Heartbeat.Event:wait()
- --[[if Stagger.Value==true or Stun.Value>=StunT.Value then
- break
- end]]
- end
- end
- end
- script:WaitForChild("Heartbeat")
- frame = 1/60
- tf = 0
- allowframeloss = false --if set to true will fire every frame it possibly can. This will result in multiple events happening at the same time whenever delta returns frame2 or greater.
- tossremainder = false --if set to true t will be set to 0 after Fire()-ing.
- lastframe = tick()
- script.Heartbeat:Fire() --ayy lmao
- game:GetService("RunService").Heartbeat:connect(function(s,p) --herp derp
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- script.Heartbeat:Fire()
- lastframe=tick()
- else
- ----print("FIRED "..math.floor(t/frame).." FRAME(S)","REMAINDER "..(t - frame(math.floor(t/frame))))
- for i=1, math.floor(tf/frame) do
- script.Heartbeat:Fire()
- end
- lastframe=tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf/frame)
- end
- end
- end)
- Anim = {
- Properties = {
- Looping = true,
- Priority = Enum.AnimationPriority.Idle
- },
- Keyframes = {
- [0] = {
- ["HumanoidRootPart"] = {
- ["Torso"] = {
- CFrame = CFrame.new(0, 0, -0.633) * CFrame.Angles(math.rad(4.412), math.rad(0.516), math.rad(-21.601)),
- ["Head"] = {
- CFrame = CFrame.Angles(math.rad(17.418), 0, 0),
- },
- ["Left Leg"] = {
- CFrame = CFrame.new(-0.215, 0.592, -0.065) * CFrame.Angles(math.rad(-6.761), math.rad(25.096), math.rad(-2.922)),
- },
- ["Right Arm"] = {
- CFrame = CFrame.new(1.066, -0.635, 0.37) * CFrame.Angles(math.rad(-60.504), math.rad(-13.694), math.rad(164.84)),
- },
- ["Right Leg"] = {
- CFrame = CFrame.new(0.188, 0.564, 0.136) * CFrame.Angles(math.rad(-7.85), math.rad(-16.501), math.rad(5.214)),
- },
- ["Left Arm"] = {
- CFrame = CFrame.new(-1.177, -0.481, 0.618) * CFrame.Angles(math.rad(-65.661), math.rad(25.955), math.rad(-172.059)),
- },
- },
- },
- },
- [0.083] = {
- ["HumanoidRootPart"] = {
- ["Torso"] = {
- CFrame = CFrame.new(0.001, -0.005, -0.573) * CFrame.Angles(math.rad(4.412), math.rad(0.516), math.rad(-21.601)),
- ["Head"] = {
- CFrame = CFrame.Angles(math.rad(18.678), math.rad(1.833), math.rad(-0.057)),
- },
- ["Left Leg"] = {
- CFrame = CFrame.new(-0.215, 0.592, -0.065) * CFrame.Angles(math.rad(-7.62), math.rad(25.153), math.rad(-2.521)),
- },
- ["Right Arm"] = {
- CFrame = CFrame.new(1.066, -0.635, 0.37) * CFrame.Angles(math.rad(-59.015), math.rad(-8.422), math.rad(165.126)),
- },
- ["Right Leg"] = {
- CFrame = CFrame.new(0.189, 0.55, 0.138) * CFrame.Angles(math.rad(-6.589), math.rad(-16.387), math.rad(5.615)),
- },
- ["Left Arm"] = {
- CFrame = CFrame.new(-1.177, -0.481, 0.618) * CFrame.Angles(math.rad(-64.63), math.rad(19.022), math.rad(-172.403)),
- },
- },
- },
- },
- [0.25] = {
- ["HumanoidRootPart"] = {
- ["Torso"] = {
- CFrame = CFrame.new(0.029, -0.07, -0.807) * CFrame.Angles(math.rad(-15.584), math.rad(-6.589), math.rad(18.793)),
- ["Head"] = {
- CFrame = CFrame.Angles(math.rad(19.079), math.rad(-11.345), math.rad(25.726)),
- },
- ["Left Leg"] = {
- CFrame = CFrame.new(-0.09, 0.611, 0.3) * CFrame.Angles(math.rad(-25.611), math.rad(63.77), math.rad(37.128)),
- },
- ["Right Arm"] = {
- CFrame = CFrame.new(0.499, -0.5, -0.018) * CFrame.Angles(math.rad(-45.206), math.rad(21.887), math.rad(82.621)),
- },
- ["Right Leg"] = {
- CFrame = CFrame.new(0.161, 0.676, 0.21) * CFrame.Angles(math.rad(-22.173), math.rad(-26.814), math.rad(-16.73)),
- },
- ["Left Arm"] = {
- CFrame = CFrame.new(-0.403, -0.631, 0.322) * CFrame.Angles(math.rad(-73.453), math.rad(-9.969), math.rad(-60.275)),
- },
- },
- },
- },
- [0.333] = {
- ["HumanoidRootPart"] = {
- ["Torso"] = {
- CFrame = CFrame.new(0.035, -0.086, -0.863) * CFrame.Angles(math.rad(-15.584), math.rad(-6.589), math.rad(18.793)),
- ["Head"] = {
- CFrame = CFrame.Angles(math.rad(17.704), math.rad(-12.032), math.rad(25.382)),
- },
- ["Left Leg"] = {
- CFrame = CFrame.new(-0.09, 0.611, 0.3) * CFrame.Angles(math.rad(-25.611), math.rad(63.77), math.rad(33.06)),
- },
- ["Right Arm"] = {
- CFrame = CFrame.new(0.499, -0.5, -0.018) * CFrame.Angles(math.rad(-48.243), math.rad(22.231), math.rad(83.766)),
- },
- ["Right Leg"] = {
- CFrame = CFrame.new(0.161, 0.676, 0.21) * CFrame.Angles(math.rad(-23.262), math.rad(-26.528), math.rad(-17.246)),
- },
- ["Left Arm"] = {
- CFrame = CFrame.new(-0.381, -0.639, 0.36) * CFrame.Angles(math.rad(-73.453), math.rad(-9.969), math.rad(-60.275)),
- },
- },
- },
- },
- [0.5] = {
- ["HumanoidRootPart"] = {
- ["Torso"] = {
- CFrame = CFrame.new(0, 0, -0.633) * CFrame.Angles(math.rad(4.412), math.rad(0.516), math.rad(-21.601)),
- ["Head"] = {
- CFrame = CFrame.Angles(math.rad(17.418), 0, 0),
- },
- ["Left Leg"] = {
- CFrame = CFrame.new(-0.215, 0.592, -0.065) * CFrame.Angles(math.rad(-6.761), math.rad(25.096), math.rad(-2.922)),
- },
- ["Right Arm"] = {
- CFrame = CFrame.new(1.066, -0.635, 0.37) * CFrame.Angles(math.rad(-60.504), math.rad(-13.694), math.rad(164.84)),
- },
- ["Right Leg"] = {
- CFrame = CFrame.new(0.188, 0.564, 0.136) * CFrame.Angles(math.rad(-7.85), math.rad(-16.501), math.rad(5.214)),
- },
- ["Left Arm"] = {
- CFrame = CFrame.new(-1.177, -0.481, 0.618) * CFrame.Angles(math.rad(-65.661), math.rad(25.955), math.rad(-172.059)),
- },
- },
- },
- },
- [0.583] = {
- ["HumanoidRootPart"] = {
- ["Torso"] = {
- CFrame = CFrame.new(0.001, -0.005, -0.573) * CFrame.Angles(math.rad(4.412), math.rad(0.516), math.rad(-21.601)),
- ["Head"] = {
- CFrame = CFrame.Angles(math.rad(18.678), math.rad(1.833), math.rad(-0.057)),
- },
- ["Left Leg"] = {
- CFrame = CFrame.new(-0.215, 0.592, -0.065) * CFrame.Angles(math.rad(-7.62), math.rad(25.153), math.rad(-2.521)),
- },
- ["Right Arm"] = {
- CFrame = CFrame.new(1.066, -0.635, 0.37) * CFrame.Angles(math.rad(-59.015), math.rad(-8.422), math.rad(165.126)),
- },
- ["Right Leg"] = {
- CFrame = CFrame.new(0.189, 0.55, 0.138) * CFrame.Angles(math.rad(-6.589), math.rad(-16.387), math.rad(5.615)),
- },
- ["Left Arm"] = {
- CFrame = CFrame.new(-1.177, -0.481, 0.618) * CFrame.Angles(math.rad(-64.63), math.rad(19.022), math.rad(-172.403)),
- },
- },
- },
- },
- [0.667] = {
- ["HumanoidRootPart"] = {
- ["Torso"] = {
- CFrame = CFrame.new(0.09, -0.127, -0.839) * CFrame.Angles(math.rad(-7.105), math.rad(8.48), math.rad(-34.263)),
- ["Head"] = {
- CFrame = CFrame.new(-0.001, -0.002, -0.031) * CFrame.Angles(math.rad(-1.203), math.rad(1.776), math.rad(0.573)),
- },
- ["Left Leg"] = {
- CFrame = CFrame.new(-0.098, 0.724, -0.004) * CFrame.Angles(math.rad(-24.752), math.rad(50.936), math.rad(8.079)),
- },
- ["Right Arm"] = {
- CFrame = CFrame.new(0.485, -0.569, 0.1) * CFrame.Angles(math.rad(-72.422), math.rad(-1.833), math.rad(64.515)),
- },
- ["Right Leg"] = {
- CFrame = CFrame.new(0.195, 0.632, 0.13) * CFrame.Angles(math.rad(-7.62), math.rad(-28.132), math.rad(-4.756)),
- },
- ["Left Arm"] = {
- CFrame = CFrame.new(-0.777, -0.593, 0.318) * CFrame.Angles(math.rad(-78.553), math.rad(-16.788), math.rad(-94.882)),
- },
- },
- },
- },
- [0.75] = {
- ["HumanoidRootPart"] = {
- ["Torso"] = {
- CFrame = CFrame.new(0.09, -0.127, -0.839) * CFrame.Angles(math.rad(-5.787), math.rad(7.62), math.rad(-34.435)),
- ["Head"] = {
- CFrame = CFrame.new(-0.001, -0.002, -0.031) * CFrame.Angles(math.rad(0.802), math.rad(1.776), math.rad(0.516)),
- },
- ["Left Leg"] = {
- CFrame = CFrame.new(-0.098, 0.724, -0.004) * CFrame.Angles(math.rad(-25.955), math.rad(55.577), math.rad(8.995)),
- },
- ["Right Arm"] = {
- CFrame = CFrame.new(0.625, -0.572, 0.17) * CFrame.Angles(math.rad(-72.422), math.rad(-1.833), math.rad(64.515)),
- },
- ["Right Leg"] = {
- CFrame = CFrame.new(0.193, 0.596, 0.133) * CFrame.Angles(math.rad(-7.62), math.rad(-28.132), math.rad(-4.756)),
- },
- ["Left Arm"] = {
- CFrame = CFrame.new(-0.876, -0.62, 0.303) * CFrame.Angles(math.rad(-78.553), math.rad(-16.788), math.rad(-94.882)),
- },
- },
- },
- },
- [1] = {
- ["HumanoidRootPart"] = {
- ["Torso"] = {
- CFrame = CFrame.new(0, 0, -0.633) * CFrame.Angles(math.rad(4.412), math.rad(0.516), math.rad(-21.601)),
- ["Head"] = {
- CFrame = CFrame.Angles(math.rad(17.418), 0, 0),
- },
- ["Left Leg"] = {
- CFrame = CFrame.new(-0.215, 0.592, -0.065) * CFrame.Angles(math.rad(-6.761), math.rad(25.096), math.rad(-2.922)),
- },
- ["Right Arm"] = {
- CFrame = CFrame.new(1.066, -0.635, 0.37) * CFrame.Angles(math.rad(-60.504), math.rad(-13.694), math.rad(164.84)),
- },
- ["Right Leg"] = {
- CFrame = CFrame.new(0.188, 0.564, 0.136) * CFrame.Angles(math.rad(-7.85), math.rad(-16.501), math.rad(5.214)),
- },
- ["Left Arm"] = {
- CFrame = CFrame.new(-1.177, -0.481, 0.618) * CFrame.Angles(math.rad(-65.661), math.rad(25.955), math.rad(-172.059)),
- },
- },
- },
- },
- }
- }
- local number=0
- LastTimeSetTotal=0
- local savec0 = {}
- GetAnimCF = function(Anim,limb,Time)
- local GA = nil
- coroutine.resume(coroutine.create(function()
- local anim = Anim
- if limb == "Torso" then
- GA = Anim.Keyframes[Time]["HumanoidRootPart"]["Torso"].CFrame
- else
- GA = Anim.Keyframes[Time]["HumanoidRootPart"]["Torso"][""..limb].CFrame
- end
- end))
- return GA
- end
- local model = nil
- if owner ~= nil then
- model = Player.Character
- else
- model = Player.Character
- end
- function GatherAllInstances(Parent)
- local Instances = {}
- local function GatherInstances(Parent)
- for i, v in pairs(Parent:GetChildren()) do
- GatherInstances(v)
- table.insert(Instances, v)
- end
- end
- GatherInstances(Parent)
- return Instances
- end
- for i, v in pairs(GatherAllInstances(model)) do
- if v:IsA("BasePart") then
- for i, v2 in pairs(GatherAllInstances(model)) do
- if v2:IsA("Motor6D") and v2.Part1.Name == v.Name then
- local saveCF = v2.C0
- table.insert(savec0,{v2.Name,saveCF})
- end
- end
- end end
- RunAnim = function(anim,Time)
- local speed = Time-LastTimeSetTotal
- speed = speed*AnimationSpeed
- LastTimeSetTotal = Time
- local doing = true
- coroutine.resume(coroutine.create(function()
- for i, v in pairs(GatherAllInstances(model)) do
- if v:IsA("BasePart") then
- for i, v2 in pairs(GatherAllInstances(model)) do
- if v2:IsA("Motor6D") and v2.Part1.Name == v.Name then
- local GotAnim = GetAnimCF(anim,v.Name,Time)
- local saveCF = nil
- for i,v3 in pairs(savec0) do
- if v2.name == v3[1] then
- saveCF = v3[2]
- end
- end
- if GotAnim ~= nil and saveCF ~= nil then
- coroutine.resume(coroutine.create(function()
- while doing == true do
- swait()
- local tweenservice = game:GetService("TweenService")
- local TweenInformation = TweenInfo.new(0,Enum.EasingStyle.Quad,Enum.EasingDirection.In,0,
- false,
- 0)
- tweenservice:Create(v2,TweenInformation,{C0 = v2.C0:lerp(saveCF*GotAnim,SmoothTime *speed)}):Play()
- ---v2.C0 = v2.C0:lerp(saveCF*GotAnim,SmoothTime *speed)
- end
- end))
- end
- end
- end
- end end
- end))
- wait(speed)
- doing = false
- end
- while true do
- RunAnim(Anim,0)
- RunAnim(Anim,0.083)
- RunAnim(Anim,0.25)
- RunAnim(Anim,0.333)
- RunAnim(Anim,0.5)
- RunAnim(Anim,0.583)
- RunAnim(Anim,0.667)
- RunAnim(Anim,0.75)
- RunAnim(Anim,1)
- -----------
- LastTimeSetTotal = .1
- Humanoid.MaxHealth = "inf"
- Humanoid.Health = "inf"
- refit()
- end
Add Comment
Please, Sign In to add comment