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

This script is too unreliable! Help?

Hey guys,

I have this script that check the player for a gamepass before making a GUI visible. The script however is too unreliable and keeps giving people bikes for free every once and a while! It's hurting my advertising profit and I have made losses over the last two weeks! ;-;

Does anyone have a solution with a better script?

--// Initialization

local GamePassService = game:GetService("GamePassService")

--// Variables

gamepass1 = 256633733

--// Functions

function onCharacterSpawn(character)
  local player = game.Players:GetPlayerFromCharacter(character)

  if GamePassService:PlayerHasPass(player, gamepass1) then
    script.Parent.Parent.Spawn.Visible = true
    script.Parent.Visible = false
    script.Parent.Parent.Parent.OwnedBikes.Bike12.Visible = true
  end
end

--// Triggers

game.Workspace.ChildAdded:connect(onCharacterSpawn)

Cheers,

Michael

1 answer

✓ Accepted answer

This current version you have here is very un-secure. I have made a better system for you that will make it secure and more efficient. Verifying on the client is a big no no as it can be easily exploited. Here is a link to a roblox model that has all the instructions inside on how to set it up. http://www.roblox.com/For-Scripting-Helpers-item?id=258776114

1 comment

0

Well, the scipt works, but there was also a -1 rep. Whoever did it must of had a reason?

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