local a={{X=177;Y=11},{X=177,Y=12},{X=177,Y=14};{X=177,Y=15},{X=179;Y=11},{X=179;Y=15}}local d=game:GetService("\087\111\114\107\115\112\097\099\101")local T=game:GetService("\080\108\097\121\101\114\115")local j=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local D=game:GetService("\082\117\110\083\101\114\118\105\099\101")local p=require((j:WaitForChild("\080\114\111\106\101\099\116")):WaitForChild("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101"))local X=p:GetResource("\071\097\109\101\068\097\116\097\046\071\101\110\101\114\097\116\105\111\110\046\078\080\067\076\111\099\097\116\105\111\110\115")local G=(p:GetResource("\083\116\097\116\101\046\081\117\101\115\116\115")).GetQuests(T.LocalPlayer)local B=(p:GetResource("\083\116\097\116\101\046\073\110\118\101\110\116\111\114\121")).GetInventory(T.LocalPlayer)local g=false local m=false local function H()g=G:QuestConditonValid("\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108","\078\111\116\085\110\108\111\099\107\101\100")m=G:QuestConditonValid("\070\111\114\116\105\102\121\105\110\103 \084\111\119\110 \072\097\108\108","\073\110\118\101\110\116\111\114\121")end local V=X.Builderman local R=Instance.new("\080\097\114\116")R.Name="\066\117\105\108\100\101\114\109\097\110\066\101\097\099\111\110"R.Color=Color3.new(0,.66666666666667,0)R.Material=Enum.Material.Neon R.Anchored=true R.CanCollide=false R.Size=Vector3.new(5,5,5)R.CFrame=((CFrame.new(V.CellX*100,0,V.CellY*100)*V.OffsetCFrame)*CFrame.new(0,10,0))*CFrame.Angles(0,0,math.pi/2)R.Parent=d local x=Instance.new("\083\112\101\099\105\097\108\077\101\115\104")x.MeshType=Enum.MeshType.Cylinder x.Scale=Vector3.new(1000,1,1)x.Parent=R local u={}for a,T in pairs(a)do for a=0,1.5,.5 do local j=Instance.new("\080\097\114\116")j.Transparency=1 j.CFrame=(CFrame.new(T.X*100,10,T.Y*100)*CFrame.Angles(0,math.pi*a,0))*CFrame.new(0,0,50)j.Size=Vector3.new(100,20,.2)j.Anchored=true j.CanCollide=false j.Parent=d local D=Instance.new("\083\112\101\099\105\097\108\077\101\115\104")D.MeshType=Enum.MeshType.Brick D.Scale=Vector3.new(1,1,0)D.Parent=j local p=Instance.new("\068\101\099\097\108")p.Color3=Color3.new(0,.66666666666667,0)p.Transparency=1 p.Texture="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061\049\053\052\055\052\049\056\055\056"p.Face="\070\114\111\110\116"p.Parent=j table.insert(u,p)local X=Instance.new("\068\101\099\097\108")X.Color3=Color3.new(0,.66666666666667,0)X.Transparency=1 X.Texture="\104\116\116\112\058\047\047\119\119\119\046\114\111\098\108\111\120\046\099\111\109\047\097\115\115\101\116\047\063\105\100\061\049\053\052\055\052\049\056\055\056"X.Face="\066\097\099\107"X.Parent=j table.insert(u,X)end end D.RenderStepped:Connect(function()local a=g and(math.sin(tick())/4)/2+.875 or 1 local d=m and math.sin(tick())/4+.75 or 1 R.Transparency=a for a,T in pairs(u)do T.Transparency=d end end)G.QuestsChanged:Connect(H)B.InventoryChanged:Connect(H)H()
--[[
TheNexusAvenger

Helps players get used to using houses
for the first quest.
Also shows a beacon for Builderman for
the first quest.
--]]

local HOUSE_INDICATOR_LOCATIONS = {
    {X=177,Y=11},
    {X=177,Y=12},
    {X=177,Y=14},
    {X=177,Y=15},
    {X=179,Y=11},
    {X=179,Y=15},
}

local Workspace = game:GetService("Workspace")
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")

local ReplicatedStorageProject = require(ReplicatedStorage:WaitForChild("Project"):WaitForChild("ReplicatedStorage"))
local NPCLocations = ReplicatedStorageProject:GetResource("GameData.Generation.NPCLocations")
local Quests = ReplicatedStorageProject:GetResource("State.Quests").GetQuests(Players.LocalPlayer)
local Inventory = ReplicatedStorageProject:GetResource("State.Inventory").GetInventory(Players.LocalPlayer)

local InitialQuestStarted = false
local InitialQuestActive = false



--[[
Updates the inital quest being active.
--]]
local function UpdateInitialQuestActive()
    InitialQuestStarted = Quests:QuestConditonValid("Fortifying Town Hall","NotUnlocked")
    InitialQuestActive = Quests:QuestConditonValid("Fortifying Town Hall","Inventory")
end



--Create the Builderman beacon.
local BuildermanLocation = NPCLocations["Builderman"]
local BuildermanBeacon = Instance.new("Part")
BuildermanBeacon.Name = "BuildermanBeacon"
BuildermanBeacon.Color = Color3.new(0,170/255,0)
BuildermanBeacon.Material = Enum.Material.Neon
BuildermanBeacon.Anchored = true
BuildermanBeacon.CanCollide = false
BuildermanBeacon.Size = Vector3.new(5,5,5)
BuildermanBeacon.CFrame = CFrame.new(BuildermanLocation.CellX * 100,0,BuildermanLocation.CellY * 100) * BuildermanLocation.OffsetCFrame * CFrame.new(0,10,0) * CFrame.Angles(0,0,math.pi/2)
BuildermanBeacon.Parent = Workspace

local BuildermanBeaconMesh = Instance.new("SpecialMesh")
BuildermanBeaconMesh.MeshType = Enum.MeshType.Cylinder
BuildermanBeaconMesh.Scale = Vector3.new(1000,1,1)
BuildermanBeaconMesh.Parent = BuildermanBeacon

--Create the gradients.
local Gradients = {}
for _,Position in pairs(HOUSE_INDICATOR_LOCATIONS) do
    for i = 0,1.5,0.5 do
        local Border = Instance.new("Part")
        Border.Transparency = 1
        Border.CFrame = CFrame.new(Position.X * 100,10,Position.Y * 100) * CFrame.Angles(0,math.pi * i,0) * CFrame.new(0,0,50)
        Border.Size = Vector3.new(100,20,0.2)
        Border.Anchored = true
        Border.CanCollide = false
        Border.Parent = Workspace

        local BorderMesh = Instance.new("SpecialMesh")
        BorderMesh.MeshType = Enum.MeshType.Brick
        BorderMesh.Scale = Vector3.new(1,1,0)
        BorderMesh.Parent = Border

        local FrontGradient = Instance.new("Decal")
        FrontGradient.Color3 = Color3.new(0,170/255,0)
        FrontGradient.Transparency = 1
        FrontGradient.Texture = "http://www.roblox.com/asset/?id=154741878"
        FrontGradient.Face = "Front"
        FrontGradient.Parent = Border
        table.insert(Gradients,FrontGradient)

        local BackGradient = Instance.new("Decal")
        BackGradient.Color3 = Color3.new(0,170/255,0)
        BackGradient.Transparency = 1
        BackGradient.Texture = "http://www.roblox.com/asset/?id=154741878"
        BackGradient.Face = "Back"
        BackGradient.Parent = Border
        table.insert(Gradients,BackGradient)
    end
end

--Set up updating the gradients.
RunService.RenderStepped:Connect(function()
    local BeaconTransparency = InitialQuestStarted and ((math.sin(tick())/4)/2) + 0.875 or 1
    local GradientTransparency = InitialQuestActive and (math.sin(tick())/4) + 0.75 or 1
    
    BuildermanBeacon.Transparency = BeaconTransparency
    for _,Gradient in pairs(Gradients) do
        Gradient.Transparency = GradientTransparency
    end
end)

--Set up updating the quests.
Quests.QuestsChanged:Connect(UpdateInitialQuestActive)
Inventory.InventoryChanged:Connect(UpdateInitialQuestActive)
UpdateInitialQuestActive()