Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- LocalScript0 = Instance.new("LocalScript")
- StringValue1 = Instance.new("StringValue")
- Animation2 = Instance.new("Animation")
- StringValue3 = Instance.new("StringValue")
- Animation4 = Instance.new("Animation")
- NumberValue5 = Instance.new("NumberValue")
- Animation6 = Instance.new("Animation")
- NumberValue7 = Instance.new("NumberValue")
- Animation8 = Instance.new("Animation")
- NumberValue9 = Instance.new("NumberValue")
- StringValue10 = Instance.new("StringValue")
- Animation11 = Instance.new("Animation")
- NumberValue12 = Instance.new("NumberValue")
- Animation13 = Instance.new("Animation")
- NumberValue14 = Instance.new("NumberValue")
- Animation15 = Instance.new("Animation")
- NumberValue16 = Instance.new("NumberValue")
- StringValue17 = Instance.new("StringValue")
- Animation18 = Instance.new("Animation")
- NumberValue19 = Instance.new("NumberValue")
- Animation20 = Instance.new("Animation")
- NumberValue21 = Instance.new("NumberValue")
- Animation22 = Instance.new("Animation")
- NumberValue23 = Instance.new("NumberValue")
- StringValue24 = Instance.new("StringValue")
- Animation25 = Instance.new("Animation")
- StringValue26 = Instance.new("StringValue")
- Animation27 = Instance.new("Animation")
- StringValue28 = Instance.new("StringValue")
- Animation29 = Instance.new("Animation")
- StringValue30 = Instance.new("StringValue")
- Animation31 = Instance.new("Animation")
- StringValue32 = Instance.new("StringValue")
- Animation33 = Instance.new("Animation")
- StringValue34 = Instance.new("StringValue")
- Animation35 = Instance.new("Animation")
- StringValue36 = Instance.new("StringValue")
- Animation37 = Instance.new("Animation")
- StringValue38 = Instance.new("StringValue")
- Animation39 = Instance.new("Animation")
- NumberValue40 = Instance.new("NumberValue")
- Animation41 = Instance.new("Animation")
- NumberValue42 = Instance.new("NumberValue")
- StringValue43 = Instance.new("StringValue")
- Animation44 = Instance.new("Animation")
- NumberValue45 = Instance.new("NumberValue")
- StringValue46 = Instance.new("StringValue")
- Animation47 = Instance.new("Animation")
- StringValue48 = Instance.new("StringValue")
- Animation49 = Instance.new("Animation")
- StringValue50 = Instance.new("StringValue")
- Animation51 = Instance.new("Animation")
- StringValue52 = Instance.new("StringValue")
- Animation53 = Instance.new("Animation")
- StringValue54 = Instance.new("StringValue")
- Animation55 = Instance.new("Animation")
- StringValue56 = Instance.new("StringValue")
- Animation57 = Instance.new("Animation")
- StringValue58 = Instance.new("StringValue")
- Animation59 = Instance.new("Animation")
- LocalScript0.Name = "Animation_Mocap"
- LocalScript0.Parent = mas
- LocalScript0.Disabled = true
- table.insert(cors,sandbox(LocalScript0,function()
- local Character = script.Parent
- local Humanoid = Character:WaitForChild("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=913402848", 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=522635514", weight = 10 }
- },
- toollunge = {
- { id = "http://www.roblox.com/asset/?id=522638767", 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 = false
- local success, msg = pcall(function()
- AllowDisableCustomAnimsUserFlag = UserSettings():IsUserFeatureEnabled("UserAllowDisableCustomAnims2")
- end)
- if (AllowDisableCustomAnimsUserFlag) then
- allowCustomAnimations = game:GetService("StarterPlayer").AllowCustomAnimations
- 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
- 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
- function getHeightScale()
- if Humanoid then
- local bodyHeightScale = Humanoid:FindFirstChild("BodyHeightScale")
- if bodyHeightScale and bodyHeightScale:IsA("NumberValue") then
- return bodyHeightScale.Value
- end
- end
- return 1
- 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
- local heightScale = getHeightScale()
- runAnimTrack:AdjustSpeed(speedScaled / heightScale)
- currentAnimTrack:AdjustSpeed(speedScaled / heightScale)
- 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)
- if (frameName == "End") then
- if currentAnim == "walk" then
- runAnimTrack.TimePosition = 0.0
- currentAnimTrack.TimePosition = 0.0
- else
- 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)
- 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)
- currentAnimTrack.Priority = Enum.AnimationPriority.Core
- -- 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.Priority = Enum.AnimationPriority.Core
- 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
- playToolAnimation(toolAnimName, 0.0, Humanoid)
- end
- end
- function playToolAnimation(animName, transitionTime, humanoid, priority)
- local idx = rollAnimation(animName)
- 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)
- if priority then
- toolAnimTrack.Priority = priority
- end
- -- 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
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- -- STATE CHANGE HANDLERS
- function onRunning(speed)
- if speed > 0.5 then
- local scale = 16.0
- playAnimation("walk", 0.2, Humanoid)
- setAnimationSpeed(speed / scale)
- pose = "Running"
- else
- if emoteNames[currentAnim] == nil then
- playAnimation("idle", 0.2, 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 animateTool()
- if (toolAnim == "None") then
- playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle)
- return
- end
- if (toolAnim == "Slash") then
- playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
- return
- end
- if (toolAnim == "Lunge") then
- playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
- 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 stepAnimate(currentTime)
- local amplitude = 1
- local frequency = 1
- local deltaTime = currentTime - lastTick
- lastTick = currentTime
- 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.2, 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 = Character:FindFirstChildOfClass("Tool")
- 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 = currentTime + .3
- end
- if currentTime > 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:GetService("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
- end)
- -- initialize to idle
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- -- loop to handle timed state transitions and tool animations
- while Character.Parent ~= nil do
- local _, currentGameTime = wait(0.1)
- stepAnimate(currentGameTime)
- end
- end))
- StringValue1.Name = "cheer"
- StringValue1.Parent = LocalScript0
- Animation2.Name = "CheerAnim"
- Animation2.Parent = StringValue1
- Animation2.AnimationId = "http://www.roblox.com/asset/?id=507770677"
- StringValue3.Name = "dance"
- StringValue3.Parent = LocalScript0
- Animation4.Name = "Animation1"
- Animation4.Parent = StringValue3
- Animation4.AnimationId = "http://www.roblox.com/asset/?id=507771019"
- NumberValue5.Name = "Weight"
- NumberValue5.Parent = Animation4
- NumberValue5.Value = 10
- Animation6.Name = "Animation2"
- Animation6.Parent = StringValue3
- Animation6.AnimationId = "http://www.roblox.com/asset/?id=507771955"
- NumberValue7.Name = "Weight"
- NumberValue7.Parent = Animation6
- NumberValue7.Value = 10
- Animation8.Name = "Animation3"
- Animation8.Parent = StringValue3
- Animation8.AnimationId = "http://www.roblox.com/asset/?id=507772104"
- NumberValue9.Name = "Weight"
- NumberValue9.Parent = Animation8
- NumberValue9.Value = 10
- StringValue10.Name = "dance2"
- StringValue10.Parent = LocalScript0
- Animation11.Name = "Animation1"
- Animation11.Parent = StringValue10
- Animation11.AnimationId = "http://www.roblox.com/asset/?id=507776043"
- NumberValue12.Name = "Weight"
- NumberValue12.Parent = Animation11
- NumberValue12.Value = 10
- Animation13.Name = "Animation2"
- Animation13.Parent = StringValue10
- Animation13.AnimationId = "http://www.roblox.com/asset/?id=507776720"
- NumberValue14.Name = "Weight"
- NumberValue14.Parent = Animation13
- NumberValue14.Value = 10
- Animation15.Name = "Animation3"
- Animation15.Parent = StringValue10
- Animation15.AnimationId = "http://www.roblox.com/asset/?id=507776879"
- NumberValue16.Name = "Weight"
- NumberValue16.Parent = Animation15
- NumberValue16.Value = 10
- StringValue17.Name = "dance3"
- StringValue17.Parent = LocalScript0
- Animation18.Name = "Animation1"
- Animation18.Parent = StringValue17
- Animation18.AnimationId = "http://www.roblox.com/asset/?id=507777268"
- NumberValue19.Name = "Weight"
- NumberValue19.Parent = Animation18
- NumberValue19.Value = 10
- Animation20.Name = "Animation2"
- Animation20.Parent = StringValue17
- Animation20.AnimationId = "http://www.roblox.com/asset/?id=507777451"
- NumberValue21.Name = "Weight"
- NumberValue21.Parent = Animation20
- NumberValue21.Value = 10
- Animation22.Name = "Animation3"
- Animation22.Parent = StringValue17
- Animation22.AnimationId = "http://www.roblox.com/asset/?id=507777623"
- NumberValue23.Name = "Weight"
- NumberValue23.Parent = Animation22
- NumberValue23.Value = 10
- StringValue24.Name = "laugh"
- StringValue24.Parent = LocalScript0
- Animation25.Name = "LaughAnim"
- Animation25.Parent = StringValue24
- Animation25.AnimationId = "http://www.roblox.com/asset/?id=507770818"
- StringValue26.Name = "point"
- StringValue26.Parent = LocalScript0
- Animation27.Name = "PointAnim"
- Animation27.Parent = StringValue26
- Animation27.AnimationId = "http://www.roblox.com/asset/?id=507770453"
- StringValue28.Name = "sit"
- StringValue28.Parent = LocalScript0
- Animation29.Name = "SitAnim"
- Animation29.Parent = StringValue28
- Animation29.AnimationId = "http://www.roblox.com/asset/?id=507768133"
- StringValue30.Name = "toollunge"
- StringValue30.Parent = LocalScript0
- Animation31.Name = "ToolLungeAnim"
- Animation31.Parent = StringValue30
- Animation31.AnimationId = "http://www.roblox.com/asset/?id=522638767"
- StringValue32.Name = "toolnone"
- StringValue32.Parent = LocalScript0
- Animation33.Name = "ToolNoneAnim"
- Animation33.Parent = StringValue32
- Animation33.AnimationId = "http://www.roblox.com/asset/?id=507768375"
- StringValue34.Name = "toolslash"
- StringValue34.Parent = LocalScript0
- Animation35.Name = "ToolSlashAnim"
- Animation35.Parent = StringValue34
- Animation35.AnimationId = "http://www.roblox.com/asset/?id=522635514"
- StringValue36.Name = "wave"
- StringValue36.Parent = LocalScript0
- Animation37.Name = "WaveAnim"
- Animation37.Parent = StringValue36
- Animation37.AnimationId = "http://www.roblox.com/asset/?id=507770239"
- StringValue38.Name = "idle"
- StringValue38.Parent = LocalScript0
- Animation39.Name = "Animation1"
- Animation39.Parent = StringValue38
- Animation39.AnimationId = "rbxassetid://913367814"
- NumberValue40.Name = "Weight"
- NumberValue40.Parent = Animation39
- NumberValue40.Value = 9
- Animation41.Name = "Animation2"
- Animation41.Parent = StringValue38
- Animation41.AnimationId = "rbxassetid://913373430"
- NumberValue42.Name = "Weight"
- NumberValue42.Parent = Animation41
- NumberValue42.Value = 1
- StringValue43.Name = "pose"
- StringValue43.Parent = LocalScript0
- Animation44.Name = "MocapPose"
- Animation44.Parent = StringValue43
- Animation44.AnimationId = "rbxassetid://0"
- NumberValue45.Name = "Weight"
- NumberValue45.Parent = Animation44
- StringValue46.Name = "jump"
- StringValue46.Parent = LocalScript0
- Animation47.Name = "JumpAnim"
- Animation47.Parent = StringValue46
- Animation47.AnimationId = "rbxassetid://913370268"
- StringValue48.Name = "fall"
- StringValue48.Parent = LocalScript0
- Animation49.Name = "FallAnim"
- Animation49.Parent = StringValue48
- Animation49.AnimationId = "rbxassetid://913365531"
- StringValue50.Name = "swim"
- StringValue50.Parent = LocalScript0
- Animation51.Name = "Swim"
- Animation51.Parent = StringValue50
- Animation51.AnimationId = "rbxassetid://913384386"
- StringValue52.Name = "swimidle"
- StringValue52.Parent = LocalScript0
- Animation53.Name = "SwimIdle"
- Animation53.Parent = StringValue52
- Animation53.AnimationId = "rbxassetid://913389285"
- StringValue54.Name = "walk"
- StringValue54.Parent = LocalScript0
- Animation55.Name = "WalkAnim"
- Animation55.Parent = StringValue54
- Animation55.AnimationId = "rbxassetid://913402848"
- StringValue56.Name = "climb"
- StringValue56.Parent = LocalScript0
- Animation57.Name = "ClimbAnim"
- Animation57.Parent = StringValue56
- Animation57.AnimationId = "rbxassetid://913362637"
- StringValue58.Name = "run"
- StringValue58.Parent = LocalScript0
- Animation59.Name = "RunAnim"
- Animation59.Parent = StringValue58
- Animation59.AnimationId = "rbxassetid://913376220"
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.Character
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
- Player=game.Players.LocalPlayer
- LocalScript0.Disabled=false
- Player.Character.Animate.Disabled=true
- Character=Player.Character
- orange=false
- Character.Humanoid.WalkSpeed=6
- sprintspeed=20
- sprint=false
- mouse=Player:GetMouse()
- o=Instance.new('Animation',script)
- o.AnimationId='rbxassetid://1947336120'
- repeat wait() until Character:findFirstChild('Humanoid')~=nil
- orangeanim=Character.Humanoid:LoadAnimation(o)
- orangesong=Instance.new('Sound',Character.Head)
- orangesong.SoundId='rbxassetid://1700869963'
- orangesong:Play()
- orangesong.Looped=true
- orangesong.Volume=0
- gravity={
- }
- f1=Instance.new("Animation",script)
- f1.AnimationId='rbxassetid://1877454312'
- f2=Instance.new("Animation",script)
- f2.AnimationId='rbxassetid://1877476322'
- f3=Instance.new("Animation",script)
- f3.AnimationId='rbxassetid://1877488020'
- reload=false
- elp=false--enable left punch
- erp=false--enable right punch
- elk=false--enable left kick
- erk=false--enable right kick
- damage=10
- Character.LeftHand.Touched:connect(function(h)
- if elp then
- hum=h.Parent:findFirstChild('Humanoid')
- if hum~=nil then
- hum.Health=hum.Health-damage
- table.insert(gravity,h)
- g=Instance.new("BodyPosition")
- g.Position=h.Position
- g.Parent=h
- end
- end
- end)
- Character.RightHand.Touched:connect(function(h)
- if erp then
- hum=h.Parent:findFirstChild('Humanoid')
- if hum~=nil then
- hum.Health=hum.Health-damage
- table.insert(gravity,h)
- g=Instance.new("BodyPosition")
- g.Position=h.Position
- g.Parent=h
- end
- end
- end)
- Character.LeftFoot.Touched:connect(function(h)
- if elk then
- hum=h.Parent:findFirstChild('Humanoid')
- if hum~=nil then
- hum.Health=hum.Health-damage*2
- table.insert(gravity,h)
- g=Instance.new("BodyPosition")
- g.Position=h.Position
- g.Parent=h
- end
- end
- end)
- Character.RightFoot.Touched:connect(function(h)
- if erk then
- hum=h.Parent:findFirstChild('Humanoid')
- if hum~=nil then
- hum.Health=hum.Health-damage*2
- table.insert(gravity,h)
- g=Instance.new("BodyPosition")
- g.Position=h.Position
- g.Parent=h
- end
- end
- end)
- otPart=Instance.new('Part',Character)
- otPart.Transparency=1
- otPart.Size=Vector3.new(1,1,1)
- otPart.CanCollide=false
- weld=Instance.new('Motor6D',otPart)
- weld.C0=CFrame.new(0,5,0)
- weld.Part0=otPart
- weld.Part1=Character.HumanoidRootPart
- bak=false
- haspants=false
- hasshirt=false
- g=Instance.new('Model',Character)
- spechead=Instance.new('Part',g)
- spechead.Transparency=.9
- spechead.Size=Vector3.new(.5,.5,.5)
- spechead.Name='Head'
- g.Name='Uraraka'
- humf=Instance.new('Humanoid')
- humf.Parent=script
- welk=Instance.new('Weld',spechead)
- welk.Part0=spechead
- welk.C0=CFrame.new(0,0,0)
- welk.Part1=Character.Head
- bakP=Instance.new('Pants')
- bakP.PantsTemplate='rbxassetid://1856657571'
- bakT=Instance.new('Shirt')
- bakT.ShirtTemplate='rbxassetid://1856655503'
- repeat wait() until Character.Head.face~=nil
- for _,v in pairs(Character:GetChildren()) do
- if v:IsA('Shirt') then
- hasshirt=true
- Shirt=v
- elseif v:IsA('Pants') then
- haspants=true
- Pants=v
- end
- end
- Hair=Instance.new('Part',Character.Head)
- Hair.CanCollide=false
- Hair.Transparency=1
- Hair.BrickColor=BrickColor.new("Burnt Sienna")
- welk=Instance.new('Weld',Hair)
- welk.Part0=Hair
- welk.C0=CFrame.new(0,0.1,-0.1)
- welk.Part1=Character.Head
- m=Instance.new("FileMesh",Hair)
- m.MeshId='rbxassetid://1436309223'
- m.Scale=Vector3.new(6,6,6)
- r=false
- mouse.KeyDown:connect(function(k)
- k=k:lower()
- if not orange then
- if k=='g' then
- if bak then
- humf.Parent=script
- if haspants then
- Pants.Parent=Character
- end
- if hasshirt then
- Shirt.Parent=Character
- end
- for _,v in pairs(Character:GetChildren()) do
- if v:IsA('Accessory') then
- v.Handle.Transparency=0
- end
- end
- bakP.Parent=script
- bakT.Parent=script
- Hair.Transparency=1
- bak=false
- else bak=true
- humf.Parent=g
- if haspants then
- Pants.Parent=script
- end
- if hasshirt then
- Shirt.Parent=script
- end
- bakP.Parent=Character
- bakT.Parent=Character
- for _,v in pairs(Character:GetChildren()) do
- if v:IsA('Accessory') then
- v.Handle.Transparency=1
- end
- end
- Hair.Transparency=0
- end
- end
- if k=='r' then
- local ray = Ray.new(
- Character.HumanoidRootPart.CFrame.p, -- origin
- (Character.Head.CFrame.p - Character.HumanoidRootPart.CFrame.p).unit *-5 -- direction
- )
- local ignore = game.Players.LocalPlayer.Character
- local hit, position, normal = workspace:FindPartOnRay(ray, ignore)
- print(hit,position,normal)
- if hit ~= nil then
- r=true
- park=Instance.new('Part',workspace)
- park.CFrame=otPart.CFrame
- park.BrickColor=hit.BrickColor
- park.Anchored=true
- park.Size=Vector3.new(math.random(5,10),4,math.random(5,10))
- while r do
- wait()
- park.CFrame=park.CFrame*CFrame.new(0,.5,0)
- end
- if r==false then
- park.Anchored=true
- end
- end
- end
- if k=='e' then
- wait()
- reload=true
- attack=math.random(1,3)
- if attack==1 then
- erp=true
- --char.ovveridespeed.Value=true
- --Character.Humanoid.WalkSpeed=0
- attack1=Character.Humanoid:LoadAnimation(f1)
- attack1:play()
- wait(.6)
- erp=false
- --Character.Humanoid.WalkSpeed=7
- --char.ovveridespeed.Value=false
- elseif attack==2 then
- erk=true
- Character.Humanoid.WalkSpeed=0
- attack1=Character.Humanoid:LoadAnimation(f2)
- attack1:play()
- wait(.8)
- if not sprint then
- Character.Humanoid.WalkSpeed=6
- else
- Character.Humanoid.WalkSpeed=sprintspeed
- end
- erk=false
- elseif attack==3 then
- elp=true
- --char.ovveridespeed.Value=true
- --Character.Humanoid.WalkSpeed=0
- attack1=Character.Humanoid:LoadAnimation(f3)
- attack1:play()
- wait(.6)
- --Character.Humanoid.WalkSpeed=7
- --char.ovveridespeed.Value=false
- elp=false
- end
- reload=false
- end
- if k=='q' then
- v=gravity
- for i=1,#v do
- if v[i]~=nil then
- for _, c in pairs(v[i]:GetChildren())do
- if c:IsA('BodyPosition') then
- c:remove()
- end
- end
- table.remove(gravity,i)
- end
- end
- end
- if k=='v' then
- if sprint then
- sprint=false
- Character.Humanoid.WalkSpeed=6
- else
- sprint=true
- Character.Humanoid.WalkSpeed=sprintspeed
- end
- end
- end
- if k=='x' then
- if orange then
- orange=false
- orangesong.Volume=0
- orangeanim:Stop()
- if not sprint then
- Character.Humanoid.WalkSpeed=6
- else
- Character.Humanoid.WalkSpeed=sprintspeed
- end
- else
- orangesong.Volume=10
- Character.Humanoid.WalkSpeed=0
- orangeanim:Play()
- orange=true
- end
- end
- end)
- mouse.KeyUp:Connect(function(k)
- k=k:lower()
- if k=='r' then
- r=false
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement