Categories > Exploiting > Roblox >

[HELP] How do I add multiple players to this script?


New Reply

CJ99

CJ$

Posts: 98

Threads: 24

Joined: Sep, 2021

Reputation: 2

Posted

Here's a script I use to assign a person to a certain team in rblx studio, however, I want to assign multiple people. Adding a comma and their name doesn't work for some reason...

local Owner = game.Teams.Staff

game.Players.PlayerAdded:Connect(function(player)
    if player.Name == "EstabMort" then
        player.Team = Owner
      end
end)
--How do I add multiple people in the player.Name so multiple people can be automatically assigned to the team?

"I'll have two number 9s, a number 9 large, a number 6 with extra dip, a number 7, two number 45s, one with cheese, and a large soda."

Posts: 63

Threads: 6

Joined: Jul, 2021

Reputation: 1

Replied

Shh, I'm not sure I can do that from a localscript.

Html, CSS, LUA  

 

         DEV

Posts: 98

Threads: 24

Joined: Sep, 2021

Reputation: 2

Replied

@VilictusIt's not an exploit script It's for my game that I can edit w/ rblx studio

"I'll have two number 9s, a number 9 large, a number 6 with extra dip, a number 7, two number 45s, one with cheese, and a large soda."

Posts: 95

Threads: 7

Joined: Jul, 2021

Reputation: 2

Replied

local Owner = game.Teams.Staff
local users = {"user1", "user2", "user3"} --change users to your liking delete them or add them

game.Players.PlayerAdded:Connect(function(player)
    if player.Name == users then
        player.Team = Owner
      end
end)


--idk i dont code in lua

vast#8191

discord.gg/exploiting

Posts: 63

Threads: 6

Joined: Jul, 2021

Reputation: 1

Replied

@CJ99

 

I think you need to use a remote event.

Html, CSS, LUA  

 

         DEV

Posts: 210

Threads: 37

Joined: Feb, 2021

Reputation: 7

Replied

simple.

local owners = {
"EstabMort", "TheJ"
}
local Owner = game.Teams.Staff
game.Players.PlayerAdded.Connect(function(player)
for i, v in pairs(owner) do
if player.Name == owner then
player.Team = Owner
end
end
end)

Added

@child1010
just so you know, in your script you're comparing a player instance to a table

valet vgx, a new generation of valet.
keyless upcoming exploit, join the discord

Posts: 2031

Threads: 129

Joined: Feb, 2020

Reputation: 16

Replied

-- Run as a server script
local Role = game:GetService("Teams"):WaitForChild("SomeRole")
local Authorized = {8555123, 1} -- User IDs
game:GetService("Players").PlayerAdded:Connect(function(Player)
    if table.find(Authorized, Player.UserId) then
        Player.Team = Role
    end
end)

H3x0R#4231 (GitHub, Script Repobtw light mode sucks
Reverse Engineer and Lego Hacker

Languages: Lua, C#, C++

If you DM me, make it worth my time. Ask your question straightforwardly.

Posts: 67

Threads: 7

Joined: Aug, 2021

Reputation: 3

Replied

local Staff = {
    "EstabMort",
    "plr2 idk"
}

game.Players.PlayerAdded:Connect(
    function(player)
        if table.find(Staff, player.Name) then
            player.Team = game.Teams.Staff
        end
    end
)

i use synapse x and script-ware

Something Hub owner

new new repgoal: 4

TERIHAX

Coming Back???

Mention

Posts: 1536

Threads: 51

Joined: Jul, 2020

Reputation: 8

Replied

@hookfunction what the hell the font kills me

Dsc: https://discord.com/users/883050084537860117

"teri teri peri peri sauce" - deadlocust (reply me with a quote & i might put it here)

Rep Goal 10 - Thanks for The Rep :O

ThatPhoenix

i am an icon :evil_face:

Mention

Posts: 1725

Threads: 40

Joined: May, 2020

Reputation: 10

Replied

@Vilictus
You dont need to use a remote in this situation, all of it is serversided. Remotes are only used to do server-client,client-server things. So they arent used here

Phoenix#8419

Road to 69 rep hehe

hehe funny

Posts: 176

Threads: 4

Joined: Nov, 2020

Reputation: -12

Replied

What, this is incredibly simple

Lua = perfection


New Reply

Users viewing this thread:


( Members: 0, Guests: 1, Total: 1 )