Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 9 years ago

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

Log in to vote
1
Answered by
25564 200 Moderation Voter
9 years ago
pcall(function()
    game.Players.PlayerAdded:connect(function(player)
        if player:IsInGroup(7) then
            --Put the effect here
        end
    end)
)

Wiki Link

0
At the (7) part is that where you put the ID? TixyScripter 115 — 9y
0
Yes 25564 200 — 9y
Ad

Answer this question