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

'=' expected near 'Beast'?

Asked by
KAAK82 16
10 years ago
player = game.Players.LocalPlayer
RW = player.chancestats.RW
local passId = 157223223

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

game.Players.PlayerAdded:connect(function(plr)
    _G Beast
            if isAuthenticated(Beast) then
            RW.Value = 10
else
            Beast
            RW.Value = 0
            end
    end
    end
end)
0
Oops! lol found 1 thing... KAAK82 16 — 10y

2 answers

Log in to vote
0
Answered by
lomo0987 250 Moderation Voter
10 years ago
player = game.Players.LocalPlayer
RW = player.chancestats.RW
local passId = 157223223

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

game.Players.PlayerAdded:connect(function(plr)
_G.Beast.RW = 0
if isAuthenticated(Beast) then
            RW.Value = 10
            end
        end)

You had 'elseif', it should be just 'if' and your ends was a bit messed up...

0
k thnx, but check out my Edit for a newer Version, cos I realised it might be shorter and better if I did something and so am experementing... KAAK82 16 — 10y
0
I took your 2nd one and edited it. lomo0987 250 — 10y
Ad
Log in to vote
-1
Answered by
KAAK82 16
10 years ago

Edited

Beast = _G Beast
RW = Beast.chancestats.RW
local passId = 157223223

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

game.Players.PlayerAdded:connect(function(plr)
Beast.RW.Value = 0
elseif isAuthenticated(player) then
            Beast.RW.Value = 10
            end
    end
end

My newer Script, now says it needs an end near elseif, but wen I add it, it says eof expected near elfeif EDIT1: '=' expected near 'RW'

0
wats wrong now!!? am sharing my attempts and all I get is Thumbs Down!!? KAAK82 16 — 10y

Answer this question