This is the code:
--Variables--
local Purchase_Req = game.ReplicatedStorage.Replicators.Shop.Purchase_req
local Audio_Controller = game.ReplicatedStorage.Replicators.Misc.Audio_Controller
local Hammer = game.ReplicatedStorage.Tools.Hammer:Clone()
local Purchase = "Purchase_Sound"
local Err_Sound = "Err_Sound"
local deb = false
--<--->--
Purchase_Req.OnServerEvent:Connect(function(player,tool)
--local variables--
local Currency = player:WaitForChild("Currency")
local Bits = Currency.Bits
local Own_Hammer = player:WaitForChild("ToolStat").Hammer
if not deb then deb = true
print("under deb")
if tool == "Hammer" then
if Bits.Value >=10 and Own_Hammer.Value == false then
Own_Hammer.Value = true
Bits.Value = Bits.Value -10
Hammer.Parent = player.Backpack
Audio_Controller:FireClient(player,Purchase)
elseif Bits.Value <10 or Own_Hammer.Value == true then
print("Wrong elseif stateent")
Audio_Controller:FireClient(player,Err_Sound)
end
print("run") --This one--
if tool == "Shovel" then
print("Shovel")
end
end
end
wait(1)
deb = false
end)

2 comments
Oh, now i get it thanks for helping me! I would have never guessed it was that part that was wrong.
No problem bud!