Skip to content

Commit

Permalink
Added "head" command
Browse files Browse the repository at this point in the history
Added "head" command to change the package of a player's head, because it didn't exist for some reason.
  • Loading branch information
karl-police authored Dec 3, 2021
1 parent 8e83f4d commit bcebec6
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions MainModule/Server/Commands/Fun.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3919,6 +3919,30 @@ return function(Vargs, env)
model:Destroy()
end
};

Head = {
Prefix = Settings.Prefix;
Commands = {"head", "headpackage"};
Args = {"player", "id"};
Hidden = false;
Description = "Change the target player(s)'s Head package";
Fun = true;
AdminLevel = "Moderators";
Function = function(plr: Player, args: {string})
local id = service.MarketPlace:GetProductInfo(args[2]).AssetTypeId
assert(id == 17, "ID is not a head!")

local model = service.Insert(args[2], true)

for i, v in pairs(service.GetPlayers(plr, args[1])) do
if v.Character then
Functions.ApplyBodyPart(v.Character, model)
end
end

model:Destroy()
end
};

LoopFling = {
Prefix = Settings.Prefix;
Expand Down

0 comments on commit bcebec6

Please sign in to comment.