SnakyExotic Posted November 26, 2020 Share Posted November 26, 2020 (edited) variables: {freeze.maincolor} = "&c" {freeze.seccolor} = "&c" {freeze.errorcolor} = "&c" {freeze.%player%.value} = false on any movement: {freeze.%player%.value} cancel the event set {_checktime} to now subtract 2 seconds from {_checktime} {freeze.%player%.lastused} is less than {_checktime} message "%{freeze.errorcolor}%You are frozen and cannot move" set {freeze.%player%.lastused} to now on command: {freeze.%player%.value} cancel the event message "%{freeze.errorcolor}%You are frozen and cannot execute commands" command /freeze [<player>]: trigger: set {_prefix} to "&8&l[&4&lAnySMP&8&l] " arg 1 is not set: message "%{freeze.errorcolor}%Wrong syntax! Usage: /freeze <player>" stop {freeze.%arg 1%.value} is not set: set {freeze.%arg 1%.value} to false player is arg 1: player does not have permission "freeze.freeze": message "%{freeze.errorcolor}%You don't have permission to do that" stop message "%{freeze.errorcolor}%You can't freeze yourself" stop not {freeze.%arg 1%.value}: player does not have permission "freeze.freeze": message "%{freeze.errorcolor}%You don't have permission to do that" stop set {freeze.%arg 1%.value} to true set {_templastused} to now subtract 1 hour from {_templastused} set {freeze.%arg 1%.lastused} to {_templastused} message "%{_prefix}%&cYou froze %{freeze.seccolor}%%arg 1%" message " " to arg 1 message "%{_prefix}%&c&lYou are being screenshared. If you disconnected you will automatically be banned. You have 5 minutes to join the discord or you will be banned for refusal to screenshare. After joining the discord, join the Waiting room voice chat. &4&l&n<link:https://discord.gg/y8cZSBjK9p>CLICK HERE<reset> &c<o join the screensharing discord." to arg 1 message " " to arg 1 stop player does not have permission "freeze.unfreeze": message "%{freeze.errorcolor}%You don't have permission to do that" stop set {freeze.%arg 1%.value} to false set {_templastused} to now subtract 1 hour from {_templastused} set {freeze.%arg 1%.lastused} to {_templastused} message "%{_prefix}%&cYou unfroze %{freeze.seccolor}%%arg 1%" message "%{_prefix}%&cYou have been unfrozen by %{freeze.seccolor}%%player%" to arg 1 How do I make it so after you enter /freeze it freezes the player and puts a gui on there screen and they cant exit out of it and move any of the items in the gui? something like this: https://imgur.com/2Zyv86Y (if you don't know how to add the gui can you give me improvements to add to the skript?) Edited November 26, 2020 by SnakyExotic Link to comment Share on other sites More sharing options...
_Tarna_ Posted November 26, 2020 Share Posted November 26, 2020 There are many ways to make guis with Skript. If you don't want to use any addons, you can use vanilla skript to make one. Here is a tutorial on how to make guis with vanilla skript (https://forums.skunity.com/threads/vanilla-guis.8939/). If you have an addon called TuSKe, you can also use that. Here is a tutorial on how to use TuSKe guis, which may be more complex (https://skripthub.net/tutorials/3). There are some other addons you can use too but these are just 2. Also the on any movement event can sometimes cause lag if there are a lot of players online moving cause it triggers even if someone moves their mouse an inch. So you could just try using a while loop. In the while loop see if there location changes, and if so, just teleport them back to their original location. Discord - tarna256 In-game name - _Tarna_ Website - https://tarna.dev Paste Site: https://paste.tarna.dev --------------------------------------------------------- [VIP] - 7/27/2020 Community Support - 7/8/20 | 11/3/20 Helper - 11/3/20 - 2/21/21 Moderator - 2/21/21 - 5/17/21 - 5/17/21 - now Moderator - 12/20/22 - now --------------------------------------------------------- Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now