Pastebin
API
tools
faq
paste
Login
Sign up
Please fix the following errors:
New Paste
Syntax Highlighting
-- MultiWeapon weapons = {} switch = {} multiweap = {} onweaponpickup = {} max_weapons = 6 for i = 0,15 do weapons[i] = {} multiweap[i] = {} switch[i] = 0 onweaponpickup[i] = true end function GetRequiredVersion() return 10058 end function OnScriptLoad(process) end function OnScriptUnload() end function OnNewGame(map) end function OnGameEnd(mode) end function OnServerChat(player, chattype, message) return 1 end function OnServerCommand(player, command) return 1 end function OnTeamDecision(team) return team end function OnPlayerJoin(player, team) end function OnPlayerLeave(player, team) end function OnPlayerKill(killer, victim, mode) end function OnKillMultiplier(player, multiplier) end function OnPlayerSpawn(player, m_objId) end function OnPlayerSpawnEnd(player, m_objId) end function OnTeamChange(relevant, player, cur_team, dest_team) return 1 end function OnObjectCreation(m_objId, player, tagName) end function OnObjectInteraction(player, m_objId, tagType, tagName) return 1 end function OnWeaponAssignment(player, m_objId, slot, tagName) return 0 end function OnWeaponReload(player, m_weapId) return 1 end function OnDamageLookup(receiver, causer, tagData, tagName) end function OnVehicleEntry(relevant, player, m_vehicleId, tagName, seat) return 1 end function OnVehicleEject(player, forced) return 1 end function OnWeaponPickup(player, m_objId, tagName, m_weapId, slot) if #weapons[player] <= max_weapons then table.insert(weapons[player], tagName) end end function OnWeaponSwitch(player, m_objId, cur_tagName, next_tagName, cur_weapId, next_weapId, cur_slot, next_slot) local slot = table.find(weapons[player], cur_tagName) if weapons[slot + 1] then destroyobject(next_weapId) assignweapon(player, weapons[slot + 1]) else destroyobject(next_weapId) assignweapon(player, weapons[1]) end end function OnClientUpdate(player, m_objId) end registertimer(10, "WeaponTimer") function WeaponTimer(id, count) for i = 0,15 do if gethash(i) then local m_player = getplayer(i) local m_objId = readdword(m_player, 0x34) local m_object = getobject(m_objId) if m_object then local primary_weapId = readdword(m_object, 0x2F8) local secondary_weapId = readdword(m_object, 0x2FC) local tertiary_weapId = readdword(m_object, 0x300) local quartenary_weapId = readdword(m_object, 0x304) local new_weaps = {primary_weapId, secondary_weapId, tertiary_weapId, quartenary_weapId} for k,v in opairs(new_weaps) do local tagType, tagName = getobjecttag(v) if weapons[i][k] ~= tagName then if onweaponpickup[i] then OnWeaponPickup(i, m_objId, tagName, v, k) weapons[i][k] = tagName end end end local next_slot = readword(m_object, 0x2F4) if next_slot ~= switch[i] then local cur_slot = readword(m_object, 0x2F2) local cur_weapId = readdword(m_object, 0x118) local next_weapId = readdword(m_object, 0x2F8 + next_slot * 4) local _, cur_tagName = getobjecttag(cur_weapId) local __, next_tagName = getobjecttag(next_weapId) OnWeaponSwitch(i, m_objId, cur_tagName, next_tagName, cur_weapId, next_weapId, cur_slot, next_slot) switch[i] = next_slot end end end end return 1 end local phasor_assignweapon = assignweapon function assignweapon(player, tagName) onweaponpickup[player] = false phasor_assignweapon(player, tagName) onweaponpickup[player] = true end function table.find(t, val) for k,v in pairs(t) do if v == val then return k end end end function opairs(t) local keys = {} for k,v in pairs(t) do table.insert(keys, k) end table.sort(keys, function(a,b) if type(a) == "number" and type(b) == "number" then return a < b end an = string.lower(tostring(a)) bn = string.lower(tostring(b)) if an ~= bn then return an < bn else return tostring(a) < tostring(b) end end) local count = 1 return function() if unpack(keys) then local key = keys[count] local value = t[key] count = count + 1 return key,value end end end -- The following were written by Smiley -- function getobjecttag(m_objId) local m_object = getobject(m_objId) local object_map_id = readdword(m_object, 0x0) local map_pointer = 0x460678 local map_base = readdword(map_pointer, 0x0) local map_tag_count = todec(endian(map_base, 0xC, 0x3)) local tag_table_base = map_base + 0x28 local tag_table_size = 0x20 for i = 0, (map_tag_count - 1) do local tag_id = todec(endian(tag_table_base, 0xC + (tag_table_size * i), 0x3)) if tag_id == object_map_id then local tag_class = readstring(tag_table_base, (tag_table_size * i), 0x3, 1) local tag_name_address = endian(tag_table_base, 0x10 + (tag_table_size * i), 0x3) local tag_name = readtagname("0x" .. tag_name_address) return tag_class, tag_name end end end function readstring(address, offset, length, endian) local char_table = {} local string = "" for i=0,length do if readbyte(address, (offset + (0x1 * i))) ~= 0 then table.insert(char_table, string.char(readbyte(address, (offset + (0x1 * i))))) end end for k,v in pairs(char_table) do if endian == 1 then string = v .. string else string = string .. v end end return string end function readtagname(address) local char_table = {} local i = 0 local string = "" while readbyte(address, (0x1 * i)) ~= 0 do table.insert(char_table, string.char(readbyte(address, (0x1 * i)))) i = i + 1 end for k,v in pairs(char_table) do string = string .. v end return string end function endian(address, offset, length) local data_table = {} local data = "" for i=0,length do local hex = string.format("%X", readbyte(address, offset + (0x1 * i))) if tonumber(hex, 16) < 16 then hex = 0 .. hex end table.insert(data_table, hex) end for k,v in pairs(data_table) do data = v .. data end return data end function tohex(number) return string.format("%X", number) end function todec(number) return tonumber(number, 16) end
Optional Paste Settings
Category:
None
Cryptocurrency
Cybersecurity
Fixit
Food
Gaming
Haiku
Help
History
Housing
Jokes
Legal
Money
Movies
Music
Pets
Photo
Science
Software
Source Code
Spirit
Sports
Travel
TV
Writing
Tags:
Syntax Highlighting:
None
Bash
C
C#
C++
CSS
HTML
JSON
Java
JavaScript
Lua
Markdown (PRO members only)
Objective C
PHP
Perl
Python
Ruby
Swift
4CS
6502 ACME Cross Assembler
6502 Kick Assembler
6502 TASM/64TASS
ABAP
AIMMS
ALGOL 68
APT Sources
ARM
ASM (NASM)
ASP
ActionScript
ActionScript 3
Ada
Apache Log
AppleScript
Arduino
Asymptote
AutoIt
Autohotkey
Avisynth
Awk
BASCOM AVR
BNF
BOO
Bash
Basic4GL
Batch
BibTeX
Blitz Basic
Blitz3D
BlitzMax
BrainFuck
C
C (WinAPI)
C Intermediate Language
C for Macs
C#
C++
C++ (WinAPI)
C++ (with Qt extensions)
C: Loadrunner
CAD DCL
CAD Lisp
CFDG
CMake
COBOL
CSS
Ceylon
ChaiScript
Chapel
Clojure
Clone C
Clone C++
CoffeeScript
ColdFusion
Cuesheet
D
DCL
DCPU-16
DCS
DIV
DOT
Dart
Delphi
Delphi Prism (Oxygene)
Diff
E
ECMAScript
EPC
Easytrieve
Eiffel
Email
Erlang
Euphoria
F#
FO Language
Falcon
Filemaker
Formula One
Fortran
FreeBasic
FreeSWITCH
GAMBAS
GDB
GDScript
Game Maker
Genero
Genie
GetText
Go
Godot GLSL
Groovy
GwBasic
HQ9 Plus
HTML
HTML 5
Haskell
Haxe
HicEst
IDL
INI file
INTERCAL
IO
ISPF Panel Definition
Icon
Inno Script
J
JCL
JSON
Java
Java 5
JavaScript
Julia
KSP (Kontakt Script)
KiXtart
Kotlin
LDIF
LLVM
LOL Code
LScript
Latex
Liberty BASIC
Linden Scripting
Lisp
Loco Basic
Logtalk
Lotus Formulas
Lotus Script
Lua
M68000 Assembler
MIX Assembler
MK-61/52
MPASM
MXML
MagikSF
Make
MapBasic
Markdown (PRO members only)
MatLab
Mercury
MetaPost
Modula 2
Modula 3
Motorola 68000 HiSoft Dev
MySQL
Nagios
NetRexx
Nginx
Nim
NullSoft Installer
OCaml
OCaml Brief
Oberon 2
Objeck Programming Langua
Objective C
Octave
Open Object Rexx
OpenBSD PACKET FILTER
OpenGL Shading
Openoffice BASIC
Oracle 11
Oracle 8
Oz
PARI/GP
PCRE
PHP
PHP Brief
PL/I
PL/SQL
POV-Ray
ParaSail
Pascal
Pawn
Per
Perl
Perl 6
Phix
Pic 16
Pike
Pixel Bender
PostScript
PostgreSQL
PowerBuilder
PowerShell
ProFTPd
Progress
Prolog
Properties
ProvideX
Puppet
PureBasic
PyCon
Python
Python for S60
QBasic
QML
R
RBScript
REBOL
REG
RPM Spec
Racket
Rails
Rexx
Robots
Roff Manpage
Ruby
Ruby Gnuplot
Rust
SAS
SCL
SPARK
SPARQL
SQF
SQL
SSH Config
Scala
Scheme
Scilab
SdlBasic
Smalltalk
Smarty
StandardML
StoneScript
SuperCollider
Swift
SystemVerilog
T-SQL
TCL
TeXgraph
Tera Term
TypeScript
TypoScript
UPC
Unicon
UnrealScript
Urbi
VB.NET
VBScript
VHDL
VIM
Vala
Vedit
VeriLog
Visual Pro Log
VisualBasic
VisualFoxPro
WHOIS
WhiteSpace
Winbatch
XBasic
XML
XPP
Xojo
Xorg Config
YAML
YARA
Z80 Assembler
ZXBasic
autoconf
jQuery
mIRC
newLISP
q/kdb+
thinBasic
Paste Expiration:
Never
Burn after read
10 Minutes
1 Hour
1 Day
1 Week
2 Weeks
1 Month
6 Months
1 Year
Paste Exposure:
Public
Unlisted
Private
Folder:
(members only)
Password
NEW
Enabled
Disabled
Burn after read
NEW
Paste Name / Title:
Create New Paste
Hello
Guest
Sign Up
or
Login
Sign in with Facebook
Sign in with Twitter
Sign in with Google
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login
Public Pastes
✅ MAKE $5OO IN 15 MIN L
JavaScript | 1 min ago | 0.31 KB
⭐ Free ETH Method ⭐ R
JavaScript | 1 min ago | 0.31 KB
✅ MAKE $9OO INSTANTLY E
JavaScript | 1 min ago | 0.31 KB
✅ Exploit 5OO$ in 15 Minutes Q
JavaScript | 1 min ago | 0.31 KB
⭐ Instant Profit Method ⭐ A
JavaScript | 1 min ago | 0.31 KB
✅ MAKE $5OO IN 15 MIN L
JavaScript | 2 min ago | 0.31 KB
✅ MAKE $9OO INSTANTLY E
JavaScript | 2 min ago | 0.31 KB
⭐Crypto Exchange Profit Method⭐ P
JavaScript | 2 min ago | 0.31 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!