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: Would this work?

Previous Thread :: Next Thread 
kingmasterfit is not online. kingmasterfit
Joined: 22 Jul 2012
Total Posts: 2773
21 Jul 2013 06:20 PM
This is only part of the script but would this allow players who have the t-shirt, and not needing to wear it to have VIP
if (game:GetService("BadgeService"):UserHasBadge(Player.userId, 72349297)) then -- Check if Player owns x101st Fort Franneh VIP Shirt
        Admin = true
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
21 Jul 2013 06:21 PM
If the ID is right
Report Abuse
BlueTaslem is not online. BlueTaslem
Joined: 11 May 2008
Total Posts: 11060
21 Jul 2013 06:21 PM
Probably; at one point this functionality existed but I don't know if it remains.
This really is what for Game Passes are for, of course.
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
21 Jul 2013 06:22 PM
If the rest of your script is right, then yes. BadgeService(UserHasBadge) returns true if the player's userId owns it and false it doesn't.
Report Abuse
kingmasterfit is not online. kingmasterfit
Joined: 22 Jul 2012
Total Posts: 2773
21 Jul 2013 06:26 PM
A friend gave me the script
local Gun = game.Lighting:findFirstChild("Carbine")
local foundGun = false
if (Gun) then foundGun = true end
local Players = {"kingmasterfit","purged"}
local MaxHealth = 150
-- Variables below are not to be edited
local Admin = false
local Added = function(Player)
    Admin = false
    for i = 1, #Players do
        if (Players[i]:lower() == Player.Name:lower()) then
            Admin = true
        end
    end
    if (game:GetService("BadgeService"):UserHasBadge(Player.userId, 72349297)) then -- Check if Player owns x101st Fort Franneh VIP Shirt
        Admin = true
    end
    if (Admin) then
        repeat wait() until Player.Character
        wait()
        if (Player.Character) then
            if (foundGun) then
                Gun:Clone().Parent = Player.Backpack
            end
            repeat
                Player.Character.Humanoid.MaxHealth = MaxHealth
                Player.Character.Humanoid.Health = MaxHealth
            until Player.Character.Humanoid.Health == MaxHealth
        end
    end
end

game.Players.PlayerAdded:connect(function(Player)
    Added(Player)
    Player.CharacterAdded:connect(function(character)
        Added(Player)
    end)
end)

for i, v in pairs(game.Players:GetChildren()) do
    Added(v)
    v.CharacterAdded:connect(function(character)
        Added(v)
    end)
end
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
21 Jul 2013 06:28 PM
Try moving 'local Admin = false' into the function.
Report Abuse
kingmasterfit is not online. kingmasterfit
Joined: 22 Jul 2012
Total Posts: 2773
21 Jul 2013 06:31 PM
So
function Admin()
instead of local?
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
21 Jul 2013 06:35 PM
"local Admin = false
local Added = function(Player)
Admin = false"

To this

local Added = function(Player)
local Admin = false
Report Abuse
kingmasterfit is not online. kingmasterfit
Joined: 22 Jul 2012
Total Posts: 2773
21 Jul 2013 06:38 PM
local Gun = game.Lighting:findFirstChild("Carbine")
local foundGun = false
if (Gun) then foundGun = true end
local Players = {"kingmasterfit","purged"}
local MaxHealth = 150
-- Variables below are not to be edited
local Added = function(Player)
local Admin = false
    for i = 1, #Players do
        if (Players[i]:lower() == Player.Name:lower()) then
            Admin = true
        end
    end
    if (game:GetService("BadgeService"):UserHasBadge(Player.userId, 72349297)) then -- Check if Player owns x101st Fort Franneh VIP Shirt
        Admin = true
    end
    if (Admin) then
        repeat wait() until Player.Character
        wait()
        if (Player.Character) then
            if (foundGun) then
                Gun:Clone().Parent = Player.Backpack
            end
            repeat
                Player.Character.Humanoid.MaxHealth = MaxHealth
                Player.Character.Humanoid.Health = MaxHealth
            until Player.Character.Humanoid.Health == MaxHealth
        end
    end
end

game.Players.PlayerAdded:connect(function(Player)
    Added(Player)
    Player.CharacterAdded:connect(function(character)
        Added(Player)
    end)
end)

for i, v in pairs(game.Players:GetChildren()) do
    Added(v)
    v.CharacterAdded:connect(function(character)
        Added(v)
    end)
end
All that can be configured cody?
If it is thanks for the help man.
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