Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Run = game:GetService("RunService")
- function Quests(Player)
- print(Player)
- local Player = Player
- if Player.PlayerGui:FindFirstChild("Note") == nil then
- if Player.Progress.Value == 0 then
- --NEW QUEST
- Note = game.SoundService.Note:clone()
- Note.Parent = Player.PlayerGui
- x = Note.Paper
- min = 1
- max = 1
- min = min +Player.Quest.Value /20
- if min >= 10 then
- min = 10
- end
- min = math.floor(min)
- max = max +Player.Quest.Value /8
- max = math.floor(max)
- if max >= 20 then
- max = 20
- end
- i = math.random(1,5)
- result = math.random(min, max)
- Difficulty = math.floor(result)
- if i == 1 then
- x.Ammount.Text = "Defeat " ..result
- Player.QuestThrase.Value = 1
- elseif i == 2 then
- x.Ammount.Text = "Destroy " ..result
- Player.QuestThrase.Value = 2
- elseif i == 3 then
- x.Ammount.Text = "Wipe out " ..result
- Player.QuestThrase.Value = 3
- elseif i == 4 then
- x.Ammount.Text = "Kill " ..result
- Player.QuestThrase.Value = 4
- elseif i == 5 then
- x.Ammount.Text = "Anihalate " ..result
- Player.QuestThrase.Value = 5
- end
- Player.Kills.Value = 0
- Player.Goal.Value = result
- Tasks = {"Lightball"}
- if Player.Quest.Value >= 2 then
- table.insert(Tasks, "Sandball")
- end
- if Player.Quest.Value >= 5 then
- table.insert(Tasks, "Earthball")
- end
- if Player.Quest.Value >= 7 then
- table.insert(Tasks, "Grassball")
- end
- if Player.Quest.Value >= 9 then
- table.insert(Tasks, "Treetroll")
- end
- if Player.Quest.Value >= 12 then
- table.insert(Tasks, "Rockball")
- end
- if Player.Quest.Value >= 14 then
- table.insert(Tasks, "Waterball")
- end
- if Player.Quest.Value >= 16 then
- table.insert(Tasks, "Troll")
- end
- if Player.Quest.Value >= 25 then
- table.insert(Tasks, "Boulderball")
- end
- if Player.Quest.Value >= 32 then
- table.insert(Tasks, "Flamuga")
- end
- if Player.Quest.Value >= 50 then
- table.insert(Tasks, "Dasha")
- end
- if Player.Quest.Value >= 75 then
- table.insert(Tasks, "Giant")
- end
- if Player.Quest.Value >= 100 then
- table.insert(Tasks, "Iceuron")
- end
- if Player.Quest.Value >= 150 then
- table.insert(Tasks, "Mizugame")
- end
- i = math.random(1,#Tasks)
- x.Task.Text = Tasks[i]
- Player.NPC.Value = Tasks[i]
- Difadd = 0
- if Player.NPC.Value == "Lightball" then
- Difadd = 1
- elseif Player.NPC.Value == "Sandball" then
- Difadd = 2
- elseif Player.NPC.Value == "Earthball" then
- Difadd = 3
- elseif Player.NPC.Value == "Grassball" then
- Difadd = 4
- elseif Player.NPC.Value == "Treetroll" then
- Difadd = 5
- elseif Player.NPC.Value == "Rockball" then
- Difadd = 6
- elseif Player.NPC.Value == "Waterball" then
- Difadd = 7
- elseif Player.NPC.Value == "Troll" then
- Difadd = 8
- elseif Player.NPC.Value == "Boulderball" then
- Difadd = 9
- elseif Player.NPC.Value == "Flamuga" then
- Difadd = 10
- elseif Player.NPC.Value == "Dasha" then
- Difadd = 14
- elseif Player.NPC.Value == "Giant" then
- Difadd = 17
- elseif Player.NPC.Value == "Iceuron" then
- Difadd = 22
- elseif Player.NPC.Value == "Mizugame" then
- Difadd = 26
- end
- difb = 1
- difc = Difadd /30
- difd = 1 *Difadd
- if difd < 1 then
- difd = 1
- end
- Difficulty = Difficulty *difd
- math.floor(Difficulty)
- Fd = Difficulty +Difadd
- if Fd == 1 or Fd == 2 then
- Rank = "G-"
- elseif Fd == 3 or Fd == 4 then
- Rank = "G"
- elseif Fd == 5 or Fd == 6 then
- Rank = "G+"
- elseif Fd == 7 or Fd == 8 then
- Rank = "F-"
- elseif Fd == 9 or Fd == 10 then
- Rank = "F"
- elseif Fd == 11 or Fd == 12 then
- Rank = "F+"
- elseif Fd == 13 or Fd == 14 then
- Rank = "E-"
- elseif Fd == 15 or Fd == 16 then
- Rank = "E"
- elseif Fd == 17 or Fd == 18 then
- Rank = "E+"
- elseif Fd == 19 or Fd == 20 then
- Rank = "D-"
- elseif Fd == 21 or Fd == 22 then
- Rank = "D"
- elseif Fd == 23 or Fd == 24 then
- Rank = "D+"
- elseif Fd == 25 or Fd == 26 then
- Rank = "C-"
- elseif Fd == 27 or Fd == 28 then
- Rank = "C"
- elseif Fd == 29 or Fd == 30 then
- Rank = "C+"
- elseif Fd == 31 or Fd == 32 then
- Rank = "B-"
- elseif Fd == 33 or Fd == 34 then
- Rank = "B"
- elseif Fd == 35 or Fd == 36 then
- Rank = "B+"
- elseif Fd == 37 or Fd == 38 then
- Rank = "A-"
- elseif Fd == 39 or Fd == 40 then
- Rank = "A"
- elseif Fd == 41 or Fd == 42 then
- Rank = "A+"
- elseif Fd == 43 or Fd == 44 or Fd == 45 or Fd == 46 then
- Rank = "S"
- elseif Fd >= 47 and Fd <= 80 then
- Rank = "SS"
- elseif Fd > 80 and Fd <= 125 then
- Rank = "SS+"
- elseif Fd > 125 and Fd <= 200 then
- Rank = "Barely possible"
- elseif Fd > 200 and Fd <= 299 then
- Rank = "Impossible"
- elseif Fd > 299 and Fd < 399 then
- Rank = "Death"
- elseif Fd >= 400 then
- Rank = "God"
- end
- Player.QuestDifficulty.Value = Fd
- x.Difficulty.Text = "Difficulty: " ..Rank
- Player.Progress.Value = 1
- stuff = Player:GetChildren()
- for i = 1, #stuff do
- if stuff[i].ClassName == "StringValue" then
- Player:SaveString(stuff[i].Name, stuff[i].Value)
- Run.Stepped:wait()
- elseif stuff[i].ClassName == "IntValue" then
- Player:SaveNumber(stuff[i].Name, stuff[i].Value)
- Run.Stepped:wait()
- end
- end
- elseif Player.Progress.Value == 1 then
- --LOAD QUEST
- Note = game.SoundService.Note:clone()
- Note.Parent = Player.PlayerGui
- x = Note.Paper
- result = Player.Goal.Value
- i = Player.QuestThrase.Value
- if i == 1 then
- x.Ammount.Text = "Defeat " ..result
- Player.QuestThrase.Value = 1
- elseif i == 2 then
- x.Ammount.Text = "Destroy " ..result
- Player.QuestThrase.Value = 2
- elseif i == 3 then
- x.Ammount.Text = "Wipe out " ..result
- Player.QuestThrase.Value = 3
- elseif i == 4 then
- x.Ammount.Text = "Kill " ..result
- Player.QuestThrase.Value = 4
- elseif i == 5 then
- x.Ammount.Text = "Anihalate " ..result
- Player.QuestThrase.Value = 5
- end
- Fd = Player.QuestDifficulty.Value
- if Fd == 1 or Fd == 2 then
- Rank = "G-"
- elseif Fd == 3 or Fd == 4 then
- Rank = "G"
- elseif Fd == 5 or Fd == 6 then
- Rank = "G+"
- elseif Fd == 7 or Fd == 8 then
- Rank = "F-"
- elseif Fd == 9 or Fd == 10 then
- Rank = "F"
- elseif Fd == 11 or Fd == 12 then
- Rank = "F+"
- elseif Fd == 13 or Fd == 14 then
- Rank = "E-"
- elseif Fd == 15 or Fd == 16 then
- Rank = "E"
- elseif Fd == 17 or Fd == 18 then
- Rank = "E+"
- elseif Fd == 19 or Fd == 20 then
- Rank = "D-"
- elseif Fd == 21 or Fd == 22 then
- Rank = "D"
- elseif Fd == 23 or Fd == 24 then
- Rank = "D+"
- elseif Fd == 25 or Fd == 26 then
- Rank = "C-"
- elseif Fd == 27 or Fd == 28 then
- Rank = "C"
- elseif Fd == 29 or Fd == 30 then
- Rank = "C+"
- elseif Fd == 31 or Fd == 32 then
- Rank = "B-"
- elseif Fd == 33 or Fd == 34 then
- Rank = "B"
- elseif Fd == 35 or Fd == 36 then
- Rank = "B+"
- elseif Fd == 37 or Fd == 38 then
- Rank = "A-"
- elseif Fd == 39 or Fd == 40 then
- Rank = "A"
- elseif Fd == 41 or Fd == 42 then
- Rank = "A+"
- elseif Fd == 43 or Fd == 44 or Fd == 45 or Fd == 46 then
- Rank = "S"
- elseif Fd >= 47 and Fd <= 80 then
- Rank = "SS"
- elseif Fd > 80 and Fd <= 125 then
- Rank = "SS+"
- elseif Fd > 125 and Fd <= 200 then
- Rank = "Barely possible"
- elseif Fd > 200 and Fd <= 299 then
- Rank = "Impossible"
- elseif Fd > 299 and Fd < 399 then
- Rank = "Death"
- elseif Fd >= 400 then
- Rank = "God"
- end
- x.Task.Text = Player.NPC.Value
- x.Difficulty.Text = "Difficulty: " ..Rank
- end
- end
- end
- script.Parent.ClickDetector.MouseClick:connect(Quests)
- function Quests2(Playero)
- if game.Players:FindFirstChild(Playero.Parent.Name) then
- Player = game.Players:FindFirstChild(Playero.Parent.Name)
- player = Player
- if player.Character:FindFirstChild("QB") == nil then
- QB = Instance.new("IntValue", Player.Character)
- QB.Name = "QB"
- game.Debris:AddItem(QB, 10)
- if player.Progress.Value == 0 then
- game:GetService("Chat"):Chat(game.Workspace.Azarif.Head,"You haven't taken a request " ..player.Name ..".")
- elseif player.Progress.Value == 1 then
- if player.Kills.Value < player.Goal.Value then
- aleft = player.Goal.Value -player.Kills.Value
- game:GetService("Chat"):Chat(game.Workspace.Azarif.Head,"You still have " ..aleft .." " ..player.NPC.Value .." remaining.")
- elseif player.Kills.Value >= player.Goal.Value then
- if player.QuestDifficulty.Value < 40 then
- game:GetService("Chat"):Chat(game.Workspace.Azarif.Head,"Good work " ..player.Name)
- elseif player.QuestDifficulty.Value > 40 then
- if player.QuestDifficulty.Value <= 100 then
- game:GetService("Chat"):Chat(game.Workspace.Azarif.Head,"Good work " ..player.Name .." that request was quite a challenging one.")
- elseif player.QuestDifficulty.Value >= 101 then
- game:GetService("Chat"):Chat(game.Workspace.Azarif.Head,"Good work " ..player.Name ..", that request was very difficult.")
- end
- end
- wait(1.5)
- Reward = player.QuestDifficulty.Value
- game:GetService("Chat"):Chat(game.Workspace.Azarif.Head,"The reward is " ..Reward .." Drelch.")
- player.Progress.Value = 0
- player.QuestDifficulty.Value = 0
- player.Kills.Value = 0
- player.Goal.Value = ""
- player.QuestThrase.Value = ""
- player.NPC.Value = ""
- player.Quest.Value = player.Quest.Value +1
- player.Drel.Value = player.Drel.Value +Reward
- player.Progress.Value = 0
- player:SaveNumber("Progress", player.Progress.Value)
- player:SaveNumber("Drel", player.Drel.Value)
- player:SaveNumber("Quest", player.Quest.Value)
- player:SaveString("NPC", player.NPC.Value)
- player:SaveNumber("QuestThrase", player.QuestThrase.Value)
- player:SaveNumber("Goal", Player.Goal.Value)
- player:SaveNumber("Kills", Player.Kills.Value)
- player.SaveNumber("QuestDifficulty", Player.QuestDifficulty.Value)
- end
- end
- end
- print(Player)
- local Player = Player
- if Player.PlayerGui:FindFirstChild("Note") == nil then
- if Player.Progress.Value == 0 then
- --NEW QUEST
- Note = game.SoundService.Note:clone()
- Note.Parent = Player.PlayerGui
- x = Note.Paper
- min = 1
- max = 1
- min = min +Player.Quest.Value /20
- if min >= 10 then
- min = 10
- end
- min = math.floor(min)
- max = max +Player.Quest.Value /8
- max = math.floor(max)
- if max >= 20 then
- max = 20
- end
- i = math.random(1,5)
- result = math.random(min, max)
- Difficulty = math.floor(result)
- if i == 1 then
- x.Ammount.Text = "Defeat " ..result
- Player.QuestThrase.Value = 1
- elseif i == 2 then
- x.Ammount.Text = "Destroy " ..result
- Player.QuestThrase.Value = 2
- elseif i == 3 then
- x.Ammount.Text = "Wipe out " ..result
- Player.QuestThrase.Value = 3
- elseif i == 4 then
- x.Ammount.Text = "Kill " ..result
- Player.QuestThrase.Value = 4
- elseif i == 5 then
- x.Ammount.Text = "Anihalate " ..result
- Player.QuestThrase.Value = 5
- end
- Player.Kills.Value = 0
- Player.Goal.Value = result
- Tasks = {"Lightball"}
- if Player.Quest.Value >= 2 then
- table.insert(Tasks, "Sandball")
- end
- if Player.Quest.Value >= 5 then
- table.insert(Tasks, "Earthball")
- end
- if Player.Quest.Value >= 7 then
- table.insert(Tasks, "Grassball")
- end
- if Player.Quest.Value >= 9 then
- table.insert(Tasks, "Treetroll")
- end
- if Player.Quest.Value >= 12 then
- table.insert(Tasks, "Rockball")
- end
- if Player.Quest.Value >= 14 then
- table.insert(Tasks, "Waterball")
- end
- if Player.Quest.Value >= 16 then
- table.insert(Tasks, "Troll")
- end
- if Player.Quest.Value >= 25 then
- table.insert(Tasks, "Boulderball")
- end
- if Player.Quest.Value >= 32 then
- table.insert(Tasks, "Flamuga")
- end
- if Player.Quest.Value >= 50 then
- table.insert(Tasks, "Dasha")
- end
- if Player.Quest.Value >= 75 then
- table.insert(Tasks, "Giant")
- end
- if Player.Quest.Value >= 100 then
- table.insert(Tasks, "Iceuron")
- end
- if Player.Quest.Value >= 150 then
- table.insert(Tasks, "Mizugame")
- end
- i = math.random(1,#Tasks)
- x.Task.Text = Tasks[i]
- Player.NPC.Value = Tasks[i]
- Difadd = 0
- if Player.NPC.Value == "Lightball" then
- Difadd = 1
- elseif Player.NPC.Value == "Sandball" then
- Difadd = 2
- elseif Player.NPC.Value == "Earthball" then
- Difadd = 3
- elseif Player.NPC.Value == "Grassball" then
- Difadd = 4
- elseif Player.NPC.Value == "Treetroll" then
- Difadd = 5
- elseif Player.NPC.Value == "Rockball" then
- Difadd = 6
- elseif Player.NPC.Value == "Waterball" then
- Difadd = 7
- elseif Player.NPC.Value == "Troll" then
- Difadd = 8
- elseif Player.NPC.Value == "Boulderball" then
- Difadd = 9
- elseif Player.NPC.Value == "Flamuga" then
- Difadd = 10
- elseif Player.NPC.Value == "Dasha" then
- Difadd = 14
- elseif Player.NPC.Value == "Giant" then
- Difadd = 17
- elseif Player.NPC.Value == "Iceuron" then
- Difadd = 22
- elseif Player.NPC.Value == "Mizugame" then
- Difadd = 26
- end
- difb = 1
- difc = Difadd /30
- difd = 1 *Difadd
- if difd < 1 then
- difd = 1
- end
- Difficulty = Difficulty *difd
- math.floor(Difficulty)
- Fd = Difficulty +Difadd
- if Fd == 1 or Fd == 2 then
- Rank = "G-"
- elseif Fd == 3 or Fd == 4 then
- Rank = "G"
- elseif Fd == 5 or Fd == 6 then
- Rank = "G+"
- elseif Fd == 7 or Fd == 8 then
- Rank = "F-"
- elseif Fd == 9 or Fd == 10 then
- Rank = "F"
- elseif Fd == 11 or Fd == 12 then
- Rank = "F+"
- elseif Fd == 13 or Fd == 14 then
- Rank = "E-"
- elseif Fd == 15 or Fd == 16 then
- Rank = "E"
- elseif Fd == 17 or Fd == 18 then
- Rank = "E+"
- elseif Fd == 19 or Fd == 20 then
- Rank = "D-"
- elseif Fd == 21 or Fd == 22 then
- Rank = "D"
- elseif Fd == 23 or Fd == 24 then
- Rank = "D+"
- elseif Fd == 25 or Fd == 26 then
- Rank = "C-"
- elseif Fd == 27 or Fd == 28 then
- Rank = "C"
- elseif Fd == 29 or Fd == 30 then
- Rank = "C+"
- elseif Fd == 31 or Fd == 32 then
- Rank = "B-"
- elseif Fd == 33 or Fd == 34 then
- Rank = "B"
- elseif Fd == 35 or Fd == 36 then
- Rank = "B+"
- elseif Fd == 37 or Fd == 38 then
- Rank = "A-"
- elseif Fd == 39 or Fd == 40 then
- Rank = "A"
- elseif Fd == 41 or Fd == 42 then
- Rank = "A+"
- elseif Fd == 43 or Fd == 44 or Fd == 45 or Fd == 46 then
- Rank = "S"
- elseif Fd >= 47 and Fd <= 80 then
- Rank = "SS"
- elseif Fd > 80 and Fd <= 125 then
- Rank = "SS+"
- elseif Fd > 125 and Fd <= 200 then
- Rank = "Barely possible"
- elseif Fd > 200 and Fd <= 299 then
- Rank = "Impossible"
- elseif Fd > 299 and Fd < 399 then
- Rank = "Death"
- elseif Fd >= 400 then
- Rank = "God"
- end
- Player.QuestDifficulty.Value = Fd
- x.Difficulty.Text = "Difficulty: " ..Rank
- Player.Progress.Value = 1
- stuff = Player:GetChildren()
- for i = 1, #stuff do
- if stuff[i].ClassName == "StringValue" then
- Player:SaveString(stuff[i].Name, stuff[i].Value)
- Run.Stepped:wait()
- elseif stuff[i].ClassName == "IntValue" then
- Player:SaveNumber(stuff[i].Name, stuff[i].Value)
- Run.Stepped:wait()
- end
- end
- elseif Player.Progress.Value == 1 then
- --LOAD QUEST
- Note = game.SoundService.Note:clone()
- Note.Parent = Player.PlayerGui
- x = Note.Paper
- result = Player.Goal.Value
- i = Player.QuestThrase.Value
- if i == 1 then
- x.Ammount.Text = "Defeat " ..result
- Player.QuestThrase.Value = 1
- elseif i == 2 then
- x.Ammount.Text = "Destroy " ..result
- Player.QuestThrase.Value = 2
- elseif i == 3 then
- x.Ammount.Text = "Wipe out " ..result
- Player.QuestThrase.Value = 3
- elseif i == 4 then
- x.Ammount.Text = "Kill " ..result
- Player.QuestThrase.Value = 4
- elseif i == 5 then
- x.Ammount.Text = "Anihalate " ..result
- Player.QuestThrase.Value = 5
- end
- Fd = Player.QuestDifficulty.Value
- if Fd == 1 or Fd == 2 then
- Rank = "G-"
- elseif Fd == 3 or Fd == 4 then
- Rank = "G"
- elseif Fd == 5 or Fd == 6 then
- Rank = "G+"
- elseif Fd == 7 or Fd == 8 then
- Rank = "F-"
- elseif Fd == 9 or Fd == 10 then
- Rank = "F"
- elseif Fd == 11 or Fd == 12 then
- Rank = "F+"
- elseif Fd == 13 or Fd == 14 then
- Rank = "E-"
- elseif Fd == 15 or Fd == 16 then
- Rank = "E"
- elseif Fd == 17 or Fd == 18 then
- Rank = "E+"
- elseif Fd == 19 or Fd == 20 then
- Rank = "D-"
- elseif Fd == 21 or Fd == 22 then
- Rank = "D"
- elseif Fd == 23 or Fd == 24 then
- Rank = "D+"
- elseif Fd == 25 or Fd == 26 then
- Rank = "C-"
- elseif Fd == 27 or Fd == 28 then
- Rank = "C"
- elseif Fd == 29 or Fd == 30 then
- Rank = "C+"
- elseif Fd == 31 or Fd == 32 then
- Rank = "B-"
- elseif Fd == 33 or Fd == 34 then
- Rank = "B"
- elseif Fd == 35 or Fd == 36 then
- Rank = "B+"
- elseif Fd == 37 or Fd == 38 then
- Rank = "A-"
- elseif Fd == 39 or Fd == 40 then
- Rank = "A"
- elseif Fd == 41 or Fd == 42 then
- Rank = "A+"
- elseif Fd == 43 or Fd == 44 or Fd == 45 or Fd == 46 then
- Rank = "S"
- elseif Fd >= 47 and Fd <= 80 then
- Rank = "SS"
- elseif Fd > 80 and Fd <= 125 then
- Rank = "SS+"
- elseif Fd > 125 and Fd <= 200 then
- Rank = "Barely possible"
- elseif Fd > 200 and Fd <= 299 then
- Rank = "Impossible"
- elseif Fd > 299 and Fd < 399 then
- Rank = "Death"
- elseif Fd >= 400 then
- Rank = "God"
- end
- x.Task.Text = Player.NPC.Value
- x.Difficulty.Text = "Difficulty: " ..Rank
- end
- end
- end
- end
- script.Parent.Touched:connect(Quests2)
- script.Parent.ClickDetector.MouseClick:connect(Quests)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement