First of all, please do not make any requests on this site. Because I am in a good mood, I will help you out. You can do this by checking when a key is down by using the :GetMouse() function.
Local Script that is a child of the GUI:
local admin = {12345, 09876}
local keyBind = "q"
local mouse = game.Players.LocalPlayer:GetMouse()
for i, plr in pairs(admin) do
if game.Players.LocalPlayer.UserId == plr then
mouse.KeyDown:Connect(function(key)
if string.lower(key) == keyBind then
script.Parent.Enabled = true
end
end)
end
end
1 comment
you could do something like if game.Players.LocalPlayer.Name == "Player's Name" then