Hello, i need to make a gamepass that increases the player’s head by X2.
so i want to edit my script and make it X2 when gamepass is owned,
Can anyone help?
local function IncreaseHeadSize(player: Player)
player.Character.Humanoid.HeadScale.Value += 0.03
end
game:GetService(“Players”).PlayerAdded:Connect(function(player)
while true do
task.wait(1)
pcall(coroutine.wrap(IncreaseHeadSize), player)
end
end)
This is a script in ServerScriptService, It checks if the player has a gamepass when they join, If they do. It increases their head size by 2x.
local marketplaceS = game:GetService("MarketplaceService") --Marketplace Service
local Players = game:GetService("Players") --Player Service
local gamepassid = 0 --GamepassId
Players.PlayerAdded:Connect(function(player) --When a player joins
local char = player.Character or player.CharacterAdded:Wait() --Getting the character from the player
if marketplaceS:UserOwnsGamePassAsync(player.UserId, gamepassid) then --if the player has the gamepass
char.Humanoid.HeadScale.Value = char.Humanoid.HeadScale.Value * 2 -- change the head size
end
end)