Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- ReplaceR15Animations_Server.lua
- -- Put this in ServerScriptService
- 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=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 }
- },
- }
- -- Function to replace the animations on a character
- local function replaceAnimations(character)
- local animateScript = character:FindFirstChild("Animate")
- if not animateScript then return end
- for name, animList in pairs(animNames) do
- local animObject = animateScript:FindFirstChild(name)
- if animObject then
- -- Replace or add all animation variants
- local count = 1
- for _, animData in ipairs(animList) do
- local subName = count == 1 and name or (name .. tostring(count))
- local subAnim = animateScript:FindFirstChild(subName)
- if not subAnim then
- subAnim = Instance.new("StringValue")
- subAnim.Name = subName
- subAnim.Parent = animateScript
- end
- subAnim.Value = animData.id
- count += 1
- end
- end
- end
- end
- -- Apply to all current and future players
- game.Players.PlayerAdded:Connect(function(player)
- player.CharacterAdded:Connect(function(character)
- -- Wait until Animate exists to ensure it's ready
- character:WaitForChild("Animate", 10)
- replaceAnimations(character)
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment