Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hook.Add("PlayerSay","accessden", function(ply, msg)
- if msg == "!rtd" then
- ply:PrintMessage(HUD_PRINTTALK, "This addon is not released yet.")
- end
- end)
- // ty "White Noise"
- function PrintAll( text )
- for k,v in pairs (player.GetAll()) do
- v:PrintMessage( HUD_PRINTTALK, text )
- end
- end
- allowedGroups = {}
- allowedGroups.ulx = { // sktable
- "donator",
- "superadmin",
- "admin",
- "moderator",
- "developer",
- "owner",
- "badmin",
- "trusted" }
- debugEnabled = 1
- if debugEnabled == 1 then
- hook.Add("PlayerSay","debug",function(ply,text)
- if text == "!debug" then
- PrintMessage(HUD_PRINTTALK, "Status: 1")
- end
- end)
- end
- hook.Add("PlayerSay","don8or", function(ply, msg)
- if msg == "!rtd" && (ply:IsUserGroup("user")) then // yes another function but i don't care
- ply:PrintMessage(HUD_PRINTTALK, "You must be a member to roll the dice.")
- end
- end)
- hook.Add( "PlayerSay", "Roll The Dice", function( ply, text )
- if text=="!rtd" and ply:GetNWBool( "rtd_delay" )==false and ply:Alive() && (!ply:IsUserGroup("user") ) then// || ply:IsUserGroup("member")) then // usergroup modification
- ply:SetNWBool( "rtd_delay", true )
- dy = os.time()
- timer.Simple( 90, function() // time modified
- ply:SetNWBool( "rtd_delay", false )
- end)
- local dice = math.random(1,16)
- if dice==1 then
- ply:Ignite( 3 )
- PrintAll( ply:Nick().." was set on fire!" )
- elseif dice==2 then
- ply:SetHealth( ply:Health()+math.random(-25,25) )
- PrintAll( ply:Nick().." got his health got altered!" )
- elseif dice==3 then
- ply:SetNWInt( "colors", 1 )
- PrintAll( ply:Nick().." can now change the color of props with their use button!" )
- elseif dice==4 then
- ply:SetHealth( 105 )
- PrintAll( ply:Nick() .." got his health set to 105! " )
- elseif dice==5 then
- PrintAll( ply:Nick() .." is now an ammo magnet!" )
- hook.Add( "Think", "Magnet_"..ply:Nick(), function()
- local et = ents.FindInSphere( ply:GetPos(), 128 )
- for k,v in pairs (et) do
- if string.find( v:GetClass(), "item" ) and ply:Alive() then // hehe, i like dis
- v:GetPhysicsObject():SetVelocity( ply:GetPos()-v:GetPos() )
- end
- end
- end)
- elseif dice==6 then
- local randtime = math.random( 4,16 )
- ply:SetEyeAngles( Angle( 0, 0, 180 ) )
- timer.Simple( randtime, function()
- ply:SetEyeAngles( Angle( 0, 0, 0 ) )
- end)
- PrintAll( ply:Nick().." got their vision flipped for "..randtime.." seconds!" )
- elseif dice==7 then
- local poop = ents.Create( "prop_physics" )
- poop:SetModel( "models/Gibs/HGIBS_spine.mdl" )
- poop:Spawn()
- poop:SetPos( ply:GetPos()+Vector(0,0,35) )
- poop:SetMaterial( "models/debug/debugwhite" )
- poop:SetColor( Color( 51, 40, 28, 255) )
- ply:EmitSound( "npc/barnacle/barnacle_crunch3.wav" )
- PrintAll( ply:Nick().." took a solid crap!" )
- // silentk code beyond this point
- elseif dice == 8 then
- //local name = ply:Nick()
- //RunConsoleCommand("ulx","maul", ply:Nick())
- PrintAll(ply:Nick() .. " ponders as nothing happened.")
- elseif dice == 9 then
- local name = ply:Nick()
- RunConsoleCommand("ulx","slap", ply:Nick())
- PrintAll(name .. " was slapped!")
- elseif dice==10 then
- local randtime = math.random( 1,10 )
- ply:GodEnable()
- timer.Simple( randtime, function()
- ply:GodDisable()
- end)
- PrintAll( ply:Nick().." is invincible for "..randtime.." seconds!" )
- elseif dice==11 then // works
- ply:Give("weapon_ttt_knife")
- PrintAll( ply:Nick().." was given a knife!")
- elseif dice==12 then
- local randval = math.random(10, 75)
- ply:Armor(randval)
- PrintAll( ply:Nick().." was given armor that has an armor value of " .. randval )
- elseif dice==13 then
- points = math.random(25,400)
- PrintAll(ply:Nick().." was given " .. points .. " to spend in the pointshop!")
- RunConsoleCommand("ps_givepoints",ply:Nick()..points)
- elseif dice==14 then // works
- if ply:Health() > 67 then
- PrintAll( ply:Nick() .." rolled number 14 and nothing happened ... Strange.")
- else
- local bhealth = ply:Health()
- local halved = bhealth / 2
- local setter = bhealth + halved
- ply:SetHealth(setter)
- PrintAll( ply:Nick().." has had half their health restored!" )
- end
- elseif dice==15 then // works
- local bhealth = ply:Health()
- local halved = bhealth / 2
- local setter = bhealth - halved
- ply:SetHealth(setter)
- PrintAll( ply:Nick().." has been damaged half of their health!" )
- elseif dice==16 then
- PrintAll(ply:Nick().." rolls the jackpot dice and gets: ")
- local jackpot = math.random( 1, 1000 )
- if jackpot == 1 then
- PrintAll("****Something Extremely Rare!")
- RunConsoleCommand("ulx","forcenr", ply:Nick(),traitor)
- elseif jackpot > 1 && jackpot < 26 then
- ply:SetHealth(200)
- PrintAll("***A Massive Health Boost!")
- elseif jackpot > 25 && jackpot < 76 then
- ply:Give("weapon_ttt_knife")
- PrintAll("**A Knife!")
- elseif jackpot > 75 && jackpot < 176 then
- local jackarmor = math.random(50, 255)
- ply:Armor(jackarmor)
- PrintAll("*Heavy Duty Armor!")
- elseif jackpot > 175 then
- PrintAll("Nothing! Unlucky ...")
- end
- end
- elseif text=="!rtd" and ply:GetNWInt( "rtd_delay" ) and ply:Alive() then
- dx = os.time()
- time = dy - dx // okay so you get integers here going up, we want em going down so ...
- // invert and add 90
- timeleft = time + 90
- ply:PrintMessage( HUD_PRINTTALK, "Please wait ".. timeleft .." seconds before RTDing again!" ) // time modification
- elseif not ply:Alive() and text=="!rtd" then
- ply:PrintMessage( HUD_PRINTTALK, "You cannot !rtd while dead!" )
- end
- end)
- hook.Add( "PlayerDeath", "Remove_Hooks", function( ply )
- hook.Remove( "Think", "Magnet_"..ply:Nick() )
- ply:SetNWInt( "colors", 0 )
- end)
- hook.Add( "PlayerUse", "Color Change", function( ply, ent )
- if ply:Alive() and ply:GetNWInt( "colors" )==1 then
- ent:SetColor( Color( math.random(1,255), math.random(1,255), math.random(1,255), 255 ) )
- end
- end) --]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement