vtrvsted

Animation PACK

Sep 18th, 2022
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.60 KB | None | 0 0
  1. local Folder = Instance.new('Folder', game:GetService("Workspace"))
  2.     local AnimationPack = game:GetService("Players").LocalPlayer.PlayerGui.MainScreenGui.AnimationPack
  3.     local ScrollingFrame = AnimationPack.ScrollingFrame
  4.     local CloseButton = AnimationPack.CloseButton
  5.  
  6.     AnimationPack.Visible = true
  7.  
  8.     local LeanAnimation = Instance.new("Animation", Folder)
  9.     LeanAnimation.Name = "LeanAnimation"
  10.     LeanAnimation.AnimationId = "rbxassetid://3152375249"
  11.     local Lean = game:GetService("Players").LocalPlayer.Character.Humanoid:LoadAnimation(LeanAnimation)
  12.  
  13.     local LayAnimation = Instance.new("Animation", Folder)
  14.     LayAnimation.Name = "LayAnimation"
  15.     LayAnimation.AnimationId = "rbxassetid://3152378852"
  16.     local Lay = game:GetService("Players").LocalPlayer.Character.Humanoid:LoadAnimation(LayAnimation)
  17.  
  18.     local Dance1Animation = Instance.new("Animation", Folder)
  19.     Dance1Animation.Name = "Dance1Animation"
  20.     Dance1Animation.AnimationId = "rbxassetid://3189773368"
  21.     local Dance1 = game:GetService("Players").LocalPlayer.Character.Humanoid:LoadAnimation(Dance1Animation)
  22.  
  23.     local Dance2Animation = Instance.new("Animation", Folder)
  24.     Dance2Animation.Name = "Dance2Animation"
  25.     Dance2Animation.AnimationId = "rbxassetid://3189776546"
  26.     local Dance2 = game:GetService("Players").LocalPlayer.Character.Humanoid:LoadAnimation(Dance2Animation)
  27.  
  28.     local GreetAnimation = Instance.new("Animation", Folder)
  29.     GreetAnimation.Name = "GreetAnimation"
  30.     GreetAnimation.AnimationId = "rbxassetid://3189777795"
  31.     local Greet = game:GetService("Players").LocalPlayer.Character.Humanoid:LoadAnimation(GreetAnimation)
  32.  
  33.     local PrayingAnimation = Instance.new("Animation", Folder)
  34.     PrayingAnimation.Name = "PrayingAnimation"
  35.     PrayingAnimation.AnimationId = "rbxassetid://3487719500"
  36.     local Praying = game:GetService("Players").LocalPlayer.Character.Humanoid:LoadAnimation(PrayingAnimation)
  37.  
  38.     for i,v in pairs(ScrollingFrame:GetChildren()) do
  39.         if v.Name == "TextButton" then
  40.             if v.Text == "Lean" then
  41.                 v.Name = "LeanButton"
  42.             end
  43.         end
  44.     end
  45.  
  46.     for i,v in pairs(ScrollingFrame:GetChildren()) do
  47.         if v.Name == "TextButton" then
  48.             if v.Text == "Lay" then
  49.                 v.Name = "LayButton"
  50.             end
  51.         end
  52.     end
  53.  
  54.     for i,v in pairs(ScrollingFrame:GetChildren()) do
  55.         if v.Name == "TextButton" then
  56.             if v.Text == "Dance1" then
  57.                 v.Name = "Dance1Button"
  58.             end
  59.         end
  60.     end
  61.  
  62.     for i,v in pairs(ScrollingFrame:GetChildren()) do
  63.         if v.Name == "TextButton" then
  64.             if v.Text == "Dance2" then
  65.                 v.Name = "Dance2Button"
  66.             end
  67.         end
  68.     end
  69.  
  70.     for i,v in pairs(ScrollingFrame:GetChildren()) do
  71.         if v.Name == "TextButton" then
  72.             if v.Text == "Greet" then
  73.                 v.Name = "GreetButton"
  74.             end
  75.         end
  76.     end
  77.  
  78.     for i,v in pairs(ScrollingFrame:GetChildren()) do
  79.         if v.Name == "TextButton" then
  80.             if v.Text == "Praying" then
  81.                 v.Name = "PrayingButton"
  82.             end
  83.         end
  84.     end
  85.  
  86.     function Stop()
  87.         Lay:Stop()
  88.         Lean:Stop()
  89.         Dance1:Stop()
  90.         Dance2:Stop()
  91.         Greet:Stop()
  92.         Praying:Stop()
  93.     end
  94.  
  95.     local LeanTextButton = ScrollingFrame.LeanButton
  96.     local LayTextButton = ScrollingFrame.LayButton
  97.     local Dance1TextButton = ScrollingFrame.Dance1Button
  98.     local Dance2TextButton = ScrollingFrame.Dance2Button
  99.     local GreetTextButton = ScrollingFrame.GreetButton
  100.     local PrayingTextButton = ScrollingFrame.PrayingButton
  101.  
  102.     AnimationPack.MouseButton1Click:Connect(function()
  103.         if ScrollingFrame.Visible == false then
  104.             ScrollingFrame.Visible = true
  105.             CloseButton.Visible = true
  106.         end
  107.     end)
  108.     CloseButton.MouseButton1Click:Connect(function()
  109.         if ScrollingFrame.Visible == true then
  110.             ScrollingFrame.Visible = false
  111.             CloseButton.Visible = false
  112.         end
  113.     end)
  114.     LeanTextButton.MouseButton1Click:Connect(function()
  115.         Stop()
  116.         Lean:Play()
  117.     end)
  118.     LayTextButton.MouseButton1Click:Connect(function()
  119.         Stop()
  120.         Lay:Play()
  121.     end)
  122.     Dance1TextButton.MouseButton1Click:Connect(function()
  123.         Stop()
  124.         Dance1:Play()
  125.     end)
  126.     Dance2TextButton.MouseButton1Click:Connect(function()
  127.         Stop()
  128.         Dance2:Play()
  129.     end)
  130.     GreetTextButton.MouseButton1Click:Connect(function()
  131.         Stop()
  132.         Greet:Play()
  133.     end)
  134.     PrayingTextButton.MouseButton1Click:Connect(function()
  135.         Stop()
  136.         Praying:Play()
  137.     end)
  138.  
  139.     game:GetService("Players").LocalPlayer.Character.Humanoid.Running:Connect(function()
  140.         Stop()
  141.     end)
  142.     game:GetService("Players").LocalPlayer.Character.Humanoid.Died:Connect(function()
  143.         Stop()
  144.         repeat
  145.             wait()
  146.         until game:GetService("Players").LocalPlayer.Character.Humanoid.Health == 100
  147.         wait(1)
  148.         local AnimationPack = game:GetService("Players").LocalPlayer.PlayerGui.MainScreenGui.AnimationPack
  149.         local ScrollingFrame = AnimationPack.ScrollingFrame
  150.         local CloseButton = AnimationPack.CloseButton
  151.  
  152.         AnimationPack.Visible = true
  153.  
  154.         local LeanAnimation = Instance.new("Animation", Folder)
  155.         LeanAnimation.Name = "LeanAnimation"
  156.         LeanAnimation.AnimationId = "rbxassetid://3152375249"
  157.         local Lean = game:GetService("Players").LocalPlayer.Character.Humanoid:LoadAnimation(LeanAnimation)
  158.  
  159.         local LayAnimation = Instance.new("Animation", Folder)
  160.         LayAnimation.Name = "LayAnimation"
  161.         LayAnimation.AnimationId = "rbxassetid://3152378852"
  162.         local Lay = game:GetService("Players").LocalPlayer.Character.Humanoid:LoadAnimation(LayAnimation)
  163.  
  164.         local Dance1Animation = Instance.new("Animation", Folder)
  165.         Dance1Animation.Name = "Dance1Animation"
  166.         Dance1Animation.AnimationId = "rbxassetid://3189773368"
  167.         local Dance1 = game:GetService("Players").LocalPlayer.Character.Humanoid:LoadAnimation(Dance1Animation)
  168.  
  169.         local Dance2Animation = Instance.new("Animation", Folder)
  170.         Dance2Animation.Name = "Dance2Animation"
  171.         Dance2Animation.AnimationId = "rbxassetid://3189776546"
  172.         local Dance2 = game:GetService("Players").LocalPlayer.Character.Humanoid:LoadAnimation(Dance2Animation)
  173.  
  174.         local GreetAnimation = Instance.new("Animation", Folder)
  175.         GreetAnimation.Name = "GreetAnimation"
  176.         GreetAnimation.AnimationId = "rbxassetid://3189777795"
  177.         local Greet = game:GetService("Players").LocalPlayer.Character.Humanoid:LoadAnimation(GreetAnimation)
  178.  
  179.         local PrayingAnimation = Instance.new("Animation", Folder)
  180.         PrayingAnimation.Name = "PrayingAnimation"
  181.         PrayingAnimation.AnimationId = "rbxassetid://3487719500"
  182.         local Praying = game:GetService("Players").LocalPlayer.Character.Humanoid:LoadAnimation(PrayingAnimation)
  183.  
  184.         for i,v in pairs(ScrollingFrame:GetChildren()) do
  185.             if v.Name == "TextButton" then
  186.                 if v.Text == "Lean" then
  187.                     v.Name = "LeanButton"
  188.                 end
  189.             end
  190.         end
  191.  
  192.         for i,v in pairs(ScrollingFrame:GetChildren()) do
  193.             if v.Name == "TextButton" then
  194.                 if v.Text == "Lay" then
  195.                     v.Name = "LayButton"
  196.                 end
  197.             end
  198.         end
  199.  
  200.         for i,v in pairs(ScrollingFrame:GetChildren()) do
  201.             if v.Name == "TextButton" then
  202.                 if v.Text == "Dance1" then
  203.                     v.Name = "Dance1Button"
  204.                 end
  205.             end
  206.         end
  207.  
  208.         for i,v in pairs(ScrollingFrame:GetChildren()) do
  209.             if v.Name == "TextButton" then
  210.                 if v.Text == "Dance2" then
  211.                     v.Name = "Dance2Button"
  212.                 end
  213.             end
  214.         end
  215.  
  216.         for i,v in pairs(ScrollingFrame:GetChildren()) do
  217.             if v.Name == "TextButton" then
  218.                 if v.Text == "Greet" then
  219.                     v.Name = "GreetButton"
  220.                 end
  221.             end
  222.         end
  223.  
  224.         for i,v in pairs(ScrollingFrame:GetChildren()) do
  225.             if v.Name == "TextButton" then
  226.                 if v.Text == "Praying" then
  227.                     v.Name = "PrayingButton"
  228.                 end
  229.             end
  230.         end
  231.  
  232.         function Stop()
  233.             Lay:Stop()
  234.             Lean:Stop()
  235.             Dance1:Stop()
  236.             Dance2:Stop()
  237.             Greet:Stop()
  238.             Praying:Stop()
  239.         end
  240.  
  241.         local LeanTextButton = ScrollingFrame.LeanButton
  242.         local LayTextButton = ScrollingFrame.LayButton
  243.         local Dance1TextButton = ScrollingFrame.Dance1Button
  244.         local Dance2TextButton = ScrollingFrame.Dance2Button
  245.         local GreetTextButton = ScrollingFrame.GreetButton
  246.         local PrayingTextButton = ScrollingFrame.PrayingButton
  247.  
  248.         AnimationPack.MouseButton1Click:Connect(function()
  249.             if ScrollingFrame.Visible == false then
  250.                 ScrollingFrame.Visible = true
  251.                 CloseButton.Visible = true
  252.             end
  253.         end)
  254.         CloseButton.MouseButton1Click:Connect(function()
  255.             if ScrollingFrame.Visible == true then
  256.                 ScrollingFrame.Visible = false
  257.                 CloseButton.Visible = false
  258.             end
  259.         end)
  260.         LeanTextButton.MouseButton1Click:Connect(function()
  261.             Stop()
  262.             Lean:Play()
  263.         end)
  264.         LayTextButton.MouseButton1Click:Connect(function()
  265.             Stop()
  266.             Lay:Play()
  267.         end)
  268.         Dance1TextButton.MouseButton1Click:Connect(function()
  269.             Stop()
  270.             Dance1:Play()
  271.         end)
  272.         Dance2TextButton.MouseButton1Click:Connect(function()
  273.             Stop()
  274.             Dance2:Play()
  275.         end)
  276.         GreetTextButton.MouseButton1Click:Connect(function()
  277.             Stop()
  278.             Greet:Play()
  279.         end)
  280.         PrayingTextButton.MouseButton1Click:Connect(function()
  281.             Stop()
  282.             Praying:Play()
  283.         end)
  284.     end)
Add Comment
Please, Sign In to add comment