Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- variables:
- {exp.%player%} = 0
- {level.%player%} = 1
- {needexp.%player%} = 1000
- {rgn.%player%} = 1
- {spd.%player%} = 1
- {stamina.%player%} = 14
- {exhaustion.%player%} = 0
- on load:
- execute console command "/gamerule naturalRegeneration false"
- every tick:
- loop all players:
- set {_stamina} to {stamina.%loop-player%}+6
- set loop-player's food to {_stamina}/2
- set level of loop-player to {level.%loop-player%}
- set level progress of loop-player to {exp.%loop-player%}/{needexp.%loop-player%}
- if {level.%loop-player%} is smaller than or equal to 90:
- set {def.%loop-player%} to {level.%loop-player%}-1
- if {level.%loop-player%} is greater than or equal to 91:
- set {def.%loop-player%} to 90
- if {exp.%loop-player%} is greater than or equal to {needexp.%loop-player%}:
- set {exp.%loop-player%} to {exp.%loop-player%}-{needexp.%loop-player%}
- set {needexp.%loop-player%} to {needexp.%loop-player%}*1.05
- set {needexp.%loop-player%} to round({needexp.%loop-player%})/100
- set {needexp.%loop-player%} to round({needexp.%loop-player%})
- set {needexp.%loop-player%} to {needexp.%loop-player%}*100
- add 1 to {level.%loop-player%}
- send loop-player title "&a&lLEVEL UP" with subtitle "&aYour are now LEVEL %{level.%loop-player%}%!" for 1 seconds with 0 seconds fade in and 0.5 seconds fade out
- play sound "entity_player_levelup" to loop-player with volume 1 and pitch 5
- set {_healthraito} to loop-player's health/max health of loop-player
- add 0.5 to max health of loop-player
- set loop-player's health to max health of loop-player*{_healthraito}
- if {level.%loop-player%} is 10:
- set {rgn.%loop-player%} to 2
- if {level.%loop-player%} is 20:
- set {rgn.%loop-player%} to 3
- if {level.%loop-player%} is 30:
- set {rgn.%loop-player%} to 4
- set {spd.%loop-player%} to 2
- set loop-player's walk speed to 0.3
- if {level.%loop-player%} is 40:
- set {rgn.%loop-player%} to 5
- if {level.%loop-player%} is 50:
- set {rgn.%loop-player%} to 6
- if {level.%loop-player%} is 60:
- set {rgn.%loop-player%} to 7
- set {spd.%loop-player%} to 3
- set loop-player's walk speed to 0.4
- if {level.%loop-player%} is 70:
- set {rgn.%loop-player%} to 8
- if {level.%loop-player%} is 80:
- set {rgn.%loop-player%} to 9
- if {level.%loop-player%} is 90:
- set {rgn.%loop-player%} to 10
- wipe loop-player sidebar
- set name of sidebar of loop-player to "&6&lYour Status"
- set score "&aLEVEL: %{level.%loop-player%}%" in sidebar of loop-player to 0
- set score "&eEXP: %{exp.%loop-player%}%/%{needexp.%loop-player%}%" in sidebar of loop-player to -1
- set score "&4ATK: %{level.%loop-player%}%" in sidebar of loop-player to -2
- set score "&9DEF: %{def.%loop-player%}%" in sidebar of loop-player to -3
- set score "&dRGN: %{rgn.%loop-player%}%" in sidebar of loop-player to -4
- set score "&bSPD: %{spd.%loop-player%}%" in sidebar of loop-player to -5
- set score "&cHP: %round(loop-player's health*2)%/%max health of loop-player*2%" in sidebar of loop-player to -6
- set {_targetentity} to target of loop-player
- {_targetentity} is not armor stand
- if health of target of loop-player is greater than or equal to 1:
- if {_targetentity} is set:
- set {_targetentityname} to name of {_targetentity}
- if {_targetentityname} is set:
- send action bar from "%name of target of loop-player% &c%round(health of target of loop-player*2)%&7/&a%max health of target of loop-player*2%" to loop-player
- if {_targetentityname} is not set:
- send action bar from "%target of loop-player% &c%round(health of target of loop-player*2)%&7/&a%max health of target of loop-player*2%" to loop-player
- on death:
- wait 1 tick
- force victim to respawn
- wait 2 tick
- send player title "&c&lGAME OVER" with subtitle "&cYOU DIED" for 3 seconds with 0 seconds fade in and 1 seconds fade out
- execute console command "/effect %player% 15 3 0 true"
- on xp spawn:
- cancel event
- on death:
- attacker is a player
- victim is not player
- victim is not armor stand
- set {_exp} to max health of victim*4
- add {_exp} to {exp.%attacker%}
- send "&a+%{_exp}%EXP" to attacker
- command /resetstatus [<offline player>]:
- permission: skript.admin
- usage: /resetstatus <player>
- trigger:
- set {level.%arg-1%} to 1
- set {exp.%arg-1%} to 0
- set {needexp.%arg-1%} to 1000
- set max health of arg-1 to 10
- set arg-1's health to 10
- set {rgn.%arg-1%} to 1
- set {spd.%arg-1%} to 1
- set arg-1's walk speed to 0.2
- set {stamina.%arg-1%} to 14
- on damage:
- attacker is a player
- if damage was caused by entity explosion:
- stop
- if damage was caused by projectile:
- stop
- if damage was caused by potion:
- stop
- else:
- set {_adddamage} to {level.%attacker%}-1
- set {_adddamage} to {_adddamage}/2
- add {_adddamage} to damage
- on damage:
- victim is a player
- set {_reduction} to 100-{def.%victim%}
- set {_reduction} to {_reduction}/100
- set damage to damage*{_reduction}
- every 80 tick:
- loop all players:
- if loop-player's health is greater than 0:
- if {rgn.%loop-player%} is 1:
- if loop-player's health is smaller than or equal to max health of loop-player:
- add 0.5 to loop-player's health
- every 72 tick:
- loop all players:
- if loop-player's health is greater than 0:
- if {rgn.%loop-player%} is 2:
- if loop-player's health is smaller than or equal to max health of loop-player:
- add 0.5 to loop-player's health
- every 64 tick:
- loop all players:
- if loop-player's health is greater than 0:
- if {rgn.%loop-player%} is 3:
- if loop-player's health is smaller than or equal to max health of loop-player:
- add 0.5 to loop-player's health
- every 57 tick:
- loop all players:
- if loop-player's health is greater than 0:
- if {rgn.%loop-player%} is 4:
- if loop-player's health is smaller than or equal to max health of loop-player:
- add 0.5 to loop-player's health
- every 49 tick:
- loop all players:
- if loop-player's health is greater than 0:
- if {rgn.%loop-player%} is 5:
- if loop-player's health is smaller than or equal to max health of loop-player:
- add 0.5 to loop-player's health
- every 41 tick:
- loop all players:
- if loop-player's health is greater than 0:
- if {rgn.%loop-player%} is 6:
- if loop-player's health is smaller than or equal to max health of loop-player:
- add 0.5 to loop-player's health
- every 33 tick:
- loop all players:
- if loop-player's health is greater than 0:
- if {rgn.%loop-player%} is 7:
- if loop-player's health is smaller than or equal to max health of loop-player:
- add 0.5 to loop-player's health
- every 24 tick:
- loop all players:
- if loop-player's health is greater than 0:
- if {rgn.%loop-player%} is 8:
- if loop-player's health is smaller than or equal to max health of loop-player:
- add 0.5 to loop-player's health
- every 15 tick:
- loop all players:
- if loop-player's health is greater than 0:
- if {rgn.%loop-player%} is 9:
- if loop-player's health is smaller than or equal to max health of loop-player:
- add 0.5 to loop-player's health
- every 3 tick:
- loop all players:
- if loop-player's health is greater than 0:
- if {rgn.%loop-player%} is 10:
- if loop-player's health is smaller than or equal to max health of loop-player:
- add 0.5 to loop-player's health
- command /exp [<player>] [<number>]:
- permission: skript.admin
- usage: /exp <player> <velue>
- trigger:
- if arg-2 is greater than or equal to 1:
- add arg-2 to {exp.%arg-1%}
- on damage:
- victim is a player
- if damage was caused by starvation:
- cancel event
- every 8 tick:
- loop all players:
- loop-player's gamemode is adventure or survival
- if loop-player is sprinting:
- if {stamina.%loop-player%} is greater than or equal to 1:
- remove 1 from {stamina.%loop-player%}
- if {stamina.%loop-player%} is 0:
- set loop-player's walk speed to loop-player's walk speed/2
- set {exhaustion.%loop-player%} to 1
- wait 84 tick
- set {exhaustion.%loop-player%} to 0
- set loop-player's walk speed to loop-player's walk speed*2
- every 6 tick:
- loop all players:
- if loop-player is not sprinting:
- if {stamina.%loop-player%} is smaller than or equal to 13:
- add 1 to {stamina.%loop-player%}
- on player sprint toggle:
- player's gamemode is adventure or survival
- if {exhaustion.%player%} is 1:
- if player is not sprinting:
- cancel event
Add Comment
Please, Sign In to add comment