I made this is (which took me a week to finish it from watching videos) and what I want to do is add sounds to each of them. Like when someone is a murder, sheriff, or innocent and there is a sound to it when it says it. Also when one of them wins, there is a victory or losing sound as well. Just like any other murder games or mainly like TMM. Please tell me where to put it. This is the script I made:
--Made by benthekarateboy
local gui = script.Parent
local player = game.Players.LocalPlayer
local replicatedstorage = game:GetService("ReplicatedStorage")
local statustag = replicatedstorage:WaitForChild("StatusTag")
local timertag = replicatedstorage:WaitForChild("TimerTag")
local statustitle = gui:WaitForChild("StatusTitle")
local event = replicatedstorage:WaitForChild("RemoteEvent")
local pointsvalue = player:WaitForChild("Points")
local multipliervalue = player:WaitForChild("Multiplier")
local emeraldswordvalue = player:WaitForChild("EmeraldSword")
local resultprompt = gui:WaitForChild("ResultPrompt")
local resultname = resultprompt:WaitForChild("ResultName")
local resultdesc = resultprompt:WaitForChild("ResultDescription")
local classprompt = gui:WaitForChild("ClassPrompt")
local classname = classprompt:WaitForChild("ClassName")
local classdesc = classprompt:WaitForChild("ClassDescription")
local pointslabel = gui:WaitForChild("PointsLabel")
local pointsbutton = pointslabel:WaitForChild("Button")
local pointstext = pointslabel:WaitForChild("DisplayText")
local killerchance = gui:WaitForChild("KillerChance")
local killerchancebutton = killerchance:WaitForChild("Button")
local killerchancetext = killerchance:WaitForChild("DisplayText")
local emeraldswordbutton = gui:WaitForChild("EmeraldSwordButton")
local killerchancewindow = gui:WaitForChild("KillerChanceWindow")
local killerchancebuy = killerchancewindow:WaitForChild("BuyButton")
local killerchanceclose = killerchancewindow:WaitForChild("XButton")
local emeraldswordwindow = gui:WaitForChild("EmeraldSwordWindow")
local emeraldswordbuy = emeraldswordwindow:WaitForChild("BuyButton")
local emeraldswordclose = emeraldswordwindow:WaitForChild("XButton")
function secondstotimer(seconds)
local minutes = math.floor(seconds / 60)
local remainingseconds = seconds % 60
if remainingseconds <= 0 then
remainingseconds = "00"
elseif remainingseconds <= 9 then
remainingseconds = "0" .. tostring(remainingseconds)
else
remainingseconds = tostring(remainingseconds)
end
return tostring(minutes) .. ":" .. remainingseconds
end
function updatestatus()
if timertag.Value < 0 then
statustitle.Text = statustag.Value
else
statustitle.Text = statustag.Value .. " (" .. secondstotimer(timertag.Value) .. ")"
end
if statustag.Value == "Intermission" then
statustitle.TextColor3 = Color3.new(203/255, 1, 1)
elseif statustag.Value == "Match" then
statustitle.TextColor3 = Color3.new(1, 1, 203/255)
elseif statustag.Value == "Loading Map" or statustag.Value == "Waiting for Players" then
statustitle.TextColor3 = Color3.new(203/255, 1, 203/255)
end
end
timertag.Changed:connect(updatestatus)
statustag.Changed:connect(updatestatus)
updatestatus()
event.OnClientEvent:connect(function(...)
local tuple = {...}
if tuple[1] == "Result" then
if tuple[2] == "KillerWin" then
resultname.Text = "Mad Killer Wins!"
resultname.TextColor3 = Color3.new(1, 74/255, 77/255)
resultdesc.Text = "All players were killed."
else
resultname.Text = "Players Win!"
resultname.TextColor3 = Color3.new(111/255, 149/255, 1)
resultdesc.Text = "The Mad Killer was captured."
end
resultprompt.Visible = true
resultprompt.Position = UDim2.new(0, -400, .5, -92)
resultprompt:TweenPosition(UDim2.new(.5, -170, .5, -92), "Out", "Quad", 1)
wait(7)
resultprompt:TweenPosition(UDim2.new(1, 60, .5, -92), "Out", "Quad", 1)
elseif tuple[1] == "Class" then
if tuple[2] == "Killer" then
classname.Text = "You are the Mad Killer"
classname.TextColor3 = Color3.new(1, 74/255, 77/255)
classdesc.Text = "Your goal is to kill everyone!"
elseif tuple[2] == "Sheriff" then
classname.Text = "You are the Sheriff"
classname.TextColor3 = Color3.new(111/255, 149/255, 1)
classdesc.Text = "Your goal is to find the Mad Killer and put them away for good!"
else
classname.Text = "You are an Eyewitness"
classname.TextColor3 = Color3.new(117/255, 1, 156/255)
classdesc.Text = "Help the Sheriff find the Mad Killer."
end
classprompt.Visible = true
classprompt.Position = UDim2.new(0, -400, .5, -92)
classprompt:TweenPosition(UDim2.new(.5, -170, .5, -92), "Out", "Quad", 1)
wait(7)
classprompt:TweenPosition(UDim2.new(1, 60, .5, -92), "Out", "Quad", 1)
end
end)
function updatepoints()
pointstext.Text = pointsvalue.Value
end
pointsvalue.Changed:connect(updatepoints)
updatepoints()
function updatemultiplier()
killerchancetext.Text = "x " .. multipliervalue.Value
end
multipliervalue.Changed:connect(updatemultiplier)
updatemultiplier()
function updateemeraldsword()
if emeraldswordvalue.Value == 0 then
emeraldswordbuy.Visible = true
else
emeraldswordbuy.Visible = false
end
end
emeraldswordvalue.Changed:connect(updateemeraldsword)
updateemeraldsword()
function closewindows()
emeraldswordwindow.Visible = false
killerchancewindow.Visible = false
end
killerchanceclose.MouseButton1Down:connect(closewindows)
emeraldswordclose.MouseButton1Down:connect(closewindows)
killerchancebuy.MouseButton1Down:connect(function()
event:FireServer("Buy", "KillerChance")
closewindows()
end)
emeraldswordbuy.MouseButton1Down:connect(function()
event:FireServer("Buy", "EmeraldSword")
closewindows()
end)
pointsbutton.MouseButton1Down:connect(function()
closewindows()
event:FireServer("Buy", "100Points")
end)
killerchancebutton.MouseButton1Down:connect(function()
if killerchancewindow.Visible then
closewindows()
else
closewindows()
killerchancewindow.Visible = true
end
end)
emeraldswordbutton.MouseButton1Down:connect(function()
if emeraldswordwindow.Visible then
closewindows()
else
closewindows()
emeraldswordwindow.Visible = true
end
end)
Please tell me where to put it.

1 comment
I am sorry, but it is hard for me to explain it to them and plus I have been hearing people to put code in which made me do these things. I wanted to make my game finally better.