Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #AuthSkript
- #ver 1.0
- #create by 4MaticPL
- #-----------------------------------------------------------------------------------
- options:
- sk: &f[&9AuthSkript&f]
- noperm: [AuthSkript]Nie masz do tego prawa :c
- perm1: skript.authskript.unregister
- #-----------------------------------------------------------------------------------
- on quit:
- if player is op:
- wait 5 minutes
- set {authskript.session.%player%} to none
- #-----------------------------------------------------------------------------------
- on join:
- if player is op:
- wait 6 tick
- set {authskript.notlog.%player%} to 1
- if {authskript.firstlogin.%player%} is not set:
- set {authskript.firstlogin.%player%} to 1
- set {back.%player%} to location of player
- teleport player to the spawn point of "world"
- set {authskript.notlog.%player%} to 1
- send "{@sk}&cNie jestes zarejestrowany. Wpisz &4/register haslo haslo"
- stop
- else if {authskript.session.%player%} is {authskript.iplogin.%player%}:
- set {authskript.notlog.%player%} to 0
- teleport the player to {back.%player%}
- send "{@sk}&6Witaj ponownie! Twoja sesja logowania została kontynuowanwa!"
- stop
- else if {authskript.notlog.%player%} is 1:
- send "{@sk}&cNie jestes zalogowany. Wpisz &4/login haslo"
- set {authskript.iplogin.%player%} to ip-address of the player
- stop
- #-----------------------------------------------------------------------------------
- every 1 tick:
- loop all players:
- if {authskript.notlog.%loop-player%} is 1:
- teleport loop-player to the spawn point of "world"
- on command:
- if player is op:
- if {authskript.notlog.%player%} is 1:
- command is not "register":
- command is not "login":
- if {authskript.firstlogin.%player%} is 1:
- send "{@sk}&cNie jestes zarejestrowany. Wpisz &4/register haslo haslo"
- cancel event
- else:
- send "{@sk}&cNie jestes zalogowany. Wpisz &4/login haslo"
- cancel event
- on chat:
- if player is op:
- if {authskript.notlog.%player%} is 1:
- if {authskript.firstlogin.%player%} is 1:
- send "{@sk}&cNie jestes zarejestrowany. Wpisz &4/register haslo haslo"
- cancel event
- else:
- send "{@sk}&cNie jestes zalogowany. Wpisz &4/login haslo"
- cancel event
- #-----------------------------------------------------------------------------------
- command /register [<text>] [<text>]:
- trigger:
- if player is op:
- if {authskript.firstlogin.%player%} is 1:
- if arg 1 is not empty:
- if arg 1 is arg 2:
- if {authskript.firstlogin.%player%} is 1:
- set {authskript.password.%player%} to hashed text-argument 1
- set {authskript.firstlogin.%player%} to 0
- set {authskript.notlog.%player%} to 0
- send "{@sk}&6Zostales pomyslnie zarejestrowany"
- else:
- send "{@sk}&cJestes juz zarejestrowany!"
- stop
- else:
- send "{@sk}&ePodane hasla nie sa takie same"
- else:
- send "{@sk}&cPodaj haslo"
- stop
- else:
- send "{@sk}&eJestes juz zarejestrowany!"
- stop
- command /login [<text>]:
- aliases: l
- trigger:
- if player is op:
- if {authskript.notlog.%player%} is 0:
- send "{@sk}&cJestes juz zalogowany!"
- if {authskript.firstlogin.%player%} is 1:
- send "{@sk}&6Nie jestes zarejestrowany"
- if hashed text-argument is {authskript.password.%player%}:
- set {authskript.session.%player%} to ip-address of the player
- teleport the player to {back.%player%}
- set {authskript.notlog.%player%} to 0
- send "{@sk}&6Zostales pomyslnie zalogowany"
- else:
- send "{@sk}&6Podane haslo jest nieprawidlowe"
- command /logout:
- trigger:
- if player is op:
- set {back.%player%} to location of player
- teleport player to the spawn point of "world"
- set {authskript.notlog.%player%} to 1
- send "{@sk}&6Zostales pomyslnie wylogowany!"
- command /changepassword [<text>] [<text>]:
- aliases: changepw, changpw
- trigger:
- if player is op:
- if arg 1 is not set:
- send "{@sk}&cWpisz &4/changepw stare_haslo nowe_haslo"
- stop
- if arg 2 is not set:
- send "{@sk}&cWpisz &4/changepw stare_haslo nowe_haslo"
- stop
- if arg 1 is {authskript.password.%player%}:
- set {authskript.password.%player%} to arg 2
- send "{@sk}&6Twoje haslo zostalo pomyslnie zmienione!"
- else:
- send "{@sk}&cPodane haslo jest nieprawidlowe!"
- command /unregister [<text>]:
- permission: {@perm1}
- permission message: {@noperm}
- trigger:
- if player is op:
- set {authskript.firstlogin.%arg%} to 1
- set {authskript.notlog.%arg%} to 1
- send "{@sk}&6Gracz &2%arg% &6zostal pomyslnie odrejestrowany"
- #-----------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment