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

'=' expected near 'Beast'?

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)

1 comment

0

Oops! lol found 1 thing...

2 answers

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...

2 comments

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...

0

I took your 2nd one and edited it.

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'

1 comment

0

wats wrong now!!? am sharing my attempts and all I get is Thumbs Down!!?

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