So, basically I was making my own Admin Commands, and I don't know how to make the ":gear" command.
Admin command script:
local admins = {"mateja1119"}
game.Players.PlayerAdded:Connect(function(plr)
for i,v in ipairs(admins) do
if plr.Name == admins then
plr.Chatted:connect(function(msg)
if msg:sub(1,6) == ":speed " then
local targetplr = game.Players:FindFirstChild(msg:sub(7))
if targetplr then
local targetplrchar = targetplr.Character
if targetplrchar then
local speed = msg:sub(8)
if speed then
targetplrchar.Humanoid.WalkSpeed = speed
end
end
end
end
if msg:sub(1,6) == ":kill " then
local targetplr0 = game.Players:FindFirstChild(msg:sub(7))
if targetplr0 then
targetplr0.Character:BreakJoints()
end
end
if msg:sub(1,5) == ":god " then
local targetplr1 = game.Players:FindFirstChild(msg:sub(6))
if targetplr1 then
targetplr1.Character.Humanoid.Health = math.huge()
end
end
if msg:sub(1,6) == ":kick " then
local targetplr2 = game.Players:FindFirstChild(msg:sub(7))
if targetplr2 then
targetplr2:Kick("Kicked!")
end
end
if msg:sub(1,6) == ":gear " then
print("oof idk how to make")
end
end)
end
end
end)
oof.

2 comments
https://developer.roblox.com/api-reference/function/InsertService/LoadAsset - use this
the loadasset function works. thanks.