Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local UserInputService = game:GetService("UserInputService")
- local Workspace = game:GetService("Workspace")
- local player = Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local humanoid = character:WaitForChild("Humanoid")
- local animator = humanoid:FindFirstChildOfClass("Animator") or humanoid:WaitForChild("Animator")
- local head = character:WaitForChild("Head")
- local camera = Workspace.CurrentCamera
- local originalCameraSubject = camera.CameraSubject
- local cameraFollowing = false
- local defaultWalkSpeed = humanoid.WalkSpeed
- local defaultJumpPower = humanoid.JumpPower
- local function startFollowingHead()
- if not cameraFollowing then
- cameraFollowing = true
- camera.CameraSubject = head
- end
- end
- local function stopFollowingHead()
- cameraFollowing = false
- camera.CameraSubject = originalCameraSubject
- end
- local function disableMovement()
- humanoid.WalkSpeed = 0
- humanoid.JumpPower = 0
- humanoid:SetStateEnabled(Enum.HumanoidStateType.Running, false)
- humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
- end
- local function enableMovement()
- humanoid.WalkSpeed = defaultWalkSpeed
- humanoid.JumpPower = defaultJumpPower
- humanoid:SetStateEnabled(Enum.HumanoidStateType.Running, true)
- humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, true)
- end
- local animations = {
- Subterfuge = "rbxassetid://87482480949358",
- MissTheQuiet = "rbxassetid://100986631322204",
- Shucks = "rbxassetid://74238051754912",
- HakariDance = "rbxassetid://138019937280193",
- SillyBilly = "rbxassetid://107464355830477"
- Sukuna = "rbxassetid://112276030300130"
- }
- local sounds = {
- Subterfuge = "rbxassetid://132297506693854",
- MissTheQuiet = "rbxassetid://131936418953291",
- Shucks = "rbxassetid://123236721947419",
- HakariDance = "rbxassetid://87166578676888",
- SillyBilly = "rbxassetid://77601084987544"
- Sukuna = "rbxassetid://137906124003434"
- }
- local animationObjects = {}
- local soundObjects = {}
- for name, id in pairs(animations) do
- local anim = Instance.new("Animation")
- anim.AnimationId = id
- animationObjects[name] = anim
- end
- for name, id in pairs(sounds) do
- local sound = Instance.new("Sound", head) -- 📌 Parent to "Head" so others can hear
- sound.SoundId = id
- sound.Volume = 2
- sound.Looped = false
- sound.RollOffMode = Enum.RollOffMode.Linear
- sound.MaxDistance = 50 -- 🎶 Sets range where others can hear
- soundObjects[name] = sound
- end
- local activeAnimationTrack
- local activeSound
- local function playAnimation(animationName)
- if animator then
- if activeAnimationTrack then
- activeAnimationTrack:Stop()
- end
- if activeSound then
- activeSound:Stop()
- end
- disableMovement()
- startFollowingHead()
- activeAnimationTrack = animator:LoadAnimation(animationObjects[animationName])
- activeAnimationTrack:Play()
- activeSound = soundObjects[animationName]
- activeSound:Play()
- activeAnimationTrack.Stopped:Connect(function()
- enableMovement()
- stopFollowingHead()
- end)
- end
- end
- local function stopAnimation()
- if activeAnimationTrack then
- activeAnimationTrack:Stop()
- end
- if activeSound then
- activeSound:Stop()
- end
- enableMovement()
- stopFollowingHead()
- end
- local function createButton(parent, text, position, color, onClick)
- local button = Instance.new("TextButton")
- button.Size = UDim2.new(0.8, 0, 0.12, 0)
- button.Position = position
- button.Text = text
- button.TextColor3 = Color3.fromRGB(255, 255, 255)
- button.BackgroundColor3 = color
- button.Font = Enum.Font.GothamBold
- button.TextSize = 16
- button.Parent = parent
- local buttonCorner = Instance.new("UICorner")
- buttonCorner.CornerRadius = UDim.new(0, 5)
- buttonCorner.Parent = button
- button.MouseButton1Click:Connect(onClick)
- return button
- end
- -- 📌 Smaller GUI
- local screenGui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui"))
- local mainFrame = Instance.new("Frame", screenGui)
- mainFrame.Size = UDim2.new(0, 300, 0, 380)
- mainFrame.Position = UDim2.new(0.5, -100, 0.5, -140)
- mainFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
- mainFrame.BackgroundTransparency = 0.2
- mainFrame.BorderSizePixel = 0
- mainFrame.Active = true
- mainFrame.Draggable = true
- local uiCorner = Instance.new("UICorner")
- uiCorner.CornerRadius = UDim.new(0, 10)
- uiCorner.Parent = mainFrame
- -- Close Button
- local closeButton = Instance.new("TextButton", mainFrame)
- closeButton.Size = UDim2.new(0, 25, 0, 25)
- closeButton.Position = UDim2.new(1, -30, 0, 5)
- closeButton.Text = "X"
- closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- closeButton.BackgroundColor3 = Color3.fromRGB(200, 0, 0)
- closeButton.Font = Enum.Font.GothamBold
- closeButton.TextSize = 16
- local closeCorner = Instance.new("UICorner")
- closeCorner.CornerRadius = UDim.new(0, 5)
- closeCorner.Parent = closeButton
- closeButton.MouseButton1Click:Connect(function()
- mainFrame.Visible = false
- end)
- -- Create Buttons
- createButton(mainFrame, "Subterfuge", UDim2.new(0.1, 0, 0.1, 0), Color3.fromRGB(30, 60, 90), function()
- playAnimation("Subterfuge")
- end)
- createButton(mainFrame, "Miss The Quiet", UDim2.new(0.1, 0, 0.24, 0), Color3.fromRGB(0, 0, 255), function()
- playAnimation("MissTheQuiet")
- end)
- createButton(mainFrame, "Shucks", UDim2.new(0.1, 0, 0.38, 0), Color3.fromRGB(255, 165, 0), function()
- playAnimation("Shucks")
- end)
- createButton(mainFrame, "Hakari Dance", UDim2.new(0.1, 0, 0.52, 0), Color3.fromRGB(57, 255, 20), function()
- playAnimation("HakariDance")
- end)
- createButton(mainFrame, "Silly Billy", UDim2.new(0.1, 0, 0.66, 0), Color3.fromRGB(255, 105, 180), function()
- playAnimation("SillyBilly")
- end)
- createButton(mainFrame, "Sukuna", UDim2.new(0.1, 0, 0.66, 0), Color3.fromRGB(255, 0, 0), function()
- playAnimation("Sukuna")
- end)
- createButton(mainFrame, "Stop Emote", UDim2.new(0.1, 0, 0.80, 0), Color3.fromRGB(255, 50, 50), stopAnimation)
- -- 🎉 Restored "Made by: Ice" Label
- local creditLabel = Instance.new("TextLabel", mainFrame)
- creditLabel.Size = UDim2.new(0.8, 0, 0.08, 0)
- creditLabel.Position = UDim2.new(0.1, 0, 0.92, 0)
- creditLabel.Text = "Made by: Ice"
- creditLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- creditLabel.BackgroundTransparency = 1
- creditLabel.Font = Enum.Font.GothamBold
- creditLabel.TextSize = 14
- creditLabel.TextXAlignment = Enum.TextXAlignment.Center
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement