Mouse.KeyDown:connect(function(key) if key == "q" then if game.Players.LocalPlayer.leaderstats.Level.Value == 1 then if Banana == 1 then game.Players.LocalPlayer.leaderstats.Exp.Value = game.Players.LocalPlayer.leaderstats.Exp.Value + 10 Part = Instance.new("Part", workspace) Banana = 0 Part.CanCollide = false Part.Transparency = 1 c = game.Workspace["Clone Scripts"].FireBoltDamage:Clone() c.Name = "Damage" c.Parent = Part FireParticles = Instance.new("ParticleEmitter", Part) FireParticles.Color = ColorSequence.new(Color3.fromRGB(255, 128, 16)) FireParticles.Lifetime = NumberRange.new(0.1, 0.5) FireParticles.LightEmission = 0.25 FireParticles.Size = NumberSequence.new(10) FireParticles.LockedToPart = true FireParticles.Speed = NumberRange.new(1) FireParticles.Rate = 20 PartMovement = Instance.new("BodyVelocity", Part) Part.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame * CFrame.new(1, 1, -5) Part.BodyVelocity.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 85 wait(3) Part:Destroy() wait(0.1) game.Players.LocalPlayer.leaderstats.Exp.Value = game.Players.LocalPlayer.leaderstats.Exp.Value + 10 Part = Instance.new("Part", workspace) Part.CanCollide = false Part.Transparency = 1 c = game.Workspace["Clone Scripts"].FireBoltDamage:Clone() c.Name = "Damage" c.Parent = Part FireParticles = Instance.new("ParticleEmitter", Part) FireParticles.Color = ColorSequence.new(Color3.fromRGB(255, 128, 16)) FireParticles.Lifetime = NumberRange.new(0.1, 0.5) FireParticles.LightEmission = 0.25 FireParticles.Size = NumberSequence.new(10) FireParticles.LockedToPart = true FireParticles.Speed = NumberRange.new(1) FireParticles.Rate = 20 PartMovement = Instance.new("BodyVelocity", Part) Part.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame * CFrame.new(1, 1, -5) Part.BodyVelocity.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 85 wait(3) Part:Destroy() wait(0.1) game.Players.LocalPlayer.leaderstats.Exp.Value = game.Players.LocalPlayer.leaderstats.Exp.Value + 10 Part = Instance.new("Part", workspace) Part.CanCollide = false Part.Transparency = 1 c = game.Workspace["Clone Scripts"].FireBoltDamage:Clone() c.Name = "Damage" c.Parent = Part FireParticles = Instance.new("ParticleEmitter", Part) FireParticles.Color = ColorSequence.new(Color3.fromRGB(255, 128, 16)) FireParticles.Lifetime = NumberRange.new(0.1, 0.5) FireParticles.LightEmission = 0.25 FireParticles.Size = NumberSequence.new(10) FireParticles.LockedToPart = true FireParticles.Speed = NumberRange.new(1) FireParticles.Rate = 20 PartMovement = Instance.new("BodyVelocity", Part) Part.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame * CFrame.new(1, 1, -5) Part.BodyVelocity.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 85 wait(3) Part:Destroy() wait(0.1) game.Players.LocalPlayer.leaderstats.Exp.Value = game.Players.LocalPlayer.leaderstats.Exp.Value + 10 Part = Instance.new("Part", workspace) Part.CanCollide = false Part.Transparency = 1 c = game.Workspace["Clone Scripts"].FireBoltDamage:Clone() c.Name = "Damage" c.Parent = Part FireParticles = Instance.new("ParticleEmitter", Part) FireParticles.Color = ColorSequence.new(Color3.fromRGB(255, 128, 16)) FireParticles.Lifetime = NumberRange.new(0.1, 0.5) FireParticles.LightEmission = 0.25 FireParticles.Size = NumberSequence.new(10) FireParticles.LockedToPart = true FireParticles.Speed = NumberRange.new(1) FireParticles.Rate = 20 PartMovement = Instance.new("BodyVelocity", Part) Part.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame * CFrame.new(1, 1, -5) Part.BodyVelocity.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 85 wait(3) Part:Destroy() wait(0.1) Banana = 1 end end end end end
The error I keep getting is "<eof> expected near end" and I cannot for the life of me figure out why this happens and how to stop it.
The script doesn't work without it.
You're using an extra end and using a connect function, which requires an ending )
If you use a normal function, you don't have to use the )
; however, if you use it in a connect function, you need to have a )
on the end. I.e end)
.
Sorry if I made that confusing :P.
Mouse.KeyDown:connect(function(key) if key == "q" then if game.Players.LocalPlayer.leaderstats.Level.Value == 1 then if Banana == 1 then game.Players.LocalPlayer.leaderstats.Exp.Value = game.Players.LocalPlayer.leaderstats.Exp.Value + 10 Part = Instance.new("Part", workspace) Banana = 0 Part.CanCollide = false Part.Transparency = 1 c = game.Workspace["Clone Scripts"].FireBoltDamage:Clone() c.Name = "Damage" c.Parent = Part FireParticles = Instance.new("ParticleEmitter", Part) FireParticles.Color = ColorSequence.new(Color3.fromRGB(255, 128, 16)) FireParticles.Lifetime = NumberRange.new(0.1, 0.5) FireParticles.LightEmission = 0.25 FireParticles.Size = NumberSequence.new(10) FireParticles.LockedToPart = true FireParticles.Speed = NumberRange.new(1) FireParticles.Rate = 20 PartMovement = Instance.new("BodyVelocity", Part) Part.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame * CFrame.new(1, 1, -5) Part.BodyVelocity.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 85 wait(3) Part:Destroy() wait(0.1) game.Players.LocalPlayer.leaderstats.Exp.Value = game.Players.LocalPlayer.leaderstats.Exp.Value + 10 Part = Instance.new("Part", workspace) Part.CanCollide = false Part.Transparency = 1 c = game.Workspace["Clone Scripts"].FireBoltDamage:Clone() c.Name = "Damage" c.Parent = Part FireParticles = Instance.new("ParticleEmitter", Part) FireParticles.Color = ColorSequence.new(Color3.fromRGB(255, 128, 16)) FireParticles.Lifetime = NumberRange.new(0.1, 0.5) FireParticles.LightEmission = 0.25 FireParticles.Size = NumberSequence.new(10) FireParticles.LockedToPart = true FireParticles.Speed = NumberRange.new(1) FireParticles.Rate = 20 PartMovement = Instance.new("BodyVelocity", Part) Part.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame * CFrame.new(1, 1, -5) Part.BodyVelocity.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 85 wait(3) Part:Destroy() wait(0.1) game.Players.LocalPlayer.leaderstats.Exp.Value = game.Players.LocalPlayer.leaderstats.Exp.Value + 10 Part = Instance.new("Part", workspace) Part.CanCollide = false Part.Transparency = 1 c = game.Workspace["Clone Scripts"].FireBoltDamage:Clone() c.Name = "Damage" c.Parent = Part FireParticles = Instance.new("ParticleEmitter", Part) FireParticles.Color = ColorSequence.new(Color3.fromRGB(255, 128, 16)) FireParticles.Lifetime = NumberRange.new(0.1, 0.5) FireParticles.LightEmission = 0.25 FireParticles.Size = NumberSequence.new(10) FireParticles.LockedToPart = true FireParticles.Speed = NumberRange.new(1) FireParticles.Rate = 20 PartMovement = Instance.new("BodyVelocity", Part) Part.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame * CFrame.new(1, 1, -5) Part.BodyVelocity.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 85 wait(3) Part:Destroy() wait(0.1) game.Players.LocalPlayer.leaderstats.Exp.Value = game.Players.LocalPlayer.leaderstats.Exp.Value + 10 Part = Instance.new("Part", workspace) Part.CanCollide = false Part.Transparency = 1 c = game.Workspace["Clone Scripts"].FireBoltDamage:Clone() c.Name = "Damage" c.Parent = Part FireParticles = Instance.new("ParticleEmitter", Part) FireParticles.Color = ColorSequence.new(Color3.fromRGB(255, 128, 16)) FireParticles.Lifetime = NumberRange.new(0.1, 0.5) FireParticles.LightEmission = 0.25 FireParticles.Size = NumberSequence.new(10) FireParticles.LockedToPart = true FireParticles.Speed = NumberRange.new(1) FireParticles.Rate = 20 PartMovement = Instance.new("BodyVelocity", Part) Part.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame * CFrame.new(1, 1, -5) Part.BodyVelocity.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 85 wait(3) Part:Destroy() wait(0.1) Banana = 1 end end end end)
If you're using a function like this, you need to use ) at the last 'end' of your function script.