Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Converted using Mokiros's Model to Script plugin
- -- Converted string size: 16722
- local genv={}
- local Scripts = {
- function() --[[
- Author: @spotco
- This script creates sounds which are placed under the character head.
- These sounds are used by the "LocalSound" script.
- To modify this script, copy it to your "StarterPlayer/StarterCharacterScripts" folder keeping the same script name ("Sound").
- The default Sound script loaded for every character will then be replaced with your copy of the script.
- ]]--
- function CreateNewSound(name, id, looped, pitch, parent)
- local sound = Instance.new("Sound")
- sound.SoundId = id
- sound.Name = name
- sound.archivable = false
- sound.Parent = parent
- sound.Pitch = pitch
- sound.Looped = looped
- sound.MinDistance = 5
- sound.MaxDistance = 150
- sound.Volume = 0.65
- return sound
- end
- local head = script.Parent:FindFirstChild("Head")
- if head == nil then
- error("Sound script parent has no child Head.")
- return
- end
- CreateNewSound("GettingUp", "rbxasset://sounds/action_get_up.mp3", false, 1, head)
- CreateNewSound("Died", "rbxasset://sounds/uuhhh.mp3", false, 1, head)
- CreateNewSound("FreeFalling", "rbxasset://sounds/action_falling.mp3", true, 1, head)
- CreateNewSound("Jumping", "rbxasset://sounds/action_jump.mp3", false, 1, head)
- CreateNewSound("Landing", "rbxasset://sounds/action_jump_land.mp3", false, 1, head)
- CreateNewSound("Splash", "rbxasset://sounds/impact_water.mp3", false, 1, head)
- CreateNewSound("Running", "rbxasset://sounds/action_footsteps_plastic.mp3", true, 1.85, head)
- CreateNewSound("Swimming", "rbxasset://sounds/action_swim.mp3", true, 1.6, head)
- CreateNewSound("Climbing", "rbxasset://sounds/action_footsteps_plastic.mp3", true, 1, head) end;
- function() --[[
- Author: @spotco
- This script runs locally for the player of the given humanoid.
- This script triggers humanoid sound play/pause actions locally.
- The Playing/TimePosition properties of Sound objects bypass FilteringEnabled, so this triggers the sound
- immediately for the player and is replicated to all other players.
- This script is optimized to reduce network traffic through minimizing the amount of property replication.
- ]]--
- --All sounds are referenced by this ID
- local SFX = {
- Died = 0;
- Running = 1;
- Swimming = 2;
- Climbing = 3,
- Jumping = 4;
- GettingUp = 5;
- FreeFalling = 6;
- FallingDown = 7;
- Landing = 8;
- Splash = 9;
- }
- local Humanoid = nil
- local Head = nil
- --SFX ID to Sound object
- local Sounds = {}
- do
- local Figure = script.Parent.Parent
- Head = Figure:WaitForChild("Head")
- while not Humanoid do
- for _,NewHumanoid in pairs(Figure:GetChildren()) do
- if NewHumanoid:IsA("Humanoid") then
- Humanoid = NewHumanoid
- break
- end
- end
- Figure.ChildAdded:wait()
- end
- Sounds[SFX.Died] = Head:WaitForChild("Died")
- Sounds[SFX.Running] = Head:WaitForChild("Running")
- Sounds[SFX.Swimming] = Head:WaitForChild("Swimming")
- Sounds[SFX.Climbing] = Head:WaitForChild("Climbing")
- Sounds[SFX.Jumping] = Head:WaitForChild("Jumping")
- Sounds[SFX.GettingUp] = Head:WaitForChild("GettingUp")
- Sounds[SFX.FreeFalling] = Head:WaitForChild("FreeFalling")
- Sounds[SFX.Landing] = Head:WaitForChild("Landing")
- Sounds[SFX.Splash] = Head:WaitForChild("Splash")
- end
- local Util
- Util = {
- --Define linear relationship between (pt1x,pt2x) and (pt2x,pt2y). Evaluate this at x.
- YForLineGivenXAndTwoPts = function(x,pt1x,pt1y,pt2x,pt2y)
- --(y - y1)/(x - x1) = m
- local m = (pt1y - pt2y) / (pt1x - pt2x)
- --float b = pt1.y - m * pt1.x;
- local b = (pt1y - m * pt1x)
- return m * x + b
- end;
- --Clamps the value of "val" between the "min" and "max"
- Clamp = function(val,min,max)
- return math.min(max,math.max(min,val))
- end;
- --Gets the horizontal (x,z) velocity magnitude of the given part
- HorizontalSpeed = function(Head)
- local hVel = Head.Velocity + Vector3.new(0,-Head.Velocity.Y,0)
- return hVel.magnitude
- end;
- --Gets the vertical (y) velocity magnitude of the given part
- VerticalSpeed = function(Head)
- return math.abs(Head.Velocity.Y)
- end;
- --Setting Playing/TimePosition values directly result in less network traffic than Play/Pause/Resume/Stop
- --If these properties are enabled, use them.
- Play = function(sound)
- if sound.TimePosition ~= 0 then
- sound.TimePosition = 0
- end
- if not sound.IsPlaying then
- sound.Playing = true
- end
- end;
- Pause = function(sound)
- if sound.IsPlaying then
- sound.Playing = false
- end
- end;
- Resume = function(sound)
- if not sound.IsPlaying then
- sound.Playing = true
- end
- end;
- Stop = function(sound)
- if sound.IsPlaying then
- sound.Playing = false
- end
- if sound.TimePosition ~= 0 then
- sound.TimePosition = 0
- end
- end;
- }
- do
- -- List of all active Looped sounds
- local playingLoopedSounds = {}
- -- Last seen Enum.HumanoidStateType
- local activeState = nil
- -- Verify and set that "sound" is in "playingLoopedSounds".
- function setSoundInPlayingLoopedSounds(sound)
- for i=1, #playingLoopedSounds do
- if playingLoopedSounds[i] == sound then
- return
- end
- end
- table.insert(playingLoopedSounds,sound)
- end
- -- Stop all active looped sounds except parameter "except". If "except" is not passed, all looped sounds will be stopped.
- function stopPlayingLoopedSoundsExcept(except)
- for i=#playingLoopedSounds,1,-1 do
- if playingLoopedSounds[i] ~= except then
- Util.Pause(playingLoopedSounds[i])
- table.remove(playingLoopedSounds,i)
- end
- end
- end
- -- Table of Enum.HumanoidStateType to handling function
- local stateUpdateHandler = {
- [Enum.HumanoidStateType.Dead] = function()
- stopPlayingLoopedSoundsExcept()
- local sound = Sounds[SFX.Died]
- Util.Play(sound)
- end;
- [Enum.HumanoidStateType.RunningNoPhysics] = function()
- stateUpdated(Enum.HumanoidStateType.Running)
- end;
- [Enum.HumanoidStateType.Running] = function()
- local sound = Sounds[SFX.Running]
- stopPlayingLoopedSoundsExcept(sound)
- if Util.HorizontalSpeed(Head) > 0.5 then
- Util.Resume(sound)
- setSoundInPlayingLoopedSounds(sound)
- else
- stopPlayingLoopedSoundsExcept()
- end
- end;
- [Enum.HumanoidStateType.Swimming] = function()
- if activeState ~= Enum.HumanoidStateType.Swimming and Util.VerticalSpeed(Head) > 0.1 then
- local splashSound = Sounds[SFX.Splash]
- splashSound.Volume = Util.Clamp(
- Util.YForLineGivenXAndTwoPts(
- Util.VerticalSpeed(Head),
- 100, 0.28,
- 350, 1),
- 0,1)
- Util.Play(splashSound)
- end
- do
- local sound = Sounds[SFX.Swimming]
- stopPlayingLoopedSoundsExcept(sound)
- Util.Resume(sound)
- setSoundInPlayingLoopedSounds(sound)
- end
- end;
- [Enum.HumanoidStateType.Climbing] = function()
- local sound = Sounds[SFX.Climbing]
- if Util.VerticalSpeed(Head) > 0.1 then
- Util.Resume(sound)
- stopPlayingLoopedSoundsExcept(sound)
- else
- stopPlayingLoopedSoundsExcept()
- end
- setSoundInPlayingLoopedSounds(sound)
- end;
- [Enum.HumanoidStateType.Jumping] = function()
- if activeState == Enum.HumanoidStateType.Jumping then
- return
- end
- stopPlayingLoopedSoundsExcept()
- local sound = Sounds[SFX.Jumping]
- Util.Play(sound)
- end;
- [Enum.HumanoidStateType.GettingUp] = function()
- stopPlayingLoopedSoundsExcept()
- local sound = Sounds[SFX.GettingUp]
- Util.Play(sound)
- end;
- [Enum.HumanoidStateType.Freefall] = function()
- if activeState == Enum.HumanoidStateType.Freefall then
- return
- end
- local sound = Sounds[SFX.FreeFalling]
- sound.Volume = 0
- stopPlayingLoopedSoundsExcept()
- end;
- [Enum.HumanoidStateType.FallingDown] = function()
- stopPlayingLoopedSoundsExcept()
- end;
- [Enum.HumanoidStateType.Landed] = function()
- stopPlayingLoopedSoundsExcept()
- if Util.VerticalSpeed(Head) > 75 then
- local landingSound = Sounds[SFX.Landing]
- landingSound.Volume = Util.Clamp(
- Util.YForLineGivenXAndTwoPts(
- Util.VerticalSpeed(Head),
- 50, 0,
- 100, 1),
- 0,1)
- Util.Play(landingSound)
- end
- end
- }
- -- Handle state event fired or OnChange fired
- function stateUpdated(state)
- if stateUpdateHandler[state] ~= nil then
- stateUpdateHandler[state]()
- end
- activeState = state
- end
- Humanoid.Died:connect( function() stateUpdated(Enum.HumanoidStateType.Dead) end)
- Humanoid.Running:connect( function() stateUpdated(Enum.HumanoidStateType.Running) end)
- Humanoid.Swimming:connect( function() stateUpdated(Enum.HumanoidStateType.Swimming) end)
- Humanoid.Climbing:connect( function() stateUpdated(Enum.HumanoidStateType.Climbing) end)
- Humanoid.Jumping:connect( function() stateUpdated(Enum.HumanoidStateType.Jumping) end)
- Humanoid.GettingUp:connect( function() stateUpdated(Enum.HumanoidStateType.GettingUp) end)
- Humanoid.FreeFalling:connect( function() stateUpdated(Enum.HumanoidStateType.Freefall) end)
- Humanoid.FallingDown:connect( function() stateUpdated(Enum.HumanoidStateType.FallingDown) end)
- -- required for proper handling of Landed event
- Humanoid.StateChanged:connect(function(old, new)
- stateUpdated(new)
- end)
- function onUpdate(stepDeltaSeconds, tickSpeedSeconds)
- local stepScale = stepDeltaSeconds / tickSpeedSeconds
- do
- local sound = Sounds[SFX.FreeFalling]
- if activeState == Enum.HumanoidStateType.Freefall then
- if Head.Velocity.Y < 0 and Util.VerticalSpeed(Head) > 75 then
- Util.Resume(sound)
- --Volume takes 1.1 seconds to go from volume 0 to 1
- local ANIMATION_LENGTH_SECONDS = 1.1
- local normalizedIncrement = tickSpeedSeconds / ANIMATION_LENGTH_SECONDS
- sound.Volume = Util.Clamp(sound.Volume + normalizedIncrement * stepScale, 0, 1)
- else
- sound.Volume = 0
- end
- else
- Util.Pause(sound)
- end
- end
- do
- local sound = Sounds[SFX.Running]
- if activeState == Enum.HumanoidStateType.Running then
- if Util.HorizontalSpeed(Head) < 0.5 then
- Util.Pause(sound)
- end
- end
- end
- end
- local lastTick = tick()
- local TICK_SPEED_SECONDS = 0.25
- while true do
- onUpdate(tick() - lastTick,TICK_SPEED_SECONDS)
- lastTick = tick()
- wait(TICK_SPEED_SECONDS)
- end
- end
- end;
- function() local p=game.Players.LocalPlayer;
- local gui=p.PlayerGui;
- local mouse=p:GetMouse();
- local bin=script.Parent;
- local m=Instance.new("Message",gui);
- local orignalC0=CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- local orignalC01=CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- local orignalC02=CFrame.new(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- wait(3)
- m:remove()
- mouse.Move:connect(function ()--Don't change anything unless you are a very good coder.
- local Direction = mouse.Hit.p;
- local b = bin.Head.Position.Y-Direction.Y;
- local dist = (bin.Head.Position-Direction).magnitude;
- local answer = math.asin(b/dist);
- bin.Torso["Neck"].C0=orignalC0*CFrame.fromEulerAnglesXYZ(answer,0,0);
- end);
- end;
- function() local character = script.Parent
- function recurse(root,callback,i)
- i= i or 0
- for _,v in pairs(root:GetChildren()) do
- i = i + 1
- callback(i,v)
- if #v:GetChildren() > 0 then
- i = recurse(v,callback,i)
- end
- end
- return i
- end
- function ragdollJoint(part0, part1, attachmentName, className, properties)
- attachmentName = attachmentName.."RigAttachment"
- local constraint = Instance.new(className.."Constraint")
- constraint.Attachment0 = part0:FindFirstChild(attachmentName)
- constraint.Attachment1 = part1:FindFirstChild(attachmentName)
- constraint.Name = "RagdollConstraint"..part1.Name
- for _,propertyData in next,properties or {} do
- constraint[propertyData[1]] = propertyData[2]
- end
- constraint.Parent = character
- end
- function getAttachment0(attachmentName)
- for _,child in next,character:GetChildren() do
- local attachment = child:FindFirstChild(attachmentName)
- if attachment then
- return attachment
- end
- end
- end
- character:WaitForChild("Humanoid").Died:connect(function()
- local camera = workspace.CurrentCamera
- if camera.CameraSubject == character.Humanoid then--If developer isn't controlling camera
- camera.CameraSubject = character.UpperTorso
- end
- --Make it so ragdoll can't collide with invisible HRP, but don't let HRP fall through map and be destroyed in process
- character.HumanoidRootPart.Anchored = true
- character.HumanoidRootPart.CanCollide = false
- --Helps to fix constraint spasms
- recurse(character, function(_,v)
- if v:IsA("Attachment") then
- v.Axis = Vector3.new(0, 1, 0)
- v.SecondaryAxis = Vector3.new(0, 0, 1)
- v.Rotation = Vector3.new(0, 0, 0)
- end
- end)
- --Re-attach hats
- for _,child in next,character:GetChildren() do
- if child:IsA("Accoutrement") then
- --Loop through all parts instead of only checking for one to be forwards-compatible in the event
- --ROBLOX implements multi-part accessories
- for _,part in next,child:GetChildren() do
- if part:IsA("BasePart") then
- local attachment1 = part:FindFirstChildOfClass("Attachment")
- local attachment0 = getAttachment0(attachment1.Name)
- if attachment0 and attachment1 then
- --Shouldn't use constraints for this, but have to because of a ROBLOX idiosyncrasy where
- --joints connecting a character are perpetually deleted while the character is dead
- local constraint = Instance.new("HingeConstraint")
- constraint.Attachment0 = attachment0
- constraint.Attachment1 = attachment1
- constraint.LimitsEnabled = true
- constraint.UpperAngle = 0 --Simulate weld by making it difficult for constraint to move
- constraint.LowerAngle = 0
- constraint.Parent = character
- end
- end
- end
- end
- end
- ragdollJoint(character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", {
- {"LimitsEnabled",true};
- {"UpperAngle",5};
- })
- ragdollJoint(character.UpperTorso, character.Head, "Neck", "BallSocket", {
- {"LimitsEnabled",true};
- {"UpperAngle",15};
- })
- local handProperties = {
- {"LimitsEnabled", true};
- {"UpperAngle",0};
- {"LowerAngle",0};
- }
- ragdollJoint(character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties)
- ragdollJoint(character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties)
- local shinProperties = {
- {"LimitsEnabled", true};
- {"UpperAngle", 0};
- {"LowerAngle", -75};
- }
- ragdollJoint(character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
- ragdollJoint(character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties)
- local footProperties = {
- {"LimitsEnabled", true};
- {"UpperAngle", 15};
- {"LowerAngle", -45};
- }
- ragdollJoint(character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties)
- ragdollJoint(character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties)
- --TODO fix ability for socket to turn backwards whenn ConeConstraints are shipped
- ragdollJoint(character.UpperTorso, character.LeftUpperArm, "LeftShoulder", "BallSocket")
- ragdollJoint(character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "BallSocket")
- ragdollJoint(character.UpperTorso, character.RightUpperArm, "RightShoulder", "BallSocket")
- ragdollJoint(character.RightUpperArm, character.RightLowerArm, "RightElbow", "BallSocket")
- ragdollJoint(character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket")
- ragdollJoint(character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket")
- end) end;
- function() function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then return child end
- while true do
- child = parent.ChildAdded:wait()
- if child.Name==childName then return child end
- end
- end
- local Figure = script.Parent
- local Humanoid = waitForChild(Figure, "Humanoid")
- local pose = "Standing"
- local currentAnim = ""
- local currentAnimInstance = nil
- local currentAnimTrack = nil
- local currentAnimKeyframeHandler = nil
- local currentAnimSpeed = 1.0
- local runAnimTrack = nil
- local runAnimKeyframeHandler = nil
- local animTable = {}
- local animNames = {
- idle = {
- { id = "http://www.roblox.com/asset/?id=507766666", weight = 1 },
- { id = "http://www.roblox.com/asset/?id=507766951", weight = 1 },
- { id = "http://www.roblox.com/asset/?id=507766388", weight = 9 }
- },
- walk = {
- { id = "http://www.roblox.com/asset/?id=507777826", weight = 10 }
- },
- run = {
- { id = "http://www.roblox.com/asset/?id=507767714", weight = 10 }
- },
- swim = {
- { id = "http://www.roblox.com/asset/?id=507784897", weight = 10 }
- },
- swimidle = {
- { id = "http://www.roblox.com/asset/?id=507785072", weight = 10 }
- },
- jump = {
- { id = "http://www.roblox.com/asset/?id=507765000", weight = 10 }
- },
- fall = {
- { id = "http://www.roblox.com/asset/?id=507767968", weight = 10 }
- },
- climb = {
- { id = "http://www.roblox.com/asset/?id=507765644", weight = 10 }
- },
- sit = {
- { id = "http://www.roblox.com/asset/?id=507768133", weight = 10 }
- },
- toolnone = {
- { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
- },
- toolslash = {
- { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
- -- { id = "slash.xml", weight = 10 }
- },
- toollunge = {
- { id = "http://www.roblox.com/asset/?id=507768375", weight = 10 }
- },
- wave = {
- { id = "http://www.roblox.com/asset/?id=507770239", weight = 10 }
- },
- point = {
- { id = "http://www.roblox.com/asset/?id=507770453", weight = 10 }
- },
- dance = {
- { id = "http://www.roblox.com/asset/?id=507771019", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507771955", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507772104", weight = 10 }
- },
- dance2 = {
- { id = "http://www.roblox.com/asset/?id=507776043", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507776720", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507776879", weight = 10 }
- },
- dance3 = {
- { id = "http://www.roblox.com/asset/?id=507777268", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507777451", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=507777623", weight = 10 }
- },
- laugh = {
- { id = "http://www.roblox.com/asset/?id=507770818", weight = 10 }
- },
- cheer = {
- { id = "http://www.roblox.com/asset/?id=507770677", weight = 10 }
- },
- }
- -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
- local emoteNames = { wave = false, point = false, dance = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
- math.randomseed(tick())
- function configureAnimationSet(name, fileList)
- if (animTable[name] ~= nil) then
- for _, connection in pairs(animTable[name].connections) do
- connection:disconnect()
- end
- end
- animTable[name] = {}
- animTable[name].count = 0
- animTable[name].totalWeight = 0
- animTable[name].connections = {}
- local allowCustomAnimations = true
- local AllowDisableCustomAnimsUserFlag = true
- local success, msg = pcall(function()
- AllowDisableCustomAnimsUserFlag = UserSettings():IsUserFeatureEnabled("UserAllowDisableCustomAnims")
- end)
- if (AllowDisableCustomAnimsUserFlag) then
- local ps = game:GetService("StarterPlayer"):FindFirstChild("PlayerSettings")
- if (ps ~= nil) then
- allowCustomAnimations = not require(ps).UseDefaultAnimations
- end
- end
- -- check for config values
- local config = script:FindFirstChild(name)
- if (allowCustomAnimations and config ~= nil) then
- table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
- table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
- local idx = 1
- for _, childPart in pairs(config:GetChildren()) do
- if (childPart:IsA("Animation")) then
- table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
- animTable[name][idx] = {}
- animTable[name][idx].anim = childPart
- local weightObject = childPart:FindFirstChild("Weight")
- if (weightObject == nil) then
- animTable[name][idx].weight = 1
- else
- animTable[name][idx].weight = weightObject.Value
- end
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
- -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
- idx = idx + 1
- end
- end
- end
- -- fallback to defaults
- if (animTable[name].count <= 0) then
- for idx, anim in pairs(fileList) do
- animTable[name][idx] = {}
- animTable[name][idx].anim = Instance.new("Animation")
- animTable[name][idx].anim.Name = name
- animTable[name][idx].anim.AnimationId = anim.id
- animTable[name][idx].weight = anim.weight
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
- -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
- end
- end
- end
- -- Setup animation objects
- function scriptChildModified(child)
- local fileList = animNames[child.Name]
- if (fileList ~= nil) then
- configureAnimationSet(child.Name, fileList)
- end
- end
- script.ChildAdded:connect(scriptChildModified)
- script.ChildRemoved:connect(scriptChildModified)
- for name, fileList in pairs(animNames) do
- configureAnimationSet(name, fileList)
- end
- -- ANIMATION
- -- declarations
- local toolAnim = "None"
- local toolAnimTime = 0
- local jumpAnimTime = 0
- local jumpAnimDuration = 0.31
- local toolTransitionTime = 0.1
- local fallTransitionTime = 0.2
- -- functions
- function stopAllAnimations()
- local oldAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
- oldAnim = "idle"
- end
- currentAnim = ""
- currentAnimInstance = nil
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop()
- currentAnimTrack:Destroy()
- currentAnimTrack = nil
- end
- -- clean up walk if there is one
- if (runAnimKeyframeHandler ~= nil) then
- runAnimKeyframeHandler:disconnect()
- end
- if (runAnimTrack ~= nil) then
- runAnimTrack:Stop()
- runAnimTrack:Destroy()
- runAnimTrack = nil
- end
- return oldAnim
- end
- local smallButNotZero = 0.0001
- function setRunSpeed(speed)
- if speed < 0.33 then
- currentAnimTrack:AdjustWeight(1.0)
- runAnimTrack:AdjustWeight(smallButNotZero)
- elseif speed < 0.66 then
- local weight = ((speed - 0.33) / 0.33)
- currentAnimTrack:AdjustWeight(1.0 - weight + smallButNotZero)
- runAnimTrack:AdjustWeight(weight + smallButNotZero)
- else
- currentAnimTrack:AdjustWeight(smallButNotZero)
- runAnimTrack:AdjustWeight(1.0)
- end
- local speedScaled = speed * 1.25
- runAnimTrack:AdjustSpeed(speedScaled)
- currentAnimTrack:AdjustSpeed(speedScaled)
- end
- function setAnimationSpeed(speed)
- if speed ~= currentAnimSpeed then
- currentAnimSpeed = speed
- if currentAnim == "walk" then
- setRunSpeed(speed)
- else
- currentAnimTrack:AdjustSpeed(currentAnimSpeed)
- end
- end
- end
- function keyFrameReachedFunc(frameName)
- -- print("CurrentAnim ", currentAnim, " ", frameName)
- if (frameName == "End") then
- if currentAnim == "walk" then
- runAnimTrack.TimePosition = 0.0
- currentAnimTrack.TimePosition = 0.0
- else
- -- print("Keyframe : ".. frameName)
- local repeatAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
- repeatAnim = "idle"
- end
- local animSpeed = currentAnimSpeed
- playAnimation(repeatAnim, 0.15, Humanoid)
- setAnimationSpeed(animSpeed)
- end
- end
- end
- function rollAnimation(animName)
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- return idx
- end
- function playAnimation(animName, transitionTime, humanoid)
- local idx = rollAnimation(animName)
- -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- -- switch animation
- if (anim ~= currentAnimInstance) then
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop(transitionTime)
- currentAnimTrack:Destroy()
- end
- if (runAnimTrack ~= nil) then
- runAnimTrack:Stop(transitionTime)
- runAnimTrack:Destroy()
- end
- currentAnimSpeed = 1.0
- -- load it to the humanoid; get AnimationTrack
- currentAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- currentAnimTrack:Play(transitionTime)
- currentAnim = animName
- currentAnimInstance = anim
- -- set up keyframe name triggers
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
- -- check to see if we need to blend a walk/run animation
- if animName == "walk" then
- local runAnimName = "run"
- local runIdx = rollAnimation(runAnimName)
- runAnimTrack = humanoid:LoadAnimation(animTable[runAnimName][runIdx].anim)
- runAnimTrack:Play(transitionTime)
- if (runAnimKeyframeHandler ~= nil) then
- runAnimKeyframeHandler:disconnect()
- end
- runAnimKeyframeHandler = runAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
- end
- end
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- local toolAnimName = ""
- local toolAnimTrack = nil
- local toolAnimInstance = nil
- local currentToolAnimKeyframeHandler = nil
- function toolKeyFrameReachedFunc(frameName)
- if (frameName == "End") then
- -- print("Keyframe : ".. frameName)
- playToolAnimation(toolAnimName, 0.0, Humanoid)
- end
- end
- function playToolAnimation(animName, transitionTime, humanoid)
- local idx = rollAnimation(animName)
- -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- if (toolAnimInstance ~= anim) then
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- transitionTime = 0
- end
- -- load it to the humanoid; get AnimationTrack
- toolAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- toolAnimTrack:Play(transitionTime)
- toolAnimName = animName
- toolAnimInstance = anim
- currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
- end
- end
- function stopToolAnimations()
- local oldAnim = toolAnimName
- if (currentToolAnimKeyframeHandler ~= nil) then
- currentToolAnimKeyframeHandler:disconnect()
- end
- toolAnimName = ""
- toolAnimInstance = nil
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- toolAnimTrack = nil
- end
- return oldAnim
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- function onRunning(speed)
- if speed > 0.01 then
- local scale = 16.0
- playAnimation("walk", 0.1, Humanoid)
- setAnimationSpeed(speed / scale)
- pose = "Running"
- else
- if emoteNames[currentAnim] == nil then
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- end
- end
- end
- function onDied()
- pose = "Dead"
- end
- function onJumping()
- playAnimation("jump", 0.1, Humanoid)
- jumpAnimTime = jumpAnimDuration
- pose = "Jumping"
- end
- function onClimbing(speed)
- local scale = 5.0
- playAnimation("climb", 0.1, Humanoid)
- setAnimationSpeed(speed / scale)
- pose = "Climbing"
- end
- function onGettingUp()
- pose = "GettingUp"
- end
- function onFreeFall()
- if (jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- end
- pose = "FreeFall"
- end
- function onFallingDown()
- pose = "FallingDown"
- end
- function onSeated()
- pose = "Seated"
- end
- function onPlatformStanding()
- pose = "PlatformStanding"
- end
- function onSwimming(speed)
- if speed > 1.00 then
- local scale = 10.0
- playAnimation("swim", 0.4, Humanoid)
- setAnimationSpeed(speed / scale)
- pose = "Swimming"
- else
- playAnimation("swimidle", 0.4, Humanoid)
- pose = "Standing"
- end
- end
- function getTool()
- for _, kid in ipairs(Figure:GetChildren()) do
- if kid.className == "Tool" then return kid end
- end
- return nil
- end
- function animateTool()
- if (toolAnim == "None") then
- playToolAnimation("toolnone", toolTransitionTime, Humanoid)
- return
- end
- if (toolAnim == "Slash") then
- playToolAnimation("toolslash", 0, Humanoid)
- return
- end
- if (toolAnim == "Lunge") then
- playToolAnimation("toollunge", 0, Humanoid)
- return
- end
- end
- function getToolAnim(tool)
- for _, c in ipairs(tool:GetChildren()) do
- if c.Name == "toolanim" and c.className == "StringValue" then
- return c
- end
- end
- return nil
- end
- local lastTick = 0
- function move(time)
- local amplitude = 1
- local frequency = 1
- local deltaTime = time - lastTick
- lastTick = time
- local climbFudge = 0
- local setAngles = false
- if (jumpAnimTime > 0) then
- jumpAnimTime = jumpAnimTime - deltaTime
- end
- if (pose == "FreeFall" and jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- elseif (pose == "Seated") then
- playAnimation("sit", 0.5, Humanoid)
- return
- elseif (pose == "Running") then
- playAnimation("walk", 0.1, Humanoid)
- elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
- stopAllAnimations()
- amplitude = 0.1
- frequency = 1
- setAngles = true
- end
- -- Tool Animation handling
- local tool = getTool()
- if tool and (tool.RequiresHandle or tool:FindFirstChild("Handle")) then
- local animStringValueObject = getToolAnim(tool)
- if animStringValueObject then
- toolAnim = animStringValueObject.Value
- -- message recieved, delete StringValue
- animStringValueObject.Parent = nil
- toolAnimTime = time + .3
- end
- if time > toolAnimTime then
- toolAnimTime = 0
- toolAnim = "None"
- end
- animateTool()
- else
- stopToolAnimations()
- toolAnim = "None"
- toolAnimInstance = nil
- toolAnimTime = 0
- end
- end
- -- connect events
- Humanoid.Died:connect(onDied)
- Humanoid.Running:connect(onRunning)
- Humanoid.Jumping:connect(onJumping)
- Humanoid.Climbing:connect(onClimbing)
- Humanoid.GettingUp:connect(onGettingUp)
- Humanoid.FreeFalling:connect(onFreeFall)
- Humanoid.FallingDown:connect(onFallingDown)
- Humanoid.Seated:connect(onSeated)
- Humanoid.PlatformStanding:connect(onPlatformStanding)
- Humanoid.Swimming:connect(onSwimming)
- -- setup emote chat hook
- Game.Players.LocalPlayer.Chatted:connect(function(msg)
- local emote = ""
- if (string.sub(msg, 1, 3) == "/e ") then
- emote = string.sub(msg, 4)
- elseif (string.sub(msg, 1, 7) == "/emote ") then
- emote = string.sub(msg, 8)
- end
- if (pose == "Standing" and emoteNames[emote] ~= nil) then
- playAnimation(emote, 0.1, Humanoid)
- end
- -- print("===> " .. string.sub(msg, 1, 3) .. "(" .. emote .. ")")
- end)
- -- initialize to idle
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- -- loop to handle timed state transitions and tool animations
- while Figure.Parent~=nil do
- local _, time = wait(0.1)
- move(time)
- end
- end;}local ActualScripts = {}
- function s(var)
- local func = table.remove(Scripts,1)
- setfenv(func,setmetatable({script=var,require=fake_require or require,global=genv},{
- __index = getfenv(func),
- }))
- table.insert(ActualScripts,coroutine.wrap(func))
- end
- Decode = function(str,t,props,classes,values,ICList,Model,CurPar,LastIns,split,RemoveAndSplit,InstanceList)
- local tonum,table_remove,inst,parnt,comma,table_foreach = tonumber,table.remove,Instance.new,"Parent",",",
- function(t,f)
- for a,b in pairs(t) do
- f(a,b)
- end
- end
- local Types = {
- Color3 = Color3.new,
- Vector3 = Vector3.new,
- Vector2 = Vector2.new,
- UDim = UDim.new,
- UDim2 = UDim2.new,
- CFrame = CFrame.new,
- Rect = Rect.new,
- NumberRange = NumberRange.new,
- BrickColor = BrickColor.new,
- PhysicalProperties = PhysicalProperties.new,
- NumberSequence = function(...)
- local a = {...}
- local t = {}
- repeat
- t[#t+1] = NumberSequenceKeypoint.new(table_remove(a,1),table_remove(a,1),table_remove(a,1))
- until #a==0
- return NumberSequence.new(t)
- end,
- ColorSequence = function(...)
- local a = {...}
- local t = {}
- repeat
- t[#t+1] = ColorSequenceKeypoint.new(table_remove(a,1),Color3.new(table_remove(a,1),table_remove(a,1),table_remove(a,1)))
- until #a==0
- return ColorSequence.new(t)
- end,
- number = tonumber,
- boolean = function(a)
- return a=="1"
- end
- }
- split = function(str,sep)
- if not str then return end
- local fields = {}
- local ConcatNext = false
- str:gsub(("([^%s]+)"):format(sep),function(c)
- if ConcatNext == true then
- fields[#fields] = fields[#fields]..sep..c
- ConcatNext = false
- else
- fields[#fields+1] = c
- end
- if c:sub(#c)=="\\" then
- c = fields[#fields]
- fields[#fields] = c:sub(1,#c-1)
- ConcatNext = true
- end
- end)
- return fields
- end
- RemoveAndSplit = function(t)
- return split(table_remove(t,1),comma)
- end
- t = split(str,";")
- props = RemoveAndSplit(t)
- classes = RemoveAndSplit(t)
- values = split(table_remove(t,1),'|')
- ICList = RemoveAndSplit(t)
- InstanceList = {}
- Model = inst"Model"
- CurPar = Model
- table_foreach(t,function(ct,c)
- if c=="n" or c=="p" then
- CurPar = c=="n" and LastIns or CurPar[parnt]
- else
- ct = split(c,"|")
- local class = classes[tonum(table_remove(ct,1))]
- if class=="UnionOperation" then
- LastIns = {UsePartColor="1"}
- else
- LastIns = inst(class)
- if LastIns:IsA"Script" then
- s(LastIns)
- elseif LastIns:IsA("ModuleScript") then
- ms(LastIns)
- end
- end
- local function SetProperty(LastIns,p,str,s)
- s = Types[typeof(LastIns[p])]
- if p=="CustomPhysicalProperties" then
- s = PhysicalProperties.new
- end
- if s then
- LastIns[p] = s(unpack(split(str,comma)))
- else
- LastIns[p] = str
- end
- end
- local UnionData
- table_foreach(ct,function(s,p,a,str)
- a = p:find":"
- p,str = props[tonum(p:sub(1,a-1))],values[tonum(p:sub(a+1))]
- if p=="UnionData" then
- UnionData = split(str," ")
- return
- end
- if class=="UnionOperation" then
- LastIns[p] = str
- return
- end
- SetProperty(LastIns,p,str)
- end)
- if UnionData then
- local LI_Data = LastIns
- LastIns = DecodeUnion(UnionData)
- table_foreach(LI_Data,function(p,str)
- SetProperty(LastIns,p,str)
- end)
- end
- table.insert(InstanceList,LastIns)
- LastIns[parnt] = CurPar
- end
- end)
- table_remove(ICList,1)
- table_foreach(ICList,function(a,b)
- b = split(b,">")
- InstanceList[tonum(b[1])][props[tonum(b[2])]] = InstanceList[tonum(b[3])]
- end)
- return Model:GetChildren()
- end
- local Objects = Decode('Name,PrimaryPart,Transparency,Position,Orientation,Size,HipHeight,Color,CFrame,Value,Rotation,C0,C1,Part0,Part1,AnimationId,BottomSurface,TopSurface;Part,Model,Attachment,Humanoid,MeshPart,Vector3Valu'
- ..'e,Motor6D,BodyColors,Animation,Script,LocalScript,VehicleSeat,WeldConstraint,StringValue,NumberValue;Part|Moving Anthro [NPC]|HumanoidRootPart|1|70.5681,248.8195,-37.9115|0,-166,0|144.5445,144.5445,72'
- ..'.2722|RootRigAttachment|2.5|Head|0.9921,0.9176,0.5529|71.1704,436.8583,-35.514|50.0541,72.352,67.2319|NeckRigAttachment|-0,-27.7486,-4.1029|-0,-27.7486,-4.1029,1,0,0,0,1,0,0,0,1|OriginalPivot|-0,-0.30'
- ..'72,-0.0455|HatAttachment|0,18.0591,2.4709|-0.0018,-0.0018,-0.0018|0,18.0591,2.4709,1,0,-0.0001,-0.0001,1,0,0,-0.0001,1|0,0.1999,0.0273|HairAttachment|FaceFrontAttachment|0,-17.2447,-25.9863|0,-17.2447'
- ..',-25.9863,1,0,-0.0001,-0.0001,1,0,0,-0.0001,1|0,-0.1909,-0.2877|FaceCenterAttachment|0,-7.4248,2.4709|0,-7.4248,2.4709,1,0,-0.0001,-0.0001,1,0,0,-0.0001,1|0,-0.0822,0.0273|OriginalSize|0.554,0.8008,0.'
- ..'7442|Neck|-0,70.9065,-3.3359,1,0,0,0,1,0,0,0,1|LeftHand|131.2625,203.1425,-32.2351|26.6842,56.1459,30.5923|LeftWristRigAttachment|-7.5269,19.6575,3.0955|-7.5269,19.6575,3.0955,1,0,0,0,1,0,0,0,1|-0.083'
- ..'4,0.2175,0.0342|LeftGripAttachment|2.4105,0.4692,20.1946|-90,-0.0025,0|-90.0019,0,-0.0025|2.4105,0.4692,20.1946,1,0,0,0,-0.0001,1,0,-1,-0.0001|0.0266,0.0051,0.2235|0.2953,0.6214,0.3386|LeftWrist|-1.34'
- ..'42,-36.7066,-12.0161,1,0,0,0,1,0,0,0,1|LeftLowerArm|133.6063,259.5065,-48.3936|25.491,83.017,42.3981|LeftElbowRigAttachment|-1.3442,35.9928,12.2033|-1.3442,35.9928,12.2033,1,0,0,0,1,0,0,0,1|-0.0149,0.'
- ..'3984,0.135|-1.3442,-36.7066,-12.016|-1.3442,-36.7066,-12.016,1,0,0,0,1,0,0,0,1|-0.0149,-0.4064,-0.1331|0.2821,0.9189,0.4693|LeftElbow|-8.3671,-39.2517,3.6164,1,0,0,0,1,0,0,0,1|LeftUpperArm|124.7161,33'
- ..'4.7512,-55.0259|35.7092,97.3768,46.4735|LeftShoulderRigAttachment|11.9595,26.5321,2.6056|11.9595,26.5321,2.6056,1,0,0,0,1,0,0,0,1|0.1323,0.2936,0.0288|-8.3671,-39.2517,3.6164|-0.0927,-0.4345,0.04|Left'
- ..'ShoulderAttachment|7.8942,50.4711,-3.5037|7.8942,50.4711,-3.5037,1,0,0,0,1,0,0,0,1|0.0873,0.5586,-0.0388|0.3952,1.0778,0.5144|LeftShoulder|-44.7185,23.0813,9.3472,1,0,0,0,1,0,0,0,1|RightHand|19.6447,2'
- ..'03.1451,-4.3988|RightWristRigAttachment|7.5268,19.6575,3.0955|7.5268,19.6575,3.0955,1,0,0,0,1,0,0,0,1|0.0833,0.2175,0.0342|RightGripAttachment|-2.4106,0.4692,20.1946|-2.4106,0.4692,20.1946,1,0,0,0,-0.'
- ..'0001,1,0,-1,-0.0001|-0.0267,0.0051,0.2235|RightWrist|1.3441,-36.7065,-12.0161,1,0,0,0,1,0,0,0,1|RightLowerArm|9.9905,259.5094,-17.5651|RightElbowRigAttachment|1.3441,35.9928,12.2033|1.3441,35.9928,12.'
- ..'2033,1,0,0,0,1,0,0,0,1|0.0148,0.3984,0.135|1.3441,-36.7066,-12.016|1.3441,-36.7066,-12.016,1,0,0,0,1,0,0,0,1|0.0148,-0.4064,-0.1331|RightElbow|8.367,-39.2517,3.6164,1,0,0,0,1,0,0,0,1|1.3441,35.9929,12'
- ..'.2033,1,0,0,0,1,0,0,0,1|RightUpperArm|14.7287,334.7538,-27.5962|RightShoulderRigAttachment|-11.9596,26.5321,2.6056|-11.9596,26.5321,2.6056,1,0,0,0,1,0,0,0,1|-0.1324,0.2936,0.0288|8.367,-39.2517,3.6164'
- ..'|0.0926,-0.4345,0.04|RightShoulderAttachment|-7.8943,48.3417,-3.5037|-7.8943,48.3417,-3.5037,1,0,0,0,1,0,0,0,1|-0.0874,0.5351,-0.0388|RightShoulder|44.7184,23.0813,9.3472,1,0,0,0,1,0,0,0,1|UpperTorso|'
- ..'0.1568,0.498,0.2784|71.3537,338.2033,-34.7698|107.5318,161.2501,72.68|WaistRigAttachment|-0,-60.9266,3.2379|-0,-60.9266,3.2379,1,0,0,0,1,0,0,0,1|-0,-0.6745,0.0358|-0,70.9064,-3.3359|-0,70.9064,-3.3359'
- ..',1,0,0,0,1,0,0,0,1|-0,0.7848,-0.037|-44.7185,23.0813,9.3472|-0.4951,0.2554,0.1034|44.7184,23.0813,9.3472|0.495,0.2554,0.1034|BodyFrontAttachment|0,-30.6988,-34.705|0,-30.6988,-34.705,1,0,0,0,1,0,0,0,1'
- ..'|0,-0.3399,-0.3842|BodyBackAttachment|0,-30.6988,23.1128|0,-30.6988,23.1128,1,0,0,0,1,0,0,0,1|0,-0.3399,0.2558|NeckAttachment|0,59.6414,3.2379|0,59.6414,3.2379,1,0,0,0,1,0,0,0,1|0,0.6601,0.0358|RightC'
- ..'ollarAttachment|31.619,49.7041,3.2379|31.619,49.7041,3.2379,1,0,0,0,1,0,0,0,1|0.3499,0.5501,0.0358|LeftCollarAttachment|-31.5781,49.7041,3.2379|-31.5781,49.7041,3.2379,1,0,0,0,1,0,0,0,1|-0.3496,0.5501'
- ..',0.0358|1.1902,1.7849,0.8045|Waist|-0,32.4913,6.5901,1,0,0,0,1,0,0,0,1|-0,-60.9267,3.2379,1,0,0,0,1,0,0,0,1|LeftFoot|0.0509,0.4117,0.6745|94.2327,18.2003,-28.4664|31.3,36.3996,76.9011|LeftAnkleRigAtta'
- ..'chment|-2.4013,0.2189,16.2286|-2.4013,0.2189,16.2286,1,0,0,0,1,0,0,0,1|-0.0266,0.0024,0.1796|0.3464,0.4029,0.8512|LeftAnkle|-1.5069,-65.5639,-1.3092,1,0,0,0,1,0,0,0,1|LeftLowerLeg|90.8584,83.9832,-45.'
- ..'6995|40.9964,131.7814,52.2498|LeftKneeRigAttachment|-1.5068,59.6214,-2.6393|-1.5068,59.6214,-2.6393,1,0,0,0,1,0,0,0,1|-0.0167,0.6599,-0.0293|-1.5069,-65.5638,-1.3092|-1.5069,-65.5638,-1.3092,1,0,0,0,1'
- ..',0,0,0,1|-0.0167,-0.7258,-0.0145|0.4538,1.4587,0.5783|LeftKnee|0.5577,-42.9636,6.7493,1,0,0,0,1,0,0,0,1|LeftUpperLeg|95.1357,186.5682,-37.0894|44.6167,136.6591,57.9861|LeftHipRigAttachment|0.5577,61.1'
- ..'618,-1.3725|0.5577,61.1618,-1.3725,1,0,0,0,1,0,0,0,1|0.0061,0.677,-0.0152|0.5577,-42.9636,6.7493|0.0061,-0.4756,0.0747|0.4938,1.5127,0.6418|LeftHip|-23.0823,2.9452,-1.5251,1,0,0,0,1,0,0,0,1|RightFoot|'
- ..'54.1003,18.2019,-18.4555|RightAnkleRigAttachment|2.4461,0.1597,16.2286|2.4461,0.1597,16.2286,1,0,0,0,1,0,0,0,1|0.027,0.0017,0.1796|RightAnkle|1.5516,-65.6224,-1.3093,1,0,0,0,1,0,0,0,1|RightLowerLeg|48'
- ..'.9903,83.9842,-35.2557|40.9964,131.7814,52.25|RightKneeRigAttachment|1.5516,59.5892,-2.6372|1.5516,59.5892,-2.6372,1,0,0,0,1,0,0,0,1|0.0171,0.6596,-0.0292|1.5516,-65.6224,-1.3093|0.0171,-0.7264,-0.014'
- ..'5|RightKnee|-0.5129,-42.9959,6.7496,1,0,0,0,1,0,0,0,1|1.5516,59.5893,-2.6372,1,0,0,0,1,0,0,0,1|RightUpperLeg|49.2609,186.5693,-25.6482|44.6167,136.6591,57.9857|RightHipRigAttachment|-0.5129,61.1665,-1'
- ..'.372|-0.5129,61.1665,-1.372,1,0,0,0,1,0,0,0,1|-0.0057,0.677,-0.0152|-0.5129,-42.9958,6.7496|-0.5129,-42.9958,6.7496,1,0,0,0,1,0,0,0,1|-0.0057,-0.476,0.0747|RightHip|23.1271,2.95,-1.5251,1,0,0,0,1,0,0,'
- ..'0,1|LowerTorso|72.1627,244.7853,-31.5172|86.558,62.7321,65.2151|-0,4.0341,6.5901|-0,4.0341,6.5901,1,0,0,0,1,0,0,0,1|-0,0.0446,0.0729|-0,32.4913,6.5901|-0,0.3596,0.0729|-23.0822,2.9452,-1.5251|-23.0822'
- ..',2.9452,-1.5251,1,0,0,0,1,0,0,0,1|-0.2556,0.0326,-0.0169|23.1271,2.95,-1.5251|0.256,0.0326,-0.0169|WaistCenterAttachment|-0.0001,-7.3542,6.5901|-0.0001,-7.3542,6.5901,1,0,0,0,1,0,0,0,1|-0.0001,-0.0815'
- ..',0.0729|WaistFrontAttachment|-0.0001,-7.3542,-15.9949|-0.0001,-7.3542,-15.9949,1,0,0,0,1,0,0,0,1|-0.0001,-0.0815,-0.1771|WaistBackAttachment|-0.0001,-7.3542,32.3702|-0.0001,-7.3542,32.3702,1,0,0,0,1,0'
- ..',0,0,1|-0.0001,-0.0815,0.3583|0.9581,0.6943,0.7218|Root|rbxassetid://774242142|Sound|LocalSound|Main|RagdollClient|0.1058,0.1647,0.2078|107.2033,381.6675,-40.5527|18.26,14.3,-12.28|70.84,0.05,1.9199|0'
- ..'|107.4191,381.1385,-38.7137|27.04,12.1599,-13.1001|70.4499,0.05,2.0004|65.9397,332.1937,-63.6299|-0.01,-168,-0.01|70.5108,0.0505,44.0599|32.9839,383.1021,-26.0527|-10.1801,-171.87,-9.8501|33.9904,385.'
- ..'0487,-31.7216|-14.5501,-167.17,-13.44|106.5726,380.6072,-36.8593|27.03,12.1599,-13.1001|35.3106,385.7845,-39.4023|14.0399,-175.8501,-13.48|67.3012,394.8686,-57.3097|70.4724,0.0501,49.6399|32.9805,381.'
- ..'9543,-24.1871|-30.8,-167.78,-11.3001|107.3265,384.6706,-58.0714|6.2399,15.84,-17.74|32.0539,380.8783,-22.6178|35.1628,385.1494,-43.6291|3.3699,-173.3001,-13.0901|67.685,282.6068,-55.4578|70.5417,0.050'
- ..'8,60.7999|64.974,346.6873,-68.238|70.4969,0.0502,34.6399|64.8099,364.0876,-68.9705|70.4831,0.05,33.13|107.2386,384.543,-48.0758|20.2099,13.84,-12.4301|106.8715,382.3578,-42.5158|28,11.8999,-13.2101|66'
- ..'.1121,382.7395,-62.8508|70.471,0.05,45.6399|35.2432,385.3001,-41.5363|13.0699,-175.6101,-13.4201|106.8911,382.4762,-63.6904|-22.2901,25.3199,-19.1101|33.1528,384.3456,-29.9154|-14.54,-167.17,-13.44|10'
- ..'7.7539,385.2472,-50.1423|10.93,17.86,-20.2901|107.4178,383.2937,-62.0259|-13.7701,22.2999,-18.1701|35.1825,385.11,-45.5587|12.1099,-175.37,-13.37|106.905,384.0631,-60.1306|107.2881,385.2279,-52.0148|2'
- ..'.47,20.9799,-19.9301|107.7776,384.8883,-54.0403|67.6843,299.0351,-55.458|67.0579,315.1144,-58.4162|70.5264,0.0507,54.7399|107.8435,384.7735,-56.0367|-3.27,18.87,-17.6701|32.797,383.7889,-28.0321|-19.9'
- ..'8,-170.06,-10.32|32.1757,379.595,-21.1757|-39.5901,-165.5,-12.62|36.3466,384.6984,-49.2676|20.8299,-177.5801,-14|34.2167,385.9264,-37.6044|107.433,383.9523,-46.2524|28.9799,11.64,-13.3401|106.5621,383'
- ..'.3715,-44.4211|28.9699,11.64,-13.3401|36.2587,385.0256,-47.3705|12.1,-175.37,-13.37|106.7,379.8057,-35.1145|35.77,9.6599,-14.4|33.8242,385.602,-33.564|-5.8001,-169.26,-13.0601|34.185,386.0303,-35.6816'
- ..'|5.3099,-173.75,-13.1301|Animate|climb|ClimbAnim|http://www.roblox.com/asset/?id=0000000|fall|FallAnim|http://www.roblox.com/asset/?id=387948187|idle|Animation1|rbxassetid://845400520|Weight|Animation'
- ..'2|rbxassetid://1132477671|jump|JumpAnim|http://www.roblox.com/asset/?id=387946624|run|RunAnim|http://www.roblox.com/asset/?id=387947975|sit|SitAnim|http://www.roblox.com/asset/?id=178130996|toolnone|T'
- ..'oolNoneAnim|walk|WalkAnim|http://www.roblox.com/asset/?id=382460631|34.5602,418.8544,-28.3757|0,-76,0|23.86,0.05,20.9299|107.3112,418.8522,-53.7755|0,104,0|24.5599,0.05,22.94|125.8455,383.4642,-55.5|2'
- ..'4.5599,0.05,8.27|13.1046,383.4676,-26.4866|23.86,0.05,9.3599|29.4843,418.8546,-43.254|23.86,0.05,3.8699|104.1733,418.8529,-68.5499|71.2572,473.0589,-35.0982|50.8799,0.05,66.43;0,1>2>123,17>14>64,17>15'
- ..'>5,24>14>25,24>15>18,31>14>32,31>15>25,40>14>64,40>15>32,47>14>48,47>15>41,54>14>55,54>15>48,63>14>64,63>15>55,84>14>123,84>15>64,89>14>90,89>15>85,96>14>97,96>15>90,103>14>123,103>15>97,108>14>109,10'
- ..'8>15>104,115>14>116,115>15>109,122>14>123,122>15>116,139>14>2,139>15>123,147>14>146,147>15>64,149>14>148,149>15>64,151>14>150,151>15>64,153>14>152,153>15>64,155>14>154,155>15>64,157>14>156,157>15>64,1'
- ..'59>14>158,159>15>64,161>14>160,161>15>64,163>14>162,163>15>64,165>14>164,165>15>64,167>14>166,167>15>64,169>14>168,169>15>64,171>14>170,171>15>64,173>14>172,173>15>64,175>14>174,175>15>64,177>14>176,1'
- ..'77>15>64,179>14>178,179>15>64,181>14>180,181>15>64,183>14>182,183>15>64,185>14>184,185>15>64,187>14>186,187>15>64,189>14>188,189>15>64,191>14>190,191>15>64,193>14>192,193>15>64,195>14>194,195>15>64,19'
- ..'7>14>196,197>15>64,199>14>198,199>15>64,201>14>200,201>15>64,203>14>202,203>15>64,205>14>204,205>15>64,207>14>206,207>15>64,209>14>208,209>15>64,211>14>210,211>15>64,213>14>212,213>15>64,215>14>214,21'
- ..'5>15>64,217>14>216,217>15>64,219>14>218,219>15>64,221>14>220,221>15>64,223>14>222,223>15>64,225>14>224,225>15>64,247>14>246,247>15>64,249>14>248,249>15>64,251>14>250,251>15>32,253>14>252,253>15>55,255'
- ..'>14>254,255>15>64,257>14>256,257>15>64,259>14>258,259>15>5;2|1:2;n;1|1:3|3:4|4:5|5:6|6:7;n;3|1:8;p;4|7:9;n;p;5|1:10|8:11|4:12|5:6|6:13|8:11|8:11;n;3|1:14|4:15|9:16;n;6|1:17|10:18;p;3|1:19|4:20|5:21|11'
- ..':21|9:22;n;6|1:17|10:23;p;3|1:24|4:20|5:21|11:21|9:22;n;6|1:17|10:23;p;3|1:25|4:26|5:21|11:21|9:27;n;6|1:17|10:28;p;3|1:29|4:30|5:21|11:21|9:31;n;6|1:17|10:32;p;6|1:33|10:34;7|1:35|12:36|13:16;p;5|1:3'
- ..'7|8:11|4:38|5:6|6:39|8:11|8:11;n;3|1:40|4:41|9:42;n;6|1:17|10:43;p;3|1:44|4:45|5:46|11:47|9:48;n;6|1:17|10:49;p;6|1:33|10:50;7|1:51|12:52|13:42;p;5|1:53|8:11|4:54|5:6|6:55|8:11|8:11;n;3|1:56|4:57|9:58'
- ..';n;6|1:17|10:59;p;3|1:40|4:60|9:61;n;6|1:17|10:62;p;6|1:33|10:63;7|1:64|12:65|13:58;p;5|1:66|8:11|4:67|5:6|6:68|8:11|8:11;n;3|1:69|4:70|9:71;n;6|1:17|10:72;p;3|1:56|4:73|9:65;n;6|1:17|10:74;p;3|1:75|4'
- ..':76|9:77;n;6|1:17|10:78;p;6|1:33|10:79;7|1:80|12:81|13:71;p;5|1:82|8:11|4:83|5:6|6:39|8:11|8:11;n;3|1:84|4:85|9:86;n;6|1:17|10:87;p;3|1:88|4:89|5:46|11:47|9:90;n;6|1:17|10:91;p;6|1:33|10:50;7|1:92|12:'
- ..'93|13:86;p;5|1:94|8:11|4:95|5:6|6:55|8:11|8:11;n;3|1:96|4:97|9:98;n;6|1:17|10:99;p;3|1:84|4:100|9:101;n;6|1:17|10:102;p;6|1:33|10:63;7|1:103|12:104|13:105;p;5|1:106|8:11|4:107|5:6|6:68|8:11|8:11;n;3|1'
- ..':108|4:109|9:110;n;6|1:17|10:111;p;3|1:96|4:112|9:104;n;6|1:17|10:113;p;3|1:114|4:115|9:116;n;6|1:17|10:117;p;6|1:33|10:79;7|1:118|12:119|13:110;p;5|1:120|8:121|4:122|5:6|6:123|8:121|8:121;n;3|1:124|4'
- ..':125|9:126;n;6|1:17|10:127;p;3|1:14|4:128|9:129;n;6|1:17|10:130;p;3|1:69|4:131|9:81;n;6|1:17|10:132;p;3|1:108|4:133|9:119;n;6|1:17|10:134;p;3|1:135|4:136|9:137;n;6|1:17|10:138;p;3|1:139|4:140|9:141;n;'
- ..'6|1:17|10:142;p;3|1:143|4:144|9:145;n;6|1:17|10:146;p;3|1:147|4:148|9:149;n;6|1:17|10:150;p;3|1:151|4:152|9:153;n;6|1:17|10:154;p;6|1:33|10:155;7|1:156|12:157|13:158;p;5|1:159|8:160|4:161|5:6|6:162|8:'
- ..'160|8:160;n;3|1:163|4:164|9:165;n;6|1:17|10:166;p;6|1:33|10:167;7|1:168|12:169|13:165;p;5|1:170|8:160|4:171|5:6|6:172|8:160|8:160;n;3|1:173|4:174|9:175;n;6|1:17|10:176;p;3|1:163|4:177|9:178;n;6|1:17|1'
- ..'0:179;p;6|1:33|10:180;7|1:181|12:182|13:175;p;5|1:183|8:160|4:184|5:6|6:185|8:160|8:160;n;3|1:186|4:187|9:188;n;6|1:17|10:189;p;3|1:173|4:190|9:182;n;6|1:17|10:191;p;6|1:33|10:192;7|1:193|12:194|13:18'
- ..'8;p;5|1:195|8:160|4:196|5:6|6:162|8:160|8:160;n;3|1:197|4:198|9:199;n;6|1:17|10:200;p;6|1:33|10:167;7|1:201|12:202|13:199;p;5|1:203|8:160|4:204|5:6|6:205|8:160|8:160;n;3|1:206|4:207|9:208;n;6|1:17|10:'
- ..'209;p;3|1:197|4:210|9:202;n;6|1:17|10:211;p;6|1:33|10:180;7|1:212|12:213|13:214;p;5|1:215|8:160|4:216|5:6|6:217|8:160|8:160;n;3|1:218|4:219|9:220;n;6|1:17|10:221;p;3|1:206|4:222|9:223;n;6|1:17|10:224;'
- ..'p;6|1:33|10:192;7|1:225|12:226|13:220;p;5|1:227|8:121|4:228|5:6|6:229|8:121|8:121;n;3|1:8|4:230|9:231;n;6|1:17|10:232;p;3|1:124|4:233|9:157;n;6|1:17|10:234;p;3|1:186|4:235|9:236;n;6|1:17|10:237;p;3|1:'
- ..'218|4:238|9:226;n;6|1:17|10:239;p;3|1:240|4:241|9:242;n;6|1:17|10:243;p;3|1:244|4:245|9:246;n;6|1:17|10:247;p;3|1:248|4:249|9:250;n;6|1:17|10:251;p;6|1:33|10:252;7|1:253|13:231;p;8;9|16:254;10|1:255;n'
- ..';10|1:256;p;11|1:257;11|1:258;12|8:259|3:4|4:260|5:261|6:262|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:264|5:265|6:266|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:267|5:268|6:269|17:263|18:2'
- ..'63|8:259|8:259;n;13;p;12|8:259|3:4|4:270|5:271|6:266|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:272|5:273|6:262|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:274|5:275|6:262|17:263|18:263|8:259'
- ..'|8:259;n;13;p;12|8:259|3:4|4:276|5:277|6:262|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:278|5:268|6:279|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:280|5:281|6:262|17:263|18:263|8:259|8:259;n'
- ..';13;p;12|8:259|3:4|4:282|5:283|6:266|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:284|5:281|6:266|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:285|5:286|6:262|17:263|18:263|8:259|8:259;n;13;p;12'
- ..'|8:259|3:4|4:287|5:268|6:288|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:289|5:268|6:290|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:291|5:268|6:292|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3'
- ..':4|4:293|5:294|6:262|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:295|5:296|6:266|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:297|5:268|6:298|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:299'
- ..'|5:300|6:266|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:301|5:302|6:262|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:303|5:304|6:266|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:305|5:306|6'
- ..':266|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:307|5:308|6:266|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:309|5:310|6:266|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:311|5:308|6:262|17:'
- ..'263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:312|5:313|6:262|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:314|5:313|6:266|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:315|5:268|6:288|17:263|18:2'
- ..'63|8:259|8:259;n;13;p;12|8:259|3:4|4:316|5:268|6:317|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:318|5:319|6:262|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:320|5:321|6:262|17:263|18:263|8:259'
- ..'|8:259;n;13;p;12|8:259|3:4|4:322|5:323|6:262|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:324|5:325|6:266|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:326|5:277|6:266|17:263|18:263|8:259|8:259;n'
- ..';13;p;12|8:259|3:4|4:327|5:328|6:266|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:329|5:330|6:262|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:331|5:332|6:262|17:263|18:263|8:259|8:259;n;13;p;12'
- ..'|8:259|3:4|4:333|5:334|6:266|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:335|5:336|6:266|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:337|5:338|6:262|17:263|18:263|8:259|8:259;n;13;p;10|1:339;n'
- ..';14|1:340;n;9|1:341|16:342;p;14|1:343;n;9|1:344|16:345;p;14|1:346;n;9|1:347|16:348;n;15|1:349|10:4;p;9|1:350|16:351;n;15|1:349|10:4;p;p;14|1:352;n;9|1:353|16:354;p;14|1:355;n;9|1:356|16:357;p;14|1:358'
- ..';n;9|1:359|16:360;p;14|1:361;n;9|1:362|16:357;p;14|1:363;n;9|1:364|16:365;p;p;12|8:259|3:4|4:366|5:367|6:368|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:369|5:370|6:371|17:263|18:263|8:259|8:259;n'
- ..';13;p;12|8:259|3:4|4:372|5:370|6:373|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:374|5:367|6:375|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:376|5:6|6:377|17:263|18:263|8:259|8:259;n;13;p;12|8'
- ..':259|3:4|4:378|5:6|6:377|17:263|18:263|8:259|8:259;n;13;p;12|8:259|3:4|4:379|5:6|6:380|17:263|18:263|8:259|8:259;n;13;p;p;')
- for _,Object in pairs(Objects) do
- Object.Parent = script and script.Parent==workspace and script or workspace
- end
- for _,f in pairs(ActualScripts) do f() end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement