Back to home

NoClip Script "Module"

G805D
click to copy
This code is over 6 months old.
Codes expire after 6 months and will no longer function.
This game is archived.
If you with to unarchive it, click the "restore" button in the options menu.
This code can also be found at workshop.codes/G805D

Category:
Training / Drills / Tools

Author:
Xerxes

Rating:
18

Version:
1.1.6

Posted:
about 1 year ago

Last updated:
about 1 year ago

Tags:
noclip flying flight no clip freecam spectate

Project Links

Share this workshop!

Options

NoClip Script "Module"

I've tried to design this script to be a "module-like" resource, allowing anyone to easily modify it to fit around their own Workshop mode.

This works perfectly fine as a standalone script though, so if you just want a way to fly around, then feel free to try it out!


If you have any questions or concerns, @ me on the Elo hell Workshop Discord: Xerxes


or join the Discord: https://discord.gg/fmsu6ba

Please credit me if you use this :c


Features:

  •   Allow/disallow specific players to use NoClip.
  • Show name tags of the positions of players using NoClip
  • Very easy to set/change the activation method. (Keybinds)
  • Fly in the direction your're facing, and even pass through walls into out-of-bounds areas.
  • As you'd expect, you go back to regular form once you exit NoClip, continuing from that position.
  • Easy to configure, allowing you to change the global properties such as permissions, name-tag visibility, default speed, boost speed and camera smoothing.

Controls & Properties:

Controls:

  •    Toggle NoClip (configurable): Q/Ultimate
  • Up: Space/Jump
  • Down: Ctrl/Crouch
  • Shift/Ability 2: Speed Boost
  • Forwards
  • Backwards
  • Left
  • Right

Default Properties (All Configurable):

  •    Access: 1 - Everyone has the ability to use NoClip
  • Name-Tag Visibility: 1 - Everyone can see the position of a NoClip user.
  • Normal flight speed (Meters/s): 10
  • Boosted flight speed (Meters/s): 20
  • Camera Smoothing: 25

Configurable Properties:

In rule {1/4}, the first 2 actions are vector values with each component being used as a property. You can change these values to better suit your preferences.

Action 1:
    [X]: Default NoClip Access - This determines if by default, players will be able to use NoClip or not. (Default: 1)
        0 = False
        1 = True
    [Y]: Name-tag Visibility - When someone is using NoClip, their name can be placed above their head to show others where they are. (Default: 1)
        0 = The positions of NoClip users are hidden from everyone. (A text entity will not be created.)
        1 = Everyone can see the position of a NoClip user.
        2 = Only those with permission can see the position of a NoClip user.
        3 = Only when using NoClip can you see the position of another NoClip user.
    [Z]: *Not Used*

Action 2:
    [X]: The default move speed of the NoClip camera in Meters/s. (Default: 10)
    [Y]: The boost move speed of the NoClip camera in Meters/s. This is when the player is holding Shift/Ability1 (Default: 20)
    [Z]: NoClip Camera Smoothing - The higher the value, the faster the transition speed but 0 is instant. I recommend using between 10-60. (Default: 25)   

Useful Information & Tricks:

  •   To get the current position of a player using NoClip, it's stored in Player Variable P.
  • To give/take permission from a player, set the value at P.Var N[0] to true or false. A few examples of how this can be used:
    1. If there were some kind of currency/shop in your game, you should set this to true when a player purchases it.
    2. Having set boundaries where NoClip is/isn't allowed. You could give/take permission once a player enters/exits these bounds.
    3. Enabling NoClip for players that have been eliminated from the gamemode - kind of like an alternate spectate mode.
  • To check if a specific player is currently using NoClip, the value is stored at P.Var N[1] (true/false).

I'm always trying to get the action count down and make the exit a little smoother, so if you have any ideas, let me know!

My notes for this version: https://pastebin.com/xBFqcw0w

Enjoy.

A small note:

