--\\ Settings //--

local GroupID = 3640745

local MinimalRank = 5
-- Do NOT set to 0! If set to 0, EVERY player will get the GUI. If you aren't using the group feature, leave this at 5.

local WorkerList = {["gogo6104"] = true,["Another Friend"] = true}
-- To add more workers, simply add a comma and copy the [""] = true after it. After every entry, there should be a comma, EXCEPT for the last one.

local starterGui = false
-- Change this to true if you want every player to have the GUI.

--\\ Actual Script //--


local eventStorage = game:GetService("ReplicatedStorage")

local handToEvent = Instance.new("RemoteEvent", eventStorage)
handToEvent.Name = "HandTo"

eventStorage.HandTo.OnServerEvent:connect(function(requester, target)
	for _,child in ipairs(requester.Character:GetChildren()) do
		if child:IsA("Tool") then
			child.Parent = game.Players[target].Backpack
			print(requester.Name.." has given ("..child.Name..") to: "..target)
		end
	end
end)

game.Players.PlayerAdded:connect(function(player)
	player.CharacterAdded:connect(function()
		if WorkerList[player.Name] or player:GetRankInGroup(GroupID) >= MinimalRank or starterGui == true then
			script["HandTo"]:Clone().Parent = player.PlayerGui
		end
	end)
end)

2 comments

0

PlayerGUI resets every respawn and recollect GUIs or stuffs in StarterGUI

0

How to fix it /: not sure how to i am newbie my friend made it for me