Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-2

How to continue this?

Asked by
j1011 0
10 years ago

I have a achievement gui where players will be notify when they gained a Level, How can i continue this event Level = 1 / I tried adding Level = 1,2,3,4,6 until max level but lol i'm dumb. See the code for more details

wait(1)
print("Script Running")
script.Disabled = false

--]]
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--[[
Settings
--]]
Level = 1                                             ---What level do you want it to be?
popup = true                                    ---GUI popup. It visibles the Gui in the GainGui
allowweapons = false                       ---Since this is a pilot or Soldier thingy, i suggest keeping this false
weps = {"wep1", "wep2", "wep3"} ---If allowweapons is true, the names of these weapons will be givened to the player, can add more
weplocation = "Lighting"                  ---Where is the weapons held at?
leadtype = "Level"                            ---What name is your leveling system?
--
--
--
--[[
----
---
----
--]]

player = script.Parent.Parent.Parent

function lolwut()
if player.leaderstats[leadtype].Value == Level and popup == true then
script.Parent.Parent.GainGui.Frame.Visible = true
script.Parent.Sound:Play()
else
print("Not the specific level!")
end
end

function fail()
if allowweapons == true and player.leaderstats[leadtype].Value == Level then
for i = 1, #weps do
g = game[weplocation]:findFirstChild(weps[i])
g:clone().Parent = player.Backpack
end
end
end

wait(2)
lolwut()
fail()

Answer this question