local replicated = game:GetService("ReplicatedStorage")
local kickplayer = replicated:WaitForChild("KickPlayer")
local player = game.Players.localPlayer
local playergui = player.PlayerGui
local objective1 = player.playergui:WaitForChild("ShoppingList").Frame.ObjectiveOne
local objective2 = player.playergui:WaitForChild("ShoppingList").Frame.ObjectiveTwo
local objective3 = player.playergui:WaitForChild("ShoppingList").Frame.ObjectiveThree
local objective4 = player.playergui:WaitForChild("ShoppingList").Frame.ObjectiveFour
 if objective1.Text == "------" and objective2.Text == "------" and objective3.Text == "------" 
and objective4.Text == "------"then
kickplayer:FireServer(player, "you got all the items on the shopping list!")

end

other script:

local replicated = game:GetService("ReplicatedStorage")
local kickplayer = replicated:WaitForChild("KickPlayer")
kickplayer.OnServerEvent:Connect(function(player, message)
    if player then
        player:Kick(message)
  
end
end)

im not too sure where they go, and im not sure if they are correct, im trying to make it so when you click multiple items itll kick you out of the game, but it wont work. help? just saying im not very experienced with scripting, so just to clarify.

5 comments

0

Please put your scripts in a code block. Edit this post and click the Lua code icon to create code block.

0

alright

0

there

0

Put the local script in StarterGui and the server script in ServerScriptService.

0

it didnt work