View difference between Paste ID: 0wzfdanM and 5JYPdn3K
SHOW: | | - or go back to the newest paste.
1
local Players = game:GetService("Players")
2
local UserInputService = game:GetService("UserInputService")
3
local Workspace = game:GetService("Workspace")
4
5
local player = Players.LocalPlayer
6
local character = player.Character or player.CharacterAdded:Wait()
7
local humanoid = character:WaitForChild("Humanoid")
8
local animator = humanoid:FindFirstChildOfClass("Animator") or humanoid:WaitForChild("Animator")
9
local head = character:WaitForChild("Head")
10
local camera = Workspace.CurrentCamera
11
12
local originalCameraSubject = camera.CameraSubject
13
local cameraFollowing = false
14
15
local defaultWalkSpeed = humanoid.WalkSpeed
16
local defaultJumpPower = humanoid.JumpPower
17
18
local function startFollowingHead()
19
    if not cameraFollowing then
20
        cameraFollowing = true
21
        camera.CameraSubject = head
22
    end
23
end
24
25
local function stopFollowingHead()
26
    cameraFollowing = false
27
    camera.CameraSubject = originalCameraSubject
28
end
29
30
local function disableMovement()
31
    humanoid.WalkSpeed = 0
32
    humanoid.JumpPower = 0
33
    humanoid:SetStateEnabled(Enum.HumanoidStateType.Running, false)
34
    humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
35
end
36
37
local function enableMovement()
38
    humanoid.WalkSpeed = defaultWalkSpeed
39
    humanoid.JumpPower = defaultJumpPower
40
    humanoid:SetStateEnabled(Enum.HumanoidStateType.Running, true)
41
    humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, true)
42
end
43
44
local animations = {
45
    Subterfuge = "rbxassetid://87482480949358",
46
    MissTheQuiet = "rbxassetid://100986631322204",
47
    Shucks = "rbxassetid://74238051754912",
48
    HakariDance = "rbxassetid://138019937280193",
49
    SillyBilly = "rbxassetid://107464355830477"
50
}
51
52
local sounds = {
53
    Subterfuge = "rbxassetid://132297506693854",
54
    MissTheQuiet = "rbxassetid://131936418953291",
55
    Shucks = "rbxassetid://123236721947419",
56
    HakariDance = "rbxassetid://87166578676888",
57
    SillyBilly = "rbxassetid://77601084987544"
58
}
59
60
local animationObjects = {}
61
local soundObjects = {}
62
63
for name, id in pairs(animations) do
64
    local anim = Instance.new("Animation")
65
    anim.AnimationId = id
66
    animationObjects[name] = anim
67
end
68
69
for name, id in pairs(sounds) do
70
    local sound = Instance.new("Sound", head) -- 📌 Parent to "Head" so others can hear
71
    sound.SoundId = id
72
    sound.Volume = 2
73
    sound.Looped = false
74
    sound.RollOffMode = Enum.RollOffMode.Linear
75
    sound.MaxDistance = 50 -- 🎶 Sets range where others can hear
76
    soundObjects[name] = sound
77
end
78
79
local activeAnimationTrack
80
local activeSound
81
82
local function playAnimation(animationName)
83
    if animator then
84
        if activeAnimationTrack then
85
            activeAnimationTrack:Stop()
86
        end
87
        if activeSound then
88
            activeSound:Stop()
89
        end
90
91
        disableMovement()
92
        startFollowingHead()
93
94
        activeAnimationTrack = animator:LoadAnimation(animationObjects[animationName])
95
        activeAnimationTrack:Play()
96
        
97
        activeSound = soundObjects[animationName]
98
        activeSound:Play()
99
100
        activeAnimationTrack.Stopped:Connect(function()
101
            enableMovement()
102
            stopFollowingHead()
103
        end)
104
    end
105
end
106
107
local function stopAnimation()
108
    if activeAnimationTrack then
109
        activeAnimationTrack:Stop()
110
    end
111
    if activeSound then
112
        activeSound:Stop()
113
    end
114
    enableMovement()
115
    stopFollowingHead()
116
end
117
118
local function createButton(parent, text, position, color, onClick)
119
    local button = Instance.new("TextButton")
120
    button.Size = UDim2.new(0.8, 0, 0.12, 0)
121
    button.Position = position
122
    button.Text = text
123
    button.TextColor3 = Color3.fromRGB(255, 255, 255)
124
    button.BackgroundColor3 = color
125
    button.Font = Enum.Font.GothamBold
126
    button.TextSize = 16
127
    button.Parent = parent
128
129
    local buttonCorner = Instance.new("UICorner")
130
    buttonCorner.CornerRadius = UDim.new(0, 5)
131
    buttonCorner.Parent = button
132
133
    button.MouseButton1Click:Connect(onClick)
134
135
    return button
136
end
137
138
-- 📌 Smaller GUI
139
local screenGui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui"))
140
local mainFrame = Instance.new("Frame", screenGui)
141
mainFrame.Size = UDim2.new(0, 200, 0, 280)
142
mainFrame.Position = UDim2.new(0.5, -100, 0.5, -140)
143
mainFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
144
mainFrame.BackgroundTransparency = 0.2
145
mainFrame.BorderSizePixel = 0
146
mainFrame.Active = true
147
mainFrame.Draggable = true
148
149
local uiCorner = Instance.new("UICorner")
150
uiCorner.CornerRadius = UDim.new(0, 10)
151
uiCorner.Parent = mainFrame
152
153
-- Close Button
154
local closeButton = Instance.new("TextButton", mainFrame)
155
closeButton.Size = UDim2.new(0, 25, 0, 25)
156
closeButton.Position = UDim2.new(1, -30, 0, 5)
157
closeButton.Text = "X"
158
closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
159
closeButton.BackgroundColor3 = Color3.fromRGB(200, 0, 0)
160
closeButton.Font = Enum.Font.GothamBold
161
closeButton.TextSize = 16
162
163
local closeCorner = Instance.new("UICorner")
164
closeCorner.CornerRadius = UDim.new(0, 5)
165
closeCorner.Parent = closeButton
166
167
closeButton.MouseButton1Click:Connect(function()
168
    mainFrame.Visible = false
169
end)
170
171
-- Create Buttons
172
createButton(mainFrame, "Subterfuge", UDim2.new(0.1, 0, 0.1, 0), Color3.fromRGB(30, 60, 90), function()
173
    playAnimation("Subterfuge")
174
end)
175
176
createButton(mainFrame, "Miss The Quiet", UDim2.new(0.1, 0, 0.24, 0), Color3.fromRGB(0, 0, 255), function()
177
    playAnimation("MissTheQuiet")
178
end)
179
180
createButton(mainFrame, "Shucks", UDim2.new(0.1, 0, 0.38, 0), Color3.fromRGB(255, 165, 0), function()
181
    playAnimation("Shucks")
182
end)
183
184
createButton(mainFrame, "Hakari Dance", UDim2.new(0.1, 0, 0.52, 0), Color3.fromRGB(57, 255, 20), function()
185
    playAnimation("HakariDance")
186
end)
187
188
createButton(mainFrame, "Silly Billy", UDim2.new(0.1, 0, 0.66, 0), Color3.fromRGB(255, 105, 180), function()
189
    playAnimation("SillyBilly")
190
end)
191
192
createButton(mainFrame, "Stop Emote", UDim2.new(0.1, 0, 0.80, 0), Color3.fromRGB(255, 50, 50), stopAnimation)
193
194
-- 🎉 Restored "Made by: Ice" Label
195
local creditLabel = Instance.new("TextLabel", mainFrame)
196
creditLabel.Size = UDim2.new(0.8, 0, 0.08, 0)
197
creditLabel.Position = UDim2.new(0.1, 0, 0.92, 0)
198
creditLabel.Text = "Made by: Ice"
199
creditLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
200
creditLabel.BackgroundTransparency = 1
201
creditLabel.Font = Enum.Font.GothamBold
202
creditLabel.TextSize = 14
203
creditLabel.TextXAlignment = Enum.TextXAlignment.Center