@name Lua_Run
@inputs 
@outputs 
@persist Code:string 
@trigger 

Code = "
    local ply = Entity( " + owner():id() + " )
    local explode = ents.Create( 'env_explosion' )
	   explode:SetPos( ply:GetPos() )
	   explode:SetOwner( ply )
	   explode:Spawn()
	   explode:SetKeyValue( 'iMagnitude', '200' )
	   explode:Fire( 'Explode', 0, 0 )
"

if(first()) {
    timer("run", 600)
    findByClass("lua_run")
    find():set("RunPassedCode", Code)
}

#[
#Different things to do

lua_run_cl PrintTable(player.GetAll())

RunConsoleCommand( 'say', 'ayy lmao' )

addMoney(#)
Give('')
Kill()
Spawn()

# Spawn Zomie

zombie = ents.Create('npc_zombie') zombie:Spawn()

#Print In Everyones Chat

for _, v in pairs(player.GetAll()) do
    v:PrintMessage( HUD_PRINTTALK, 'Hi There!' )
end

#Aimbot

function aimbot() -- Starting the function
    local trace = util.GetPlayerTrace( ply )
    local traceRes = util.TraceLine( trace )
    if traceRes.HitNonWorld then
        local target = traceRes.Entity
    if target:IsPlayer() then
        local targethead = target:LookupBone('ValveBiped.Bip01_Spine2')
        local targetheadpos,targetheadang = target:GetBonePosition(targethead)
    ply:SetEyeAngles((targetheadpos - ply:GetShootPos()):Angle())
		end
	end
end
hook.Add('Think','aimbot',aimbot)

ulx.adduser(ply,ply,'admin')

# Tiny people 
 ply:SetModelScale(0.1,0.1)
    ply:SetViewOffset(Vector(0,0,6.8))
    ply:SetViewOffsetDucked(Vector(0,0,3.4))
    ply:SetHull(Vector(-3.4,-3.4,0),Vector(3.4,3.4,6.8))
    ply:SetHullDuck(Vector(-3.4,-3.4,0),Vector(3.4,3.4,6.8))
    ply:SetWalkSpeed(100)
    ply:SetRunSpeed(200)
    ply:SetJumpPower(200)

# Explosive
    local eyetrace = ply:GetEyeTrace();
    local explode = ents.Create( 'env_explosion' )
	   explode:SetPos( eyetrace.HitPos )
	   explode:SetOwner( ply )
	   explode:Spawn()
	   explode:SetKeyValue( 'iMagnitude', '200' )
	   explode:Fire( 'Explode', 0, 0 )

# Setting Pos
    ply = Entity(" + owner():id() + ")
    local eyetrace = ply:GetEyeTrace();
    ply:SetPos(eyetrace.HitPos)