I created this script a long time ago, back in PTR and it was posted in the Blizzard Forums. Since it seems like this is where the majority of the Workshop related content goes, I thought it would be a good idea to post it here, too. (https://us.forums.blizzard.com/en/overwatch/t/344151)

rule("{1/4} § NOCLIP § Init Props | Modify NoClip here |  | ") { event { Ongoing - Each Player; All; All; }  actions { Set Global Variable At Index(N, 0, Vector(1, 1, 0)); Set Global Variable At Index(N, 1, Vector(10, 20, 25)); Set Player Variable At Index(Event Player, N, 0, Compare(X Component Of(Value In Array(Global Variable(N), 0)), ==, 1)); } }  rule("{2/4} § NOCLIP § Activator - Setup your activation method here - Don't delete the first condition or the action | Default = Q") { event { Ongoing - Each Player; All; All; }  conditions { Value In Array(Player Variable(Event Player, N), 0) == True; Is Button Held(Event Player, Ultimate) == True; }  actions { Set Player Variable At Index(Event Player, N, 2, True); } }  rule("{3/4} § NOCLIP § Toggle Controller | Nothing in here for you to edit | Xerxes#21917") { event { Ongoing - Each Player; All; All; }  conditions { Or(Value In Array(Player Variable(Event Player, N), 2), And(Compare(Value In Array(Player Variable(Event Player, N), 0), ==, False), Value In Array(Player Variable(Event Player, N), 1))) == True; }  actions { Set Player Variable At Index(Event Player, N, 1, Compare(Value In Array(Player Variable(Event Player, N), 1), ==, False)); Skip If(Compare(Value In Array(Player Variable(Event Player, N), 1), ==, False), 25); Skip If(Compare(Y Component Of(Value In Array(Global Variable(N), 0)), ==, 0), 7); Skip If(Compare(Y Component Of(Value In Array(Global Variable(N), 0)), !=, 1), 1); Create In-World Text(Remove From Array(All Players(All Teams), Event Player), String("{0} {1}", Hero Icon String(Hero Of( Event Player)), Event Player, Null), Player Variable(Event Player, P), 1, Do Not Clip, Visible To Position and String); Skip If(Compare(Y Component Of(Value In Array(Global Variable(N), 0)), !=, 2), 1); Create In-World Text(Remove From Array(Filtered Array(All Players(All Teams), Compare(Value In Array(Player Variable( Current Array Element, N), 0), ==, True)), Event Player), String("{0} {1}", Hero Icon String(Hero Of(Event Player)), Event Player, Null), Player Variable(Event Player, P), 1, Do Not Clip, Visible To Position and String); Skip If(Compare(Y Component Of(Value In Array(Global Variable(N), 0)), !=, 3), 1); Create In-World Text(Remove From Array(Filtered Array(All Players(All Teams), Compare(Value In Array(Player Variable( Current Array Element, N), 1), ==, True)), Event Player), String("{0} {1}", Hero Icon String(Hero Of(Event Player)), Event Player, Null), Player Variable(Event Player, P), 1, Do Not Clip, Visible To Position and String); Set Player Variable At Index(Event Player, N, 4, Last Text ID); Set Player Variable(Event Player, P, Eye Position(Event Player)); Start Camera(Event Player, Player Variable(Event Player, P), Add(Player Variable(Event Player, P), Facing Direction Of( Event Player)), Z Component Of(Value In Array(Global Variable(N), 1))); Set Player Variable At Index(Event Player, N, 3, Facing Direction Of(Event Player)); Teleport(Event Player, Vector(Multiply(Index Of Array Value(All Players(All Teams), Event Player), 25), 500, 0)); Set Facing(Event Player, Value In Array(Player Variable(Event Player, N), 3), To World); Start Accelerating(Event Player, Subtract(Vector(Multiply(Index Of Array Value(All Players(All Teams), Event Player), 25), 500, 0), Position Of(Event Player)), 10000, 12.800, To World, Direction Rate and Max Speed); Disallow Button(Event Player, Primary Fire); Disallow Button(Event Player, Secondary Fire); Disallow Button(Event Player, Ability 1); Disallow Button(Event Player, Ability 2); Disallow Button(Event Player, Ultimate); Disallow Button(Event Player, Interact); Disallow Button(Event Player, Jump); Disallow Button(Event Player, Crouch); Set Player Variable At Index(Event Player, N, 5, Has Status(Event Player, Invincible)); Set Status(Event Player, Null, Invincible, 9999); Chase Player Variable At Rate(Event Player, P, Add(Player Variable(Event Player, P), Add(Multiply(Multiply(Facing Direction Of( Event Player), 1000), Z Component Of(Throttle Of(Event Player))), Multiply(Add(Multiply(World Vector Of(Left, Event Player, Rotation), X Component Of(Throttle Of(Event Player))), Vector(0, Add(Multiply(Is Button Held(Event Player, Jump), 1), Multiply( Is Button Held(Event Player, Crouch), -1.000)), 0)), 1000))), Add(Multiply(X Component Of(Value In Array(Global Variable(N), 1)), Compare(Is Button Held(Event Player, Ability 1), ==, False)), Multiply(Y Component Of(Value In Array(Global Variable(N), 1)), Compare(Is Button Held(Event Player, Ability 1), ==, True))), Destination and Rate); Skip If(Compare(Value In Array(Player Variable(Event Player, N), 1), ==, True), 20); Stop Accelerating(Event Player); Apply Impulse(Event Player, Multiply(Multiply(Multiply(Multiply(Multiply(Multiply(Multiply(Velocity Of(Event Player), -1.000), 0.001), 0.001), 0.001), 0.001), 0.001), 0.001), 1, To World, Cancel Contrary Motion); Wait(0.032, Ignore Condition); Apply Impulse(Event Player, Multiply(Multiply(Multiply(Multiply(Multiply(Multiply(Multiply(Velocity Of(Event Player), -1.000), 0.001), 0.001), 0.001), 0.001), 0.001), 0.001), 1, To World, Cancel Contrary Motion); Set Player Variable At Index(Event Player, N, 3, Facing Direction Of(Event Player)); Teleport(Event Player, Subtract(Player Variable(Event Player, P), Subtract(Eye Position(Event Player), Position Of( Event Player)))); Destroy In-World Text(Value In Array(Player Variable(Event Player, N), 4)); Stop Chasing Player Variable(Event Player, P); Set Facing(Event Player, Value In Array(Player Variable(Event Player, N), 3), To World); Allow Button(Event Player, Primary Fire); Allow Button(Event Player, Secondary Fire); Allow Button(Event Player, Ability 1); Allow Button(Event Player, Ability 2); Allow Button(Event Player, Ultimate); Allow Button(Event Player, Interact); Allow Button(Event Player, Jump); Allow Button(Event Player, Crouch); Skip If(Value In Array(Player Variable(Event Player, N), 5), 1); Clear Status(Event Player, Invincible); Stop Camera(Event Player); Small Message(Event Player, String("{0} {1}", Value In Array(Append To Array(Append To Array(Empty Array, String("Stopped", Null, Null, Null)), String("Started", Null, Null, Null)), Value In Array(Player Variable(Event Player, N), 1)), String("Flying", Null, Null, Null), Null)); Set Player Variable At Index(Event Player, N, 2, False); } }  rule("{4/4} § NOCLIP § Workshop bug work-around :(") { event { Ongoing - Each Player; All; All; }  conditions { Value In Array(Player Variable(Event Player, N), 1) == True; Or(Compare(Throttle Of(Event Player), !=, Vector(0, 0, 0)), Or(Is Button Held(Event Player, Jump), Is Button Held(Event Player, Crouch))) == True; }  actions { Wait(0.100, Abort When False); Set Player Variable At Index(Event Player, N, 6, Throttle Of(Event Player)); Loop; } }

Changelog

about 1 year ago 1.1.6

A small performance optimisation. Now around 15-25% more efficient (according to the new server performance indicators), but unfortunately, at the cost of 5 more actions.

G805D
click to copy
about 1 year ago 1.1.6

A small performance optimisation. Now around 15-25% more efficient (according to the new server performance indicators), but unfortunately, at the cost of 5 more actions.

NVNWP
click to copy
about 1 year ago 1.1.5

Slight optimisation with the enter/exit message, reducing total action count from 53 to 52.

9RJYV
click to copy
about 1 year ago 1.1.4

Small QoL improvement: When exiting NoClip, you don't get randomly thrown as drastically.

Q584Q
click to copy
about 1 year ago 1.1.3

This revision contains no notes

D562H
click to copy