I'm trying convert this over to LocalScript but it isn't working:
if c.Vip_Suit.VipType.Value == 1 and GPS:PlayerHasPass(p, script.Parent.Rex.Value) then
for _,v in pairs(game.ReplicatedStorage.Game_Tools[c.Vip_Suit.Tool.Value]:GetChildren()) do
if v:IsA("HopperBin") or v:IsA("Tool") then
v:clone().Parent = p.Backpack
end end end
if c.Vip_Suit.VipType.Value == 2 and GPS:PlayerHasPass(p, script.Parent.Sat.Value) then
for _,v in pairs(game.ReplicatedStorage.Game_Tools[c.Vip_Suit.Tool.Value]:GetChildren()) do
if v:IsA("HopperBin") or v:IsA("Tool") then
v:clone().Parent = p.Backpack
end end end
if c.Vip_Suit.VipType.Value == 3 and GPS:PlayerHasPass(p, script.Parent.Fusion.Value) then
for _,v in pairs(game.ReplicatedStorage.Game_Tools[c.Vip_Suit.Tool.Value]:GetChildren()) do
if v:IsA("HopperBin") or v:IsA("Tool") then
v:clone().Parent = p.Backpack
end end end
if c.Vip_Suit.VipType.Value == 4 and GPS:PlayerHasPass(p, script.Parent.Rex.Value) and GPS:PlayerHasPass(p, script.Parent.Sat.Value) then
for _,v in pairs(game.ReplicatedStorage.Game_Tools[c.Vip_Suit.Tool.Value]:GetChildren()) do
if v:IsA("HopperBin") or v:IsA("Tool") then
v:clone().Parent = p.Backpack
end end end
but it is still giving me the error "Game passes can only be queried by a Script running on a ROBLOX game server"
This is at the top of the main script: (where it's looking for the service)
local GPS = Game:GetService("GamePassService")
Is there something wrong with that part instead?

2 comments
GamePassService can not be used via LocalScript. Might I recommend MarketPlaceService's PlayerOwnsAsset instead?
It is recommend that you use PlayerOwnsAsset as it gets the live results from the website and other reasons, http://wiki.roblox.com/index.php?title=API:Class/MarketplaceService/PlayerOwnsAsset