Uhm…its my first time Posting but can anyone help me on how to script a Loader and MainModule like when you chat a Gui will pop up and show you the Available Commands i tried it many times it doesnt Work pls help…If your thinking that ill use HD Admin or any Admin Commands…The Answer is that i want to create my own but i need help
Can you show me the script, please ?
Do you want a script that brings a UI up?
Is it ok? im to shy to ask tho
Yeah Sure but the Script isnt mine its from Scripting helpers…Now how do i send script?
local players = game:GetService(“Players”)
local server = game:GetService(“ServerStorage”)
local vehicleGui = server.VehicleGui --Example vehicle gui.
local groupId = 0 --Change to ID of group.
local groupRank = 0 --Change to required group rank.
players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
if message:lower():match("^/vehicles") then
local success1, result1 = pcall(function()
return player:IsInGroup(groupId)
end)
if success1 then
if result1 then
print(result1)
local success2, result2 = pcall(function()
return player:GetRankInGroup(groupId)
end)
if success2 then
if result2 then
print(result2)
if result2 >= groupRank then
vehicleGui:Clone().Parent = player.PlayerGui --Clone gui into player's "PlayerGui" folder.
--Other code here.
end
end
else
warn(result2)
end
end
else
warn(result1)
end
end
end)
end)
Script made by forummer.
local args = {}
args.admins = {}
args.funCommands = true
– etc.
local module = require(12345678)
module:setup(args)
thats the Loader Script…that was shown
local module = {}
local args
local admins
game.Players.PlayerAdded:connect(function(p)
repeat wait() until args and admins
if admins[p.Name] or admins[p.UserId] then
p.Chatted:connect(function(msg,rec)
-- player stuff here
end)
end
end)
function module:setup(arguments)
args = arguments
admins = args.admins
print("Fun commands " ..("enabled" and args.funCommands == true) or ("disabled" and args.funCommands == false).."!")
end
return module
thats the MainModule from Scripting Helpers
where do i put the Script? in what Script the MainModule?
Wait is that for a Vehicle Gui? Like for Cars?
Well you can change the script to anything, like lists of commands, vehicles, or anything really. vehicle is just a example of what I use it for. But it is a script and it would go in server script storage.
ok thxxxx i have a screenshot on what the Admin Gui looks like
its like Kohl’s Admin that has all Different Commands but in my own Version
What is the GUI’s name? I can set the script up for you
ok thank you its name is “Commands”
btw…is it ok if you script the Admin Commands if its ok bc i dont know how to script…you can always say no but if its ok pls do i really need help bc i made my own game by myself no help only me im a solo dev cuz i dont have robux
local players = game:GetService(“Players”)
local server = game:GetService(“ServerStorage”)
local vehicleGui = server.Commands – Make sure the UI is in serverstorage
local groupId = 0 --Change to ID of group.
local groupRank = 0 --Change to required group rank.
players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
if message:lower():match("^:cmds") then
local success1, result1 = pcall(function()
return player:IsInGroup(groupId)
end)
if success1 then
if result1 then
print(result1)
local success2, result2 = pcall(function()
return player:GetRankInGroup(groupId)
end)
if success2 then
if result2 then
print(result2)
if result2 >= groupRank then
vehicleGui:Clone().Parent = player.PlayerGui --Clone gui into player's "PlayerGui" folder.
--Other code here.
end
end
else
warn(result2)
end
end
else
warn(result1)
end
end
end)
end)