diff --git a/Hunter.rbxl b/Hunter.rbxl index 1b2c669..f3ce783 100644 Binary files a/Hunter.rbxl and b/Hunter.rbxl differ diff --git a/scripts/ButtonAudio.client.luau b/scripts/ButtonAudio.client.luau new file mode 100644 index 0000000..e3fa2dc --- /dev/null +++ b/scripts/ButtonAudio.client.luau @@ -0,0 +1,29 @@ +--!strict +local Players = game:GetService("Players") +local ReplicatedStorage = game:GetService("ReplicatedStorage") +local Sounds = require(ReplicatedStorage:WaitForChild("SniperEffects") :: ModuleScript) + +local playerGui = Players.LocalPlayer:WaitForChild("PlayerGui") +local bound: {[GuiButton]: boolean} = setmetatable({}, {__mode = "k"}) + +local function bindButton(instance: Instance) + if not instance:IsA("GuiButton") or bound[instance] then return end + local button = instance + bound[button] = true + + button.MouseEnter:Connect(function() + if button.Active and button.Interactable and button:IsDescendantOf(playerGui) then + Sounds.sound("ButtonHover") + end + end) + button.Activated:Connect(function() + if button:IsDescendantOf(playerGui) then + Sounds.sound("ButtonPress") + end + end) +end + +playerGui.DescendantAdded:Connect(bindButton) +for _, instance in playerGui:GetDescendants() do + bindButton(instance) +end diff --git a/scripts/SniperEffects.luau b/scripts/SniperEffects.luau index a4ff57e..607ce27 100644 --- a/scripts/SniperEffects.luau +++ b/scripts/SniperEffects.luau @@ -41,6 +41,8 @@ local SOUNDS: { [string]: SoundDef } = { StreakAccent = { id = "rbxassetid://3120909354", volume = 0.5, speed = 1, near = 0, far = 0, group = "Kill" }, -- Level_up ReloadReady = { id = "rbxassetid://15675085146", volume = 0.24, speed = 1.15, near = 0, far = 0, group = "Reload", cut = 0.19 }, RoundCountdown = { id = "rbxassetid://113416294133952", volume = 0.48, speed = 1, near = 0, far = 0, group = "HUD" }, -- timer tick + ButtonHover = { id = "rbxassetid://84648433095796", volume = 0.22, speed = 1, near = 0, far = 0, group = "HUD" }, + ButtonPress = { id = "rbxassetid://121882355123711", volume = 0.27, speed = 1, near = 0, far = 0, group = "HUD" }, HotPointStart = { id = "rbxassetid://2789428506", volume = 0.35, speed = 1, near = 0, far = 0, group = "HUD" }, -- Unlock_phoenix HotPointCaptured = { id = "rbxassetid://4612374036", volume = 0.4, speed = 1, near = 0, far = 0, group = "HUD" }, -- bling_big_diamond_pickup MoneyCollect1 = { id = "rbxassetid://84894146013271", volume = 0.15, speed = 1, near = 0, far = 0, group = "Pickup", cut = 0.16 },