Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local plr = Players.LocalPlayer
- local function isR6(character)
- return character:FindFirstChild("Torso") ~= nil and character:FindFirstChild("Right Leg") ~= nil
- end
- local function runLocalAnimate(character)
- if isR6(character) then
- print("Character is R6, script will not run.")
- return
- end
- local Animate = character.Animate
- Animate.Disabled = true
- -- Parando qualquer animação em execução
- local animtrack = character.Humanoid:GetPlayingAnimationTracks()
- for _, track in pairs(animtrack) do
- track:Stop()
- end
- -- Substituindo as animações
- Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=616158929"
- Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=616160636"
- Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=616168032"
- Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=616163682"
- Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=616161997"
- Animate.climb.ClimbAnim.AnimationId = "http://www.roblox.com/asset/?id=10921070953" -- Nova animação de escalada
- Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=616157476"
- Animate.swim.Swim.AnimationId = "http://www.roblox.com/asset/?id=99384245425157" -- Animação de nadar
- Animate.swimidle.SwimIdle.AnimationId = "http://www.roblox.com/asset/?id=113199415118199"
- Animate.Disabled = false
- end
- local function onCharacterAdded(character)
- print(character.Name .. " spawned!")
- if isR6(character) then
- print("Character is R6, script will not run.")
- return
- end
- wait(0.5)
- runLocalAnimate(character)
- end
- plr.CharacterAdded:Connect(onCharacterAdded)
- -- Chamando a função para o personagem atual, se já estiver presente
- if plr.Character then
- onCharacterAdded(plr.Character)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement