Advertisement
Danielp533

err

Jul 16th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.04 KB | None | 0 0
  1. local x = 1
  2. function talk(dio,Quest,max)
  3.     dio.Enabled = true
  4.     if Quest.Text == max[x] then
  5.         if x<#max then
  6.             x = x + 1
  7.             Quest.Text = max[x]
  8.         else
  9.             dio.Enabled = false
  10.         end
  11.     end
  12. end
  13. function Reset(xx,ff)
  14.     x = 1
  15.     xx.Text = ff
  16. end
  17. game:GetService("ReplicatedStorage").GameEvents.QuestText.OnClientEvent:Connect(function(plr,Quest)
  18.     local Dio = script.Parent.Dialogue
  19.     local Chat = Dio.Chat
  20.     local Continue = Dio.TextButton
  21.     local DC = game.Players.LocalPlayer.PlrData["Damage Capability"]
  22.     Dio.Enabled = true
  23.     if Quest == nil then
  24.         local msgs = {"Hey!","Hello "..game.Players.LocalPlayer.Name,"Welcome to "..game.Name,"We have been experiencing trouble lately.","We need a true hero who can go travel to lands and defeat the great...","...And mighty","Evil BadGuy...","Seriously, we do not know his name!","The thing is, only a true hero can defeat him.","...","YOU!","YOU THINK YOU CAN BEAT HIM?!?!?!","Do you see those muscles of yours?","What makes you think you can beat a practical GOD","Fine I must have some respect","Train your Damage Capability...","Look kid, if you would like to gain my respect","Then reach your Damage Capability to 10.","LOL! Can you even do a push up?","Quest: Reach your damage capability to 10"}
  25.         local Quest = "Reach your Damage Capability to 10"
  26.         Continue.MouseButton1Click:Connect(function()
  27.             if DC.Value < 10 then
  28.                talk(Dio,Chat,msgs)
  29.             else
  30.                 game:GetService("ReplicatedStorage").GameEvents.ImproveStats:FireServer("Quest")
  31.                 print("Trained")
  32.                     print("Do action")
  33.                     x = 1
  34.                     Chat.Text = msgs[#msgs]
  35.                     Continue.MouseButton1Click:Connect(function()
  36.                         talk(Dio,Chat,{msgs[#msgs],"Good Job!","Well I guess you are a little better than what I espected.","But your still a NOOB!","Talk to me again if you would like a harder challenge."})
  37.                     end)
  38.                     print("Complete")
  39.                end
  40.         end)
  41.     end
  42. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement