Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Animation Switcher
- by chexyalani
- Note : please run this a script (use h/https://pastebin.com/raw/jTjugUtz)
- --]]
- local h = Instance.new('Hint',workspace)
- h.Text = 'Now Loading Animation Switcher, by Dev_Basics'
- local players=game:FindService("Players")
- local player=game:FindService("Players").LocalPlayer
- local as=game:GetService("AssetService")
- local is=game:GetService("InsertService")
- local AnimNames={
- ['ninja']=658839027;
- ['levitation']=619547874;
- ['superhero']=619533495;
- ['robot']=619526284;
- ['stylish']=619520125;
- ['cartoony']=837018588;
- ['bubbly']=1018570389;
- ['zombie']=619540515;
- ['werewolf']=1113761759;
- ['vampire']=1113748071;
- ['mage']=754668466;
- ['toy']=973784877;
- ['elder']=892276056;
- ['astronaut']=1090142671;
- ['pirate']=837029051;
- ['knight']=734338331;
- }
- local chatted=function(msg)
- msg=msg:lower()
- if msg:sub(1,6)==':anim ' then
- local pl,p
- for i=7,msg:len() do
- if msg:sub(i,i)==' ' then
- p=i
- end
- end
- for _,v in pairs(players:GetPlayers()) do
- if (v.Name:lower()):sub(1,#msg:sub(7,p-1))==msg:sub(7,p-1) then
- pl=v
- end
- end
- local assets=as:GetAssetIdsForPackage(AnimNames[msg:sub(p+1)])
- for i=1,#assets do
- local asset=is:LoadAsset(assets[i]):GetChildren()[1]
- asset.Parent=workspace
- for _,i in pairs(asset:GetChildren()) do
- if pl.Character.Animate:FindFirstChild(i.Name) then pl.Character.Animate[i.Name]:Destroy() end
- i.Parent=pl.Character.Animate
- end
- asset:Destroy()
- end
- end
- end
- for _,v in pairs(players:GetChildren()) do
- v.Chatted:Connect(function(msg)
- chatted(msg)
- end)
- end
- players.ChildAdded:Connect(function(client)
- client.Chatted:Connect(function(msg)
- chatted(msg)
- end)
- end)
- wait(5)
- h:Destroy()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement