Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- UI Setup
- local player = game.Players.LocalPlayer
- local playerGui = player.PlayerGui
- local screenGui = Instance.new("ScreenGui")
- screenGui.Name = "EmoteMenu"
- screenGui.Parent = playerGui
- -- UI Elements (Main Menu)
- local frame = Instance.new("Frame")
- frame.Size = UDim2.new(0, 300, 0, 200)
- frame.Position = UDim2.new(0.5, -150, 0.5, -100)
- frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
- frame.BackgroundTransparency = 0.5
- frame.Parent = screenGui
- local option1Button = Instance.new("TextButton")
- option1Button.Size = UDim2.new(0, 280, 0, 40)
- option1Button.Position = UDim2.new(0, 10, 0, 10)
- option1Button.Text = "Emote: Shucks"
- option1Button.TextColor3 = Color3.fromRGB(255, 255, 255)
- option1Button.BackgroundColor3 = Color3.fromRGB(0, 0, 255)
- option1Button.Parent = frame
- local option2Button = Instance.new("TextButton")
- option2Button.Size = UDim2.new(0, 280, 0, 40)
- option2Button.Position = UDim2.new(0, 10, 0, 60)
- option2Button.Text = "Emote: HakariDance"
- option2Button.TextColor3 = Color3.fromRGB(255, 255, 255)
- option2Button.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
- option2Button.Parent = frame
- local option3Button = Instance.new("TextButton")
- option3Button.Size = UDim2.new(0, 280, 0, 40)
- option3Button.Position = UDim2.new(0, 10, 0, 110)
- option3Button.Text = "Stop All Emotes"
- option3Button.TextColor3 = Color3.fromRGB(255, 255, 255)
- option3Button.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
- option3Button.Parent = frame
- -- Variables for animations and sounds
- local animationTrack1
- local animationTrack2
- -- Functions for Option 1 (Shucks Emote)
- local function updateEmotesValue1()
- local emotesValue = player.PlayerData.Equipped.Emotes.Value
- local emotesList = {}
- for value in string.gmatch(emotesValue, "[^|]+") do
- table.insert(emotesList, value)
- end
- if #emotesList >= 6 then
- emotesList[6] = "Shucks"
- end
- player.PlayerData.Equipped.Emotes.Value = table.concat(emotesList, "|")
- end
- local function onOption1Pressed()
- updateEmotesValue1()
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- humanoid.PlatformStand = true
- humanoid:Move(Vector3.zero)
- local bodyVelocity = Instance.new("BodyVelocity")
- bodyVelocity.MaxForce = Vector3.new(100000, 100000, 100000)
- bodyVelocity.Velocity = Vector3.zero
- bodyVelocity.Parent = character:WaitForChild("HumanoidRootPart")
- local emoteScript = require(game:GetService("ReplicatedStorage").Assets.Emotes.Shucks)
- emoteScript.Created({Character = character})
- local animation = Instance.new("Animation")
- animation.AnimationId = "rbxassetid://74238051754912"
- animationTrack1 = humanoid:LoadAnimation(animation)
- animationTrack1:Play()
- local sound = Instance.new("Sound")
- sound.SoundId = "rbxassetid://123236721947419"
- sound.Parent = character:WaitForChild("HumanoidRootPart")
- sound.Volume = 0.5
- sound.Looped = false
- sound:Play()
- local args = {
- [1] = "PlayEmote",
- [2] = "Animations",
- [3] = "Shucks"
- }
- game:GetService("ReplicatedStorage"):WaitForChild("Modules"):WaitForChild("Network"):WaitForChild("RemoteEvent"):FireServer(unpack(args))
- game:GetService("Debris"):AddItem(character:FindFirstChild("Saw"), 24)
- game:GetService("Debris"):AddItem(character:FindFirstChild("PlayerEmoteHand"), 24)
- animationTrack1.Stopped:Connect(function()
- humanoid.PlatformStand = false
- if bodyVelocity and bodyVelocity.Parent then
- bodyVelocity:Destroy()
- end
- end)
- end
- -- Functions for Option 2 (HakariDance Emote)
- local function updateEmotesValue2()
- local emotesValue = player.PlayerData.Equipped.Emotes.Value
- local emotesList = {}
- for value in string.gmatch(emotesValue, "[^|]+") do
- table.insert(emotesList, value)
- end
- if #emotesList >= 1 then
- emotesList[1] = "HakariDance"
- end
- player.PlayerData.Equipped.Emotes.Value = table.concat(emotesList, "|")
- end
- local function onOption2Pressed()
- updateEmotesValue2()
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- humanoid.PlatformStand = true
- humanoid:Move(Vector3.zero)
- local bodyVelocity = Instance.new("BodyVelocity")
- bodyVelocity.MaxForce = Vector3.new(100000, 100000, 100000)
- bodyVelocity.Velocity = Vector3.zero
- bodyVelocity.Parent = character:WaitForChild("HumanoidRootPart")
- local emoteScript = require(game:GetService("ReplicatedStorage").Assets.Emotes.HakariDance)
- emoteScript.Created({Character = character})
- local animation = Instance.new("Animation")
- animation.AnimationId = "rbxassetid://138019937280193"
- animationTrack2 = humanoid:LoadAnimation(animation)
- animationTrack2:Play()
- local sound = Instance.new("Sound")
- sound.SoundId = "rbxassetid://87166578676888"
- sound.Parent = character:WaitForChild("HumanoidRootPart")
- sound.Volume = 0.5
- sound.Looped = false
- sound:Play()
- local args = {
- [1] = "PlayEmote",
- [2] = "Animations",
- [3] = "HakariDance"
- }
- game:GetService("ReplicatedStorage"):WaitForChild("Modules"):WaitForChild("Network"):WaitForChild("RemoteEvent"):FireServer(unpack(args))
- wait(17)
- humanoid.PlatformStand = false
- if bodyVelocity and bodyVelocity.Parent then
- bodyVelocity:Destroy()
- end
- if animationTrack2 and animationTrack2.IsPlaying then
- animationTrack2:Stop()
- end
- wait(16)
- player:LoadCharacter()
- end
- -- Functions for Option 3 (Stop All Emotes)
- local function stopAllEmotes()
- if animationTrack1 and animationTrack1.IsPlaying then
- animationTrack1:Stop()
- end
- if animationTrack2 and animationTrack2.IsPlaying then
- animationTrack2:Stop()
- end
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- humanoid.PlatformStand = false
- end
- -- Toggle UI visibility button (in the top-right corner)
- local toggleButton = Instance.new("TextButton")
- toggleButton.Size = UDim2.new(0, 50, 0, 50)
- toggleButton.Position = UDim2.new(1, -60, 0, 10)
- toggleButton.Text = "X"
- toggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- toggleButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
- toggleButton.Parent = screenGui
- -- Function to toggle UI visibility
- local function toggleUI()
- frame.Visible = not frame.Visible
- end
- -- Connect the buttons to their respective functions
- option1Button.MouseButton1Click:Connect(onOption1Pressed)
- option2Button.MouseButton1Click:Connect(onOption2Pressed)
- option3Button.MouseButton1Click:Connect(stopAllEmotes)
- toggleButton.MouseButton1Click:Connect(toggleUI)
Advertisement
Add Comment
Please, Sign In to add comment