Confused

Hey, well I started coding upgradable printers for a darkrp server, and there is a problem, I get an error and here is what it says in the console [gamemodes\source\entities\entities\money_printer\init.lua:157] ‘<eof>’ expected near ‘end’

Here is the code

[Lua]-- RRPX Money Printer reworked for DarkRP by philxyz
– RRPX Money Printer reworked for DarkRP by philxyz
AddCSLuaFile(“cl_init.lua”)
AddCSLuaFile(“shared.lua”)
include(“shared.lua”)

local PrintMore
function ENT:Initialize()
self:SetModel(“models/props_c17/consolebox01a.mdl”)
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:SetSolid(SOLID_VPHYSICS)
local phys = self:GetPhysicsObject()
if phys:IsValid() then phys:Wake() end
self.sparking = false
self.damage = 100
self.IsMoneyPrinter = true
timer.Simple(27, PrintMore, self)
self.MPLevel = 1
if self.MPLevel == 1 then
Entity = ents.Create(“prop_physics”);
Entity = ents.Create(“prop_dynamic_override”);
Entity:SetPos(self:GetPos() + Vector(0, 0, 14))
Entity:SetAngles(self:GetAngles() - Angle(0, 0, 0));
Entity:SetModel(“models/props_c17/consolebox01a.mdl”);
Entity:SetParent(self);
Entity:Spawn();
end
end

function ENT:OnTakeDamage(dmg)
if self.burningup then return end

self.damage = (self.damage or 100) - dmg:GetDamage()
if self.damage &lt;= 0 then
    local rnd = math.random(1, 10)
    if rnd &lt; 3 then
        self:BurstIntoFlames()
    else
        self:Destruct()
        self:Remove()
    end
end

end

function ENT:Destruct()
local vPoint = self:GetPos()
local effectdata = EffectData()
effectdata:SetStart(vPoint)
effectdata:SetOrigin(vPoint)
effectdata:SetScale(1)
util.Effect(“Explosion”, effectdata)
Notify(self.dt.owning_ent, 1, 4, “Your money printer has exploded!”)
end

function ENT:BurstIntoFlames()
Notify(self.dt.owning_ent, 0, 4, “Your money printer is overheating!”)
self.burningup = true
local burntime = math.random(8, 18)
self:Ignite(burntime, 0)
timer.Simple(burntime, self.Fireball, self)
end

function ENT:Fireball()
if not self:IsOnFire() then self.burningup = false return end
local dist = math.random(20, 280) – Explosion radius
self:Destruct()
for k, v in pairs(ents.FindInSphere(self:GetPos(), dist)) do
if not v:IsPlayer() and not v.IsMoneyPrinter then v:Ignite(math.random(5, 22), 0) end
end
self:Remove()
end

PrintMore = function(ent)
if ValidEntity(ent) then
ent.sparking = true
timer.Simple(3, ent.CreateMoneybag, ent)
end
end

function ENT:CreateMoneybag()
if not ValidEntity(self) then return end
if self:IsOnFire() then return end
local MoneyPos = self:GetPos()

if math.random(10, 22) == 3 then self:BurstIntoFlames() end
 
local amount
if self.MPLevel == 1 then
    amount = math.random(50,100)
    self:EmitSound("items/spawn_item.wav", 85, 100)
elseif self.MPLevel == 2 then
    amount = math.random(200,400)
    self:EmitSound("items/spawn_item.wav", 85, 100)
elseif self.MPLevel == 3 then
    amount = math.random(300,500)
    self:EmitSound("items/spawn_item.wav", 85, 100)
end


DarkRPCreateMoneyBag(Vector(MoneyPos.x + 15, MoneyPos.y, MoneyPos.z + 15), amount)
self.sparking = false
timer.Simple(math.random(10, 15), PrintMore, self)

end

–function UpdateMP(ply, key)
– local trace = ply:GetEyeTrace()
– local e = trace.Entity
– if ValidEntity(e) and trace.HitPos:Distance(ply:GetShootPos()) <= 100 then
– if e = “vip_printer” then
– if key == “USE” and MPLevel == 1 then
– MPLevel = MPLevel + 1
– print(“models/props_c17/consolebox01a.mdl”)
– end
– end
– end
–end

function ENT:Use( activator, caller )

if activator != self.dt.owning_ent then
    Notify( activator, 1, 4, "You're not the Owner of the Money Printer." )
    return
end
 
if self.MPLevel == 1 then
    if not activator:CanAfford(1000) then
        Notify(activator, 1, 10, "You can't afford it!")
        return
    end
    activator:AddMoney(-1000)
    self:SetPos(self:GetPos() + Vector(0,0,10))
    self:SetModel("models/props_c17/consolebox01a.mdl")
    self:PhysicsInit(SOLID_VPHYSICS)
    self:SetMoveType(MOVETYPE_VPHYSICS)
    self:SetSolid(SOLID_VPHYSICS)
    self.MPLevel = 2
    Notify( activator, 1, 4, "Your Money Printer is now Level 2" )
end

end

if self.MPLevel == 2 then
    if not activator:CanAfford(3000) then
        Notify(activator, 1, 10, "You can't afford it!")
        return
    end
    activator:AddMoney(-3000)
    self:SetPos(self:GetPos() + Vector(0,0,10))
    self:SetModel("models/props_c17/consolebox01a.mdl")
    self:PhysicsInit(SOLID_VPHYSICS)
    self:SetMoveType(MOVETYPE_VPHYSICS)
    self:SetSolid(SOLID_VPHYSICS)
    self.MPLevel = 2
    Notify( activator, 1, 4, "Your Money Printer is now Level 3" )
end

end

function ENT:Think()
if not self.sparking then return end

local effectdata = EffectData()
effectdata:SetOrigin(self:GetPos())
effectdata:SetMagnitude(1)
effectdata:SetScale(1)
effectdata:SetRadius(2)
util.Effect("Sparks", effectdata)

end[/lua]

Remove the ‘end’ on line 141

Thank you nonSENSE.