Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I edit this Gamepass Script to a Group Script?

Hello everyone! I just made a ROBLOX development group, and I was wondering how I could edit this Gamepass script to give these stats when someone in a certain group joins, using the ID of the group..

pcall(function()
	game.Players.PlayerAdded:connect(function(player)
		if game.GamePassService:PlayerHasPass(player,185105546) then
			local cashmoney = game.ServerStorage.MoneyStorage:WaitForChild(player.Name)
			cashmoney.Value = cashmoney.Value + 5000
			player.CharacterAdded:connect(function(char)
				if char:WaitForChild("Humanoid") then
					char.Humanoid.MaxHealth = char.Humanoid.MaxHealth + 25
					char.Humanoid.Health = char.Humanoid.Health + 25
					char.Humanoid.WalkSpeed = char.Humanoid.WalkSpeed + 8
					game.Lighting.Minigun:Clone().Parent=player.Backpack
				end
			end)
			local msg = Instance.new("Hint",workspace)
			msg.Text = player.Name.." joined the game with Ultra V.I.P."
			wait(2)
			msg:Destroy()

Any help is appreciated thanks!

1 answer

pcall(function()
	game.Players.PlayerAdded:connect(function(player)
		if player:IsInGroup(7) then
			--Put the effect here
		end
	end)
)

Wiki Link

2 comments

0

At the (7) part is that where you put the ID?

0

Yes

This discussion is preserved as it was. New answers, comments, and votes are closed.