Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game:GetService("ReplicatedStorage"):WaitForChild("GetQuest").OnClientEvent:Connect(function(QuestName, Target, Max, Money, LvRequest ,Title)
- --/ Lcoal
- local Player = game:GetService("Players").LocalPlayer
- local Ui = script.Parent
- local TalkUi = Ui:WaitForChild("Bk")
- --/ Anchored
- Player.Character:WaitForChild("HumanoidRootPart").Anchored = true
- --/ Talk
- TalkUi.Yes.Visible = false
- TalkUi.No.Visible = false
- TalkUi.Npc.Text = QuestName
- TalkUi.Lv.Text = "LevelRequest : "..LvRequest
- --/ Open UI
- TalkUi.Visible = true
- for i = 1, #Title, 1 do wait()
- TalkUi.Title.Text = string.sub(Title, 1, i)
- end
- TalkUi.Yes.Visible = true
- TalkUi.No.Visible = true
- TalkUi.Yes.MouseButton1Click:Connect(function()
- Player.Character:WaitForChild("HumanoidRootPart").Anchored = false
- game:GetService("ReplicatedStorage"):WaitForChild("GetQuest"):FireServer(QuestName, Target, Max, Money)
- TalkUi.Visible = false
- end)
- TalkUi.No.MouseButton1Click:Connect(function()
- Player.Character:WaitForChild("HumanoidRootPart").Anchored = false
- TalkUi.Visible = false
- end)
- end)
- spawn(function()
- while wait(.25) do
- local Player = game:GetService("Players").LocalPlayer
- local QuestFodler = Player:WaitForChild("Quest")
- if QuestFodler:WaitForChild("QuestName").Value ~= "" then
- script.Parent.Show.Visible = true
- script.Parent.Show.QuestName.Text = QuestFodler:WaitForChild("QuestName").Value
- script.Parent.Show.Reward.Text = "Reward : Money "..QuestFodler:WaitForChild("Money").Value
- script.Parent.Show.CountQuest.Text = "Defeat :"..QuestFodler:WaitForChild("Target").Value.." | "..QuestFodler:WaitForChild("Now").Value.."/"..QuestFodler:WaitForChild("Max").Value
- else
- script.Parent.Show.Visible = false
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment