So, Im FURIOUS right now. I constantly run into problems with scripting, But this one i cant fix within even 5 FULL HOURS!!!! I made a kick system for my myth game, here But its not kicking players! How does this work you ask?
There is a list called "Aproved Players" and a variable called Owner. The variable is set to a string value withing the script. I did do:
owner = script.Owner.Value
aproved_players = {
owner
}
So it will let me in the game. BUT when i change owner to another name, It still lets me in! Basicly, I used this If thingy to check if a player is in the list:
game.Players.PlayerAdded:connect(function(plr)
if plr.MembershipType == Enum.MembershipType.Premium or (string.find(plr.Name,aproved_players[1])) ~= nil then
--Do something
end)
I've been wanting more features in my game lately, And i WANTED like i loved this one. Here's the snippet:
val = script.OnJoinKick.Wait.Value
val1 = val
owner = script.Owner.Value
print(owner)
aproved_players = {"Equinsox","hasanchik"}
banned_players = {"KonekoKittenWasTaken"}
owneringame = false
gameclosed = script.GameClosed.Value
print(val1)
game.Players.PlayerAdded:connect(function(plr)
local function KickWay()
print("Identified As UNKNOWN")
if (string.find(plr.Name, banned_players[1])) == nil then
if gameclosed == false then
if plr.Character ~= nil then plr.Character:Destroy() end
gui = script.OnJoinKick:Clone()
gui.Parent = plr.PlayerGui
wait(5)
gui.Frame.Brighten.Disabled = false
wait(val1)
if owneringame == true then
plr:Kick(plr.Name.." Is a follower of "..owner..".")
elseif owneringame == false then
plr:Kick(plr.Name.." Is not aproved.")
end
else
plr:Kick("You do not have permission to join this game. (Game closed.)")
end
else
plr:Kick("Banned.")
end
end
if not plr then return end
if plr.name == owner then owneringame = true end
print("Player Joined")
if plr.MembershipType == Enum.MembershipType.Premium or (string.find(plr.Name, aproved_players[1])) ~= nil then
print("Identified As "..plr.name)
else
KickWay()
end
end)
game.Players.PlayerRemoving:connect(function(plr)
if plr.Name == owner then
owneringame = false
end
end)
game:GetService('Players').PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(character)
character:WaitForChild("Humanoid").Died:connect(function()
plr:Kick(" ")
gui2 = script.BlackOut:Clone()
gui2.Parent = plr.PlayerGui
end)
end)
end)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
hif = script.HideInterface:Clone()
hif.Parent = game.StarterPlayer.StarterPlayerScripts
hif.Disabled = false
game.Players.PlayerAdded:connect(function(plr)
local mouse = script.Mouse:Clone()
mouse.Parent = plr.PlayerGui
mouse.Disabled = false
local fp = script.FirstPerson:Clone()
fp.Parent = plr.PlayerGui
fp.Disabled = false
local sbifp = script.ShowBodyInFirstPerson:Clone()
sbifp.Parent = plr.PlayerGui
sbifp.Disabled = false
local dc = script.DeviceController:Clone()
dc.Parent = plr.PlayerGui
dc.Disabled = false
end)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
game.Players.PlayerAdded:connect(function(plr)
wait(4)
hum = plr.Character:FindFirstChild("Humanoid")
hum.WalkSpeed = 9
end)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

11 comments
I dont ant to use for i,v in pairs As it takes up space.
AND i dont have any use for id's
And, Sorry, But i am TOO lazy to modify your script to match mine.
AAAAAND i dont know how the script get a part of a string, Like how it's knowing if its "Name" or "Id"
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAND, i wanted to avoid for i,v in pairs.
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAND, i MOFIFIED IT AND IT IS STILL NOT WORKING!
Here's the link:https://pastebin.com/raw/1JY6QVet
I give you a tip. Please dont just post the answer, Or somebody with the same problem that you made the script for. They still may have some difficulties in the future if you dont explain it. And please make the answer modified to make it math with the asker's script They may also have trouble modifying the script to the new method, And please dont give out fast written answers (For reputation poi
You said you'd anser any questions?
Keep in mind that I clarified that I made simular one so I posted it here. I am busy and can't asnwer questions 24/7 .I will modify and update the code as soon as I find time for it!
Also keep in mind that we are volunteers so you shouldn't rush us with our answers or spam the comments, thanks.