Everything works except for the GUI. Also, I am going to fix the script using remote events but I first need to fix this here is the code:
local gui = game.StarterGui.BreethGUI
local UserInputService = game:GetService("UserInputService")
local plr = game.Players.LocalPlayer
--// Checking for key input
UserInputService.InputBegan:Connect(function(inputObject)
if inputObject.UserInputType == Enum.UserInputType.MouseButton1 then
local leaderstats = plr:WaitForChild("leaderstats") if leaderstats then
local Breths = leaderstats:FindFirstChild("Breths") if Breths then
gui.Enabled = true
gui.TextLabel.Visible = true
Breths.Value = Breths.Value + 1
end
end
end
end)
