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

VIP Special Stuff?

Asked by
KAAK82 16
10 years ago
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

Log in to vote
0
Answered by 10 years ago
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
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? KAAK82 16 — 10y
0
Try putting it all into one script. RolandStudio 115 — 10y
Ad
Log in to vote
0
Answered by
wazap 100
10 years ago

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")

0
I mean not adding stats, just Resetting them wen player has become Beast... KAAK82 16 — 10y

Answer this question