-- Local script

local sss = game:GetService("ServerScriptService")
local rs = game:GetService("ReplicatedStorage")
local players = game:GetService("Players")
local player = players.LocalPlayer
local remotes = rs:WaitForChild("Remotes")
local lick = remotes.Lick
local sell = remotes.Sell
local lolipop = script.Parent
local mouse = player:GetMouse()
local clicked = false
local licktimeModule = require(rs.toolLick)
local char = player.Character or player.CharacterAdded:Wait()
local backpack = player.Backpack
local tool_Name = script.Parent.Name

lolipop.Activated:Connect(function()
	
	
	if not clicked then
	
		clicked = true
		lick:FireServer(backpack,char,tool_Name)
		licktimeModule.TloliPop1cooldown()
		clicked = false
	end
	
end)
-- Server script

rs.Remotes.Lick.OnServerEvent:Connect(function(player,backpack,char,tool_Name)
	warn("Lick event fired")
	
	local dataFolder = playerdata:FindFirstChild(player.Name)
	
	local backpack = player.Backpack
	if not	dataFolder then 
		return ("noFile")
	else
		player.leaderstats.Licks.Value = player.leaderstats.Licks.Value + 1
		
		if backpack:FindFirstChild("TloliPop1").Name or char.TloliPop1.Name == tool_Name and player.leaderstats.Licks == toolcapacity.TloliPop1capacity.TloliPop1capacity then
			player.leaderstats.Licks.Value = player.leaderstats.Licks.Value + 0
		end

2 comments

0

??? explain what do you mean with check ?

0

look what is inside it