Rainway
|
  |
| Joined: 20 Jul 2014 |
| Total Posts: 15572 |
|
|
| 27 Apr 2015 02:50 PM |
| bans a different group, but if we have a member in both groups they can still access it. Nick/Alex phished several HAU members yesterday because apparently I made members leave SCR? Since we share multiple members (quite unfortunate if you think about it) this should be a good way to keep us both happy without having our shared members pick a clan to leave. |
|
|
| Report Abuse |
|
|
R5P
|
  |
| Joined: 30 Jul 2013 |
| Total Posts: 5187 |
|
| |
|
Tatsunabi
|
  |
| Joined: 02 May 2014 |
| Total Posts: 735 |
|
|
| 27 Apr 2015 02:55 PM |
So you want a script that.
If player is in another group they're banned from the place. But if they're in your group then they can still access the place despite being in the other group? |
|
|
| Report Abuse |
|
|
Jradi
|
  |
| Joined: 15 Aug 2012 |
| Total Posts: 10015 |
|
|
| 27 Apr 2015 02:57 PM |
game.Players.PlayerAdded:connect(function(player) if not player:IsInGroup(HAU_GROUP_ID) and player:IsInGroup(SCR_GROUP_ID) then Player:Kick() elseif player:IsInGroup(HAU_GROUP_ID) and player:IsInGroup(SCR_GROUP_ID) then print("Player is in both HAU and SCR") end)
just a rough draft, cba to script right now
[ Join Blood Dominion: http://www.roblox.com/My/Groups.aspx?gid=1254658 ] |
|
|
| Report Abuse |
|
|
| |
|
Jradi
|
  |
| Joined: 15 Aug 2012 |
| Total Posts: 10015 |
|
|
| 27 Apr 2015 02:58 PM |
game.Players.PlayerAdded:connect(function(player) if not player:IsInGroup(HAU_GROUP_ID) and player:IsInGroup(SCR_GROUP_ID) then Player:Kick() elseif player:IsInGroup(HAU_GROUP_ID) and player:IsInGroup(SCR_GROUP_ID) then print("Player is in both HAU and SCR") end end)
*FORGOT TO FKING END THE IF STATEMENT FFS*
[ Join Blood Dominion: http://www.roblox.com/My/Groups.aspx?gid=1254658 ] |
|
|
| Report Abuse |
|
|
Rainway
|
  |
| Joined: 20 Jul 2014 |
| Total Posts: 15572 |
|
|
| 27 Apr 2015 03:00 PM |
| This is for a fort by the way, would it still work Jradi? |
|
|
| Report Abuse |
|
|
darkwisp
|
  |
| Joined: 07 Apr 2010 |
| Total Posts: 22653 |
|
| |
|
|
| 27 Apr 2015 03:05 PM |
| so now i have to join HAU to ingame flame HAU |
|
|
| Report Abuse |
|
|
Jradi
|
  |
| Joined: 15 Aug 2012 |
| Total Posts: 10015 |
|
|
| 27 Apr 2015 03:10 PM |
That is very basic though, Rainway.
For example, you would't want Nick or Alex joining HAU just to flame you so you would have to ban them using a Ban Table.
But yeah if your looking for a vague script that'd work :)
[ Join Blood Dominion: http://www.roblox.com/My/Groups.aspx?gid=1254658 ] |
|
|
| Report Abuse |
|
|
|
| 27 Apr 2015 03:11 PM |
| I could. I'm good at scripting, Rainway just message me and I will be on it Sir. |
|
|
| Report Abuse |
|
|
|
| 27 Apr 2015 03:17 PM |
local banned = { } local allowed = { }
function check(player) for _, v in pairs(banned) do for _, c in pairs(allowed) do if player:IsInGroup(v) and not player:IsInGroup(c) then return true -- Is in a banned group and not an ally/home group elseif player:IsInGroup(v) and player:IsInGroup(c) then return false -- player is in an allowed group (such as an ally) end end
game.Players.PlayerAdded:connect(function(p) if check(p) then p:Kick() elseif not check(p) then print("'Tis safe") end)
------------------------------
I probably went wrong somewhere
Skelecore | Clan of magic and wizardry | http://www.roblox.com/My/Groups.aspx?gid=1187954 |
|
|
| Report Abuse |
|
|
Locard
|
  |
| Joined: 13 Apr 2014 |
| Total Posts: 3516 |
|
|
| 27 Apr 2015 03:18 PM |
@Spinal
Forgot to end that conditional statement there. |
|
|
| Report Abuse |
|
|
|
| 27 Apr 2015 03:18 PM |
function check(player) for _, v in pairs(banned) do for _, c in pairs(allowed) do if player:IsInGroup(v) and not player:IsInGroup(c) then return true -- Is in a banned group and not an ally/home group elseif player:IsInGroup(v) and player:IsInGroup(c) then return false -- player is in an allowed group (such as an ally) end end end end
game.Players.PlayerAdded:connect(function(p) if check(p) then p:Kick() elseif not check(p) then print("'Tis safe") end end)
Skelecore | Clan of magic and wizardry | http://www.roblox.com/My/Groups.aspx?gid=1187954 |
|
|
| Report Abuse |
|
|
|
| 27 Apr 2015 03:20 PM |
@Locard, yea i read over and noticed a tonne of freaking ends missing, second should be good tho
Skelecore | Clan of magic and wizardry | http://www.roblox.com/My/Groups.aspx?gid=1187954 |
|
|
| Report Abuse |
|
|
|
| 27 Apr 2015 03:27 PM |
| ^ Now this will now go Viral.. GG |
|
|
| Report Abuse |
|
|
|
| 27 Apr 2015 03:30 PM |
so what?
---------------------------
local exploiters = { }
function check(c) for _, v in pairs(exploiters) do if c:IsA("Player") and c.userId == v then return true end end end
game.Players.PlayerAdded:connect(function(p) if check(p) then p:Kick() else end end)
Skelecore | Clan of magic and wizardry | http://www.roblox.com/My/Groups.aspx?gid=1187954 |
|
|
| Report Abuse |
|
|
|
| 27 Apr 2015 03:31 PM |
local exploiters = { 1, 1003, 1337, 58392 } -- some random userIds
function check(c) for _, v in pairs(exploiters) do if c:IsA("Player") and c.userId == v then return true end end end
game.Players.PlayerAdded:connect(function(p) if check(p) then p:Kick() else end end)
Skelecore | Clan of magic and wizardry | http://www.roblox.com/My/Groups.aspx?gid=1187954 |
|
|
| Report Abuse |
|
|