Idisjsusus

Forsaken Emote Gui 2.0

Apr 12th, 2025
688
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.82 KB | None | 0 0
  1. -- UI Setup
  2. local player = game.Players.LocalPlayer
  3. local playerGui = player.PlayerGui
  4. local screenGui = Instance.new("ScreenGui")
  5. screenGui.Name = "EmoteMenu"
  6. screenGui.Parent = playerGui
  7.  
  8. -- UI Elements (Main Menu)
  9. local frame = Instance.new("Frame")
  10. frame.Size = UDim2.new(0, 300, 0, 200)
  11. frame.Position = UDim2.new(0.5, -150, 0.5, -100)
  12. frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  13. frame.BackgroundTransparency = 0.5
  14. frame.Parent = screenGui
  15.  
  16. local option1Button = Instance.new("TextButton")
  17. option1Button.Size = UDim2.new(0, 280, 0, 40)
  18. option1Button.Position = UDim2.new(0, 10, 0, 10)
  19. option1Button.Text = "Emote: Shucks"
  20. option1Button.TextColor3 = Color3.fromRGB(255, 255, 255)
  21. option1Button.BackgroundColor3 = Color3.fromRGB(0, 0, 255)
  22. option1Button.Parent = frame
  23.  
  24. local option2Button = Instance.new("TextButton")
  25. option2Button.Size = UDim2.new(0, 280, 0, 40)
  26. option2Button.Position = UDim2.new(0, 10, 0, 60)
  27. option2Button.Text = "Emote: HakariDance"
  28. option2Button.TextColor3 = Color3.fromRGB(255, 255, 255)
  29. option2Button.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  30. option2Button.Parent = frame
  31.  
  32. local option3Button = Instance.new("TextButton")
  33. option3Button.Size = UDim2.new(0, 280, 0, 40)
  34. option3Button.Position = UDim2.new(0, 10, 0, 110)
  35. option3Button.Text = "Stop All Emotes"
  36. option3Button.TextColor3 = Color3.fromRGB(255, 255, 255)
  37. option3Button.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
  38. option3Button.Parent = frame
  39.  
  40. -- Variables for animations and sounds
  41. local animationTrack1
  42. local animationTrack2
  43.  
  44. -- Functions for Option 1 (Shucks Emote)
  45. local function updateEmotesValue1()
  46.     local emotesValue = player.PlayerData.Equipped.Emotes.Value
  47.     local emotesList = {}
  48.  
  49.     for value in string.gmatch(emotesValue, "[^|]+") do
  50.         table.insert(emotesList, value)
  51.     end
  52.  
  53.     if #emotesList >= 6 then
  54.         emotesList[6] = "Shucks"
  55.     end
  56.  
  57.     player.PlayerData.Equipped.Emotes.Value = table.concat(emotesList, "|")
  58. end
  59.  
  60. local function onOption1Pressed()
  61.     updateEmotesValue1()
  62.  
  63.     local character = player.Character or player.CharacterAdded:Wait()
  64.     local humanoid = character:WaitForChild("Humanoid")
  65.     humanoid.PlatformStand = true
  66.     humanoid:Move(Vector3.zero)
  67.  
  68.     local bodyVelocity = Instance.new("BodyVelocity")
  69.     bodyVelocity.MaxForce = Vector3.new(100000, 100000, 100000)
  70.     bodyVelocity.Velocity = Vector3.zero
  71.     bodyVelocity.Parent = character:WaitForChild("HumanoidRootPart")
  72.  
  73.     local emoteScript = require(game:GetService("ReplicatedStorage").Assets.Emotes.Shucks)
  74.     emoteScript.Created({Character = character})
  75.  
  76.     local animation = Instance.new("Animation")
  77.     animation.AnimationId = "rbxassetid://74238051754912"
  78.     animationTrack1 = humanoid:LoadAnimation(animation)
  79.     animationTrack1:Play()
  80.  
  81.     local sound = Instance.new("Sound")
  82.     sound.SoundId = "rbxassetid://123236721947419"
  83.     sound.Parent = character:WaitForChild("HumanoidRootPart")
  84.     sound.Volume = 0.5
  85.     sound.Looped = false
  86.     sound:Play()
  87.  
  88.     local args = {
  89.         [1] = "PlayEmote",
  90.         [2] = "Animations",
  91.         [3] = "Shucks"
  92.     }
  93.     game:GetService("ReplicatedStorage"):WaitForChild("Modules"):WaitForChild("Network"):WaitForChild("RemoteEvent"):FireServer(unpack(args))
  94.  
  95.     game:GetService("Debris"):AddItem(character:FindFirstChild("Saw"), 24)
  96.     game:GetService("Debris"):AddItem(character:FindFirstChild("PlayerEmoteHand"), 24)
  97.  
  98.     animationTrack1.Stopped:Connect(function()
  99.         humanoid.PlatformStand = false
  100.         if bodyVelocity and bodyVelocity.Parent then
  101.             bodyVelocity:Destroy()
  102.         end
  103.     end)
  104. end
  105.  
  106. -- Functions for Option 2 (HakariDance Emote)
  107. local function updateEmotesValue2()
  108.     local emotesValue = player.PlayerData.Equipped.Emotes.Value
  109.     local emotesList = {}
  110.  
  111.     for value in string.gmatch(emotesValue, "[^|]+") do
  112.         table.insert(emotesList, value)
  113.     end
  114.  
  115.     if #emotesList >= 1 then
  116.         emotesList[1] = "HakariDance"
  117.     end
  118.  
  119.     player.PlayerData.Equipped.Emotes.Value = table.concat(emotesList, "|")
  120. end
  121.  
  122. local function onOption2Pressed()
  123.     updateEmotesValue2()
  124.  
  125.     local character = player.Character or player.CharacterAdded:Wait()
  126.     local humanoid = character:WaitForChild("Humanoid")
  127.     humanoid.PlatformStand = true
  128.     humanoid:Move(Vector3.zero)
  129.  
  130.     local bodyVelocity = Instance.new("BodyVelocity")
  131.     bodyVelocity.MaxForce = Vector3.new(100000, 100000, 100000)
  132.     bodyVelocity.Velocity = Vector3.zero
  133.     bodyVelocity.Parent = character:WaitForChild("HumanoidRootPart")
  134.  
  135.     local emoteScript = require(game:GetService("ReplicatedStorage").Assets.Emotes.HakariDance)
  136.     emoteScript.Created({Character = character})
  137.  
  138.     local animation = Instance.new("Animation")
  139.     animation.AnimationId = "rbxassetid://138019937280193"
  140.     animationTrack2 = humanoid:LoadAnimation(animation)
  141.     animationTrack2:Play()
  142.  
  143.     local sound = Instance.new("Sound")
  144.     sound.SoundId = "rbxassetid://87166578676888"
  145.     sound.Parent = character:WaitForChild("HumanoidRootPart")
  146.     sound.Volume = 0.5
  147.     sound.Looped = false
  148.     sound:Play()
  149.  
  150.     local args = {
  151.         [1] = "PlayEmote",
  152.         [2] = "Animations",
  153.         [3] = "HakariDance"
  154.     }
  155.     game:GetService("ReplicatedStorage"):WaitForChild("Modules"):WaitForChild("Network"):WaitForChild("RemoteEvent"):FireServer(unpack(args))
  156.  
  157.     wait(17)
  158.  
  159.     humanoid.PlatformStand = false
  160.     if bodyVelocity and bodyVelocity.Parent then
  161.         bodyVelocity:Destroy()
  162.     end
  163.  
  164.     if animationTrack2 and animationTrack2.IsPlaying then
  165.         animationTrack2:Stop()
  166.     end
  167.  
  168.     wait(16)
  169.     player:LoadCharacter()
  170. end
  171.  
  172. -- Functions for Option 3 (Stop All Emotes)
  173. local function stopAllEmotes()
  174.     if animationTrack1 and animationTrack1.IsPlaying then
  175.         animationTrack1:Stop()
  176.     end
  177.     if animationTrack2 and animationTrack2.IsPlaying then
  178.         animationTrack2:Stop()
  179.     end
  180.  
  181.     local character = player.Character or player.CharacterAdded:Wait()
  182.     local humanoid = character:WaitForChild("Humanoid")
  183.     humanoid.PlatformStand = false
  184. end
  185.  
  186. -- Toggle UI visibility button (in the top-right corner)
  187. local toggleButton = Instance.new("TextButton")
  188. toggleButton.Size = UDim2.new(0, 50, 0, 50)
  189. toggleButton.Position = UDim2.new(1, -60, 0, 10)
  190. toggleButton.Text = "X"
  191. toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  192. toggleButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  193. toggleButton.Parent = screenGui
  194.  
  195. -- Function to toggle UI visibility
  196. local function toggleUI()
  197.     frame.Visible = not frame.Visible
  198. end
  199.  
  200. -- Connect the buttons to their respective functions
  201. option1Button.MouseButton1Click:Connect(onOption1Pressed)
  202. option2Button.MouseButton1Click:Connect(onOption2Pressed)
  203. option3Button.MouseButton1Click:Connect(stopAllEmotes)
  204. toggleButton.MouseButton1Click:Connect(toggleUI)
  205.  
Advertisement
Add Comment
Please, Sign In to add comment