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: GamePass VIP gui. Help?

Previous Thread :: Next Thread 
GraniteSphere is not online. GraniteSphere
Joined: 09 Aug 2012
Total Posts: 237
06 Feb 2013 12:05 PM
This doesnt seem to work. Clould i have some help with it?
i have added some tags to make it easier to understand what its doing, or what its suposed to do :/




while wait() do
local user = script.Parent.Parent.Parent
local Gui = script.parent --BillboardGui
if Game:GetService("GamePassService"):PlayerHasPass(user, 105811816) then --If player have gamepass
Gui.Parent = user.Character
Gui.Adornee = user.Character.Head
Gui.StudsOffset=Vector3.new(0.7,5,0)
elseif user.Name == "GraniteSphere" then --Creator doesn't need VIP
Gui:remove()
print("No Need For VIP")
else
Gui:remove() -- Non-VIPs doesn't need it either i guess....
print("Not VIP")
end
if Gui.Parent == user.Character then --Dubble check if the gui is within a VIP
print("VIP Recived Logo")
script:remove() -- If it's within a VIP then it's no need for this script anymore.
end
end
Report Abuse
kingbowler1040 is not online. kingbowler1040
Joined: 03 Oct 2011
Total Posts: 1202
06 Feb 2013 12:09 PM
Can wait() be empty like that? I thought it needed atleast .1 or something. I could be wrong, im new at scripting

-Beginner Scripter
Report Abuse
1WOOF1 is not online. 1WOOF1
Joined: 03 May 2009
Total Posts: 20682
06 Feb 2013 12:09 PM
[ Content Deleted ]
Report Abuse
kingbowler1040 is not online. kingbowler1040
Joined: 03 Oct 2011
Total Posts: 1202
06 Feb 2013 12:10 PM
Any output?
Report Abuse
GraniteSphere is not online. GraniteSphere
Joined: 09 Aug 2012
Total Posts: 237
06 Feb 2013 12:13 PM
No errors of any kind.
Report Abuse
GraniteSphere is not online. GraniteSphere
Joined: 09 Aug 2012
Total Posts: 237
06 Feb 2013 12:14 PM
Neither does the output show print.
Report Abuse
kingbowler1040 is not online. kingbowler1040
Joined: 03 Oct 2011
Total Posts: 1202
06 Feb 2013 12:14 PM
Is it in a "Part" or a "Gui" frame?
Report Abuse
GraniteSphere is not online. GraniteSphere
Joined: 09 Aug 2012
Total Posts: 237
06 Feb 2013 12:16 PM
It's a BillboardGui with an Imagelabel within.
Report Abuse
kingbowler1040 is not online. kingbowler1040
Joined: 03 Oct 2011
Total Posts: 1202
06 Feb 2013 12:19 PM
Is it possible to create a function in a ImageLabel besides changing the picture? Like your script for instance, I may be able to fix the problem with my bro's Script Generator.
Report Abuse
GraniteSphere is not online. GraniteSphere
Joined: 09 Aug 2012
Total Posts: 237
06 Feb 2013 12:24 PM
I don't get what you mean...
Report Abuse
Zakarii is not online. Zakarii
Joined: 03 Aug 2009
Total Posts: 102
06 Feb 2013 12:29 PM
player = game.Player.LocalPlayer
ui = script.Parent

while wait(5) do
if (game:GetService('GamePassService'):PlayerHasPass(user, 105811816)) then
ui.Adornee = player.Character.Head
ui.StudsOffset = Vector3.new(0.7, 5, 0)
ui.Parent = player.Character.Head
elseif (player.Name:lower() == 'granitesphere') then
print 'Player ' player.Name ' is the creator of the game.'
else
script:Destroy()
end

if (ui:IsDecendantOf(player.Character))
print 'Player ' player.Name ' received VIP.'
break
end
end
Report Abuse
Zakarii is not online. Zakarii
Joined: 03 Aug 2009
Total Posts: 102
06 Feb 2013 12:31 PM
Put this in a LocalScript inside a billboard UI, and put the billboard UI inside StarterGui.

I forgot something, though.
You don't need 'break', instead, you can destroy the script.
This will continue looping unless you break the loop after the 'elseif', or destroy it.
Report Abuse
GraniteSphere is not online. GraniteSphere
Joined: 09 Aug 2012
Total Posts: 237
06 Feb 2013 12:50 PM
That didn't work :/ you also forgot to change the "user" to "player" of the gamepass part.
Report Abuse
Zakarii is not online. Zakarii
Joined: 03 Aug 2009
Total Posts: 102
06 Feb 2013 12:59 PM
I also forgot a "then".
Report Abuse
GraniteSphere is not online. GraniteSphere
Joined: 09 Aug 2012
Total Posts: 237
06 Feb 2013 01:01 PM
I also did place that there. Still didn't work :/
Report Abuse
Zakarii is not online. Zakarii
Joined: 03 Aug 2009
Total Posts: 102
06 Feb 2013 01:02 PM
If my Studio '13 would stop crashing, I'd be able to test it.
Report Abuse
Zakarii is not online. Zakarii
Joined: 03 Aug 2009
Total Posts: 102
06 Feb 2013 01:07 PM
It doesn't seem to work in Solo.

Have you tried it in a server?
Report Abuse
GraniteSphere is not online. GraniteSphere
Joined: 09 Aug 2012
Total Posts: 237
06 Feb 2013 01:18 PM
Yes, didn't work there either.
Report Abuse
triston220 is not online. triston220
Joined: 08 Mar 2010
Total Posts: 1861
06 Feb 2013 03:40 PM
Why are you using a loop?
Report Abuse
Zakarii is not online. Zakarii
Joined: 03 Aug 2009
Total Posts: 102
06 Feb 2013 03:41 PM
In the case it cannot give VIP to the player, it will retry (in five seconds), otherwise, it will remove itself.
Report Abuse
Zakarii is not online. Zakarii
Joined: 03 Aug 2009
Total Posts: 102
06 Feb 2013 03:44 PM
Below should work; if it doesn't, then I don't know what to say.


Script Type: LocalScript
Script Source: StarterGui > BillboardGui > LocalScript > Value


player = game.Player.LocalPlayer
ui = script.Parent

while wait(5) do
if (game:GetService('GamePassService'):PlayerHasPass(user, 105811816)) then
ui.Adornee = player.Character.Head
ui.StudsOffset = Vector3.new(0.7, 5, 0)
ui.Parent = player.Character.Head
elseif (player.Name:lower() == 'granitesphere') then
print 'Player ' player.Name ' is the creator of the game.'
script.Parent:Destroy()
else
print 'Player ' player.Name ' does not have VIP.'
script.Parent:Destroy()
end

if (ui:IsDecendantOf(player.Character))
print 'Player ' player.Name ' received VIP.'
script.Parent:Destroy()
end
end
Report Abuse
Zakarii is not online. Zakarii
Joined: 03 Aug 2009
Total Posts: 102
06 Feb 2013 03:45 PM
And, of course, I forgot the "then" on line 17, and I forgot to change "user" to "player" on line 5.
Report Abuse
GraniteSphere is not online. GraniteSphere
Joined: 09 Aug 2012
Total Posts: 237
06 Feb 2013 03:56 PM
I can't test it at the moment... looks like roblox updated studio with a great update which makes it crash every time i try to open edit.

Will tell ya how it goes when i get it working again.
Report Abuse
GraniteSphere is not online. GraniteSphere
Joined: 09 Aug 2012
Total Posts: 237
06 Feb 2013 11:39 PM
Doesn't seem to work :/ i even tried to add the 'Remote Error Monitor Script' to see if the errors only come in multiplayer, which they didnt. no errors, nor does it work... i'm clueless :(
Report Abuse
GraniteSphere is not online. GraniteSphere
Joined: 09 Aug 2012
Total Posts: 237
07 Feb 2013 07:06 AM
I managed to get it working.. well most of it, It does give the gui to VIP and not to people that doesnt have VIP but it does also give it to the owner...



while wait() do
local ui = script.Parent
local user = script.Parent.Parent.Parent
if (game:GetService('GamePassService'):PlayerHasPass(user, 105811816)) then
ui.Parent = user.Character
ui.Adornee = user.Character.Head
ui.StudsOffset = Vector3.new(0.7, 5, 0)
elseif user.Name == 'granitesphere' then
ui.ImageLabel.Visible = false
ui:remove()
print "Creator Doesn't Need VIP"
else ui:remove()
print 'No VIP GamePass'
end
if ui.Parent == user.Character then
print 'VIP Given'
script:remove()
end
end

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