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

VIP Special Stuff?

player = game.Players.LocalPlayer
RW = player.leaderstats.RW
local passId = 157223223
 
function isAuthenticated(player)
    return game:GetService("GamePassService"):PlayerHasPass(player, passId)
end
 
game.Players.PlayerAdded:connect(function(plr)
    if isAuthenticated(plr) then
        if player.Name == Beast then
		RW.Value = 10
else
	   if player.Name == Beast then
		RW.Value = 0
    		end
	end
	end
end)

Would that work if I wanted to Reset the Normal Players Stat fully, but if ur VIP then u get 10 instead of 0 wen u become Beast (This is not to give to much chance to 1 Player, cos he'll become the Beast all the time until he leaves) so I hope I got this right, if not then plz tell me wats wrong with the Script

2 answers

Hello, thank you for submitting your question. But however, please use grammar and please explain it to all of the viewers, a place where you may have made an error is

LINE 11 AND 14 Change to

if Player.Name = "Beast" then

2 comments

0

how? I got not other way... wait a second! hmm... do I insert this Script into the Beast Picker Script so that I wouldn't have to keep searching for who's the Beast? I just say that the Beast gets his stats reset but if he has the VIP then his stats are jsut set to 10?

0

Try putting it all into one script.

LocalScripts and PlayerAdded arent friendly with each other

Also what is this script trying to do?


local passId = 157223223

function isAuthenticated(player)
    return game:GetService("GamePassService"):PlayerHasPass(player, passId)
end

game.Players.PlayerAdded:connect(function(plr)
Instance.new("IntValue", plr).Name = "leaderstats"
Instance.new("IntValue", plr.leaderstats).Name = "RW"
    if isAuthenticated(plr) then
        if player.Name == "Beast" then
        plr.leaderstats.RW.Value = 10

else
       if player.Name == "Beast" then

        plr.leaderstats.RW.Value = 0
            end
    end
    end
end)

Thts a temporary fix, I can still see other glaring errors (i.e. player.Name == "Beast")

1 comment

0

I mean not adding stats, just Resetting them wen player has become Beast...

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