generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Shop gamepass?

Previous Thread :: Next Thread 
TheProM is not online. TheProM
Joined: 27 Mar 2013
Total Posts: 436
02 Sep 2014 02:48 PM
i want only people that bought vip allowed to buy please help C;

script:
local t = 0

script.Parent.MouseButton1Click:connect(function()
if Game:GetService("GamePassService"):PlayerHasPass(Player, 175478409) then
if game.Players.LocalPlayer.leaderstats.Cash.Value >= 300 then
if t == 0 then
t = 1
game.Lighting.gravcoil:Clone().Parent = game.Players.LocalPlayer.BackPack
wait(1)
game.Lighting.gravcoil:Clone().Parent = game.Players.LocalPlayer.Starterpack
script.Parent.Text = "GravCoil given!"
else
script.Parent.Text = "This feature is for VIP"
end
end
end
end)
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
02 Sep 2014 02:51 PM
Backpack*

and you used Player which isnt indexed
Report Abuse
TheProM is not online. TheProM
Joined: 27 Mar 2013
Total Posts: 436
02 Sep 2014 02:53 PM
player = script.Parent.Parent.Parent.Parent.Parent.Parent ?
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
02 Sep 2014 02:54 PM
Player=game.Players.LocalPlayer
Report Abuse
TheProM is not online. TheProM
Joined: 27 Mar 2013
Total Posts: 436
02 Sep 2014 02:56 PM
*facepalm*
Report Abuse
TheProM is not online. TheProM
Joined: 27 Mar 2013
Total Posts: 436
02 Sep 2014 03:00 PM
So like this?

local t = 0
Player=game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
if Game:GetService("GamePassService"):PlayerHasPass(Player, 175478409) then
if game.Players.LocalPlayer.leaderstats.Points.Value >= 300 then
if t == 0 then
t = 1
game.Lighting.gravcoil:Clone().Parent = game.Players.LocalPlayer.Backpack
wait(1)
game.Lighting.gravcoil:Clone().Parent = game.Players.LocalPlayer.Starterpack
script.Parent.Text = "GravCoil given!"
else
script.Parent.Text = "This feature is for VIP"
end
end
end
end)
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
02 Sep 2014 03:03 PM
local t = 0
Player=game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
if Game:GetService("GamePassService"):PlayerHasPass(Player, 175478409) then
if game.Players.LocalPlayer.leaderstats.Points.Value >= 300 then
if t == 0 then
t = 1
game.Lighting.gravcoil:Clone().Parent = game.Players.LocalPlayer.Backpack
wait(1)
game.Lighting.gravcoil:Clone().Parent = game.Players.LocalPlayer.Starterpack
script.Parent.Text = "GravCoil given!"
t=0
end
else
script.Parent.Text = "This feature is for VIP"
end
end
end)
Report Abuse
TheProM is not online. TheProM
Joined: 27 Mar 2013
Total Posts: 436
02 Sep 2014 03:04 PM
Thank you alot! :D
Report Abuse
TheProM is not online. TheProM
Joined: 27 Mar 2013
Total Posts: 436
02 Sep 2014 03:07 PM
Wont work
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
02 Sep 2014 03:12 PM
output?
and do u own the game pass
and it should be a local scirpt
Report Abuse
TheProM is not online. TheProM
Joined: 27 Mar 2013
Total Posts: 436
02 Sep 2014 03:14 PM
Own: Yes
Local: yes
Output: Doesnt say anything o.o
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
02 Sep 2014 03:16 PM
and u got 300 points?
Report Abuse
TheProM is not online. TheProM
Joined: 27 Mar 2013
Total Posts: 436
02 Sep 2014 03:25 PM
Yep
Report Abuse
TheProM is not online. TheProM
Joined: 27 Mar 2013
Total Posts: 436
02 Sep 2014 03:32 PM
I found a way.

Like this:
if game.Players.LocalPlayer.VIP.Value == false then game:GetService("MarketplaceService"):PromptPurchase(game.Players.LocalPlayer,ID)
return
else
Report Abuse
TheProM is not online. TheProM
Joined: 27 Mar 2013
Total Posts: 436
02 Sep 2014 03:46 PM
script.Parent.MouseButton1Click:connect(function()
if game.Players.LocalPlayer.VIP.Value == false then
game:GetService("MarketplaceService"):PromptPurchase(game.Players.LocalPlayer,175478409)
return
else
local t = game.Lighting.gravcoil:Clone()
t.Parent = game.Players.localplayer.Backpack
wait(1)
local t = game.Lighting.gravcoil:Clone()
t.Parent = game.Players.localplayer.Starterpack
end
end)

wont work qq
Report Abuse
TheProM is not online. TheProM
Joined: 27 Mar 2013
Total Posts: 436
03 Sep 2014 08:19 AM
d
Report Abuse
TheProM is not online. TheProM
Joined: 27 Mar 2013
Total Posts: 436
03 Sep 2014 09:54 AM
d
Report Abuse
XanthusServius is not online. XanthusServius
Joined: 11 Jul 2010
Total Posts: 671
03 Sep 2014 10:50 AM
You can't test gamepasses on a testing server.
Report Abuse
TheProM is not online. TheProM
Joined: 27 Mar 2013
Total Posts: 436
04 Sep 2014 08:21 AM
I know. I tested it on real game.
Report Abuse
TheProM is not online. TheProM
Joined: 27 Mar 2013
Total Posts: 436
04 Sep 2014 03:36 PM
d
Report Abuse
TheProM is not online. TheProM
Joined: 27 Mar 2013
Total Posts: 436
05 Sep 2014 06:01 PM
d
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image