local template = {Clicks = 0}
local moduleScript = require(script.Parent.ModuleScript)
local remote = game:GetService(“ReplicatedStorage”):WaitForChild(“RemoteEvent”)game:GetService(“Players”).PlayerAdded:Connect(function(player)
print(“setting profile”)
moduleScript.SetProfile(player,template)
end)remote.OnServerEvent:Connect(function(player)
local profile = moduleScript.GetProfile(player)
profile.Clicks += 1print(“clic”)
for _,player in game:GetService(“Players”):GetPlayers() do
print(moduleScript.GetProfile(player))
endend)
local uis = game:GetService(“UserInputService”)
uis.InputBegan:Connect(function(key,bool)
if key.UserInputType == Enum.UserInputType.MouseButton1 then
game:GetService(“ReplicatedStorage”):WaitForChild(“RemoteEvent”):FireServer()
end
end)