0% found this document useful (0 votes)
2 views13 pages

plotmodule

The document is a Lua script for a game that utilizes various services and modules from Roblox, including handling animal models, animations, and player interactions. It defines functions for managing animal collections, displaying information, and handling events related to purchasing and claiming in-game resources. The script also includes logic for updating the game state based on player actions and server time.

Uploaded by

nikoklub123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views13 pages

plotmodule

The document is a Lua script for a game that utilizes various services and modules from Roblox, including handling animal models, animations, and player interactions. It defines functions for managing animal collections, displaying information, and handling events related to purchasing and claiming in-game resources. The script also includes logic for updating the game state based on player actions and server time.

Uploaded by

nikoklub123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 13

local v1 = game:GetService("ReplicatedStorage")

local u2 = game:GetService("RunService")
local u3 = game:GetService("Players")
local v4 = v1:WaitForChild("Packages")
local u5 = require(v4.Synchronizer)
local u6 = require(v4.Trove)
local u7 = require(v4.Timer)
local v8 = require(v4.Net)
local u9 = require(v4.EasyVisuals)
v1:WaitForChild("Classes")
local u10 = require(script.AnimalPrompt)
local v11 = v1:WaitForChild("Utils")
local u12 = require(v11.TimeUtils)
local u13 = require(v11.NumberUtils)
local u14 = v1:WaitForChild("Models").Animals
local v15 = v1:WaitForChild("Shared")
local u16 = require(v15.Animals)
local u17 = v1:WaitForChild("Overheads").AnimalOverhead
local u18 = v1:WaitForChild("Animations").Animals
local v19 = v1:WaitForChild("Datas")
require(v19.Game)
local u20 = require(v19.Animals)
local u21 = require(v19.Rarities)
local u22 = require(v19.Mutations)
local u23 = require(v19.Bases)
local v24 = v1:WaitForChild("Shared")
local u25 = require(v24.Friends)
local u26 = v8:RemoteEvent("ShopService/Purchase")
local u27 = u3.LocalPlayer
local u28 = v8:RemoteEvent("PlotService/Sell")
local u29 = v8:RemoteEvent("PlotService/ClaimCoins")
local u30 = v8:RemoteEvent("4c777288-dc38-4743-8bec-dacb742d72ec")
local u31 = v8:RemoteEvent("df94755a-d5aa-4a80-9ff2-2e4fbdbec6e9")
local u32 = v8:RemoteEvent("PlotService/ToggleFriends")
local u33 = u32.FireServer
local u34 = {}
u34.__index = u34
local function u72(u35) --[[Anonymous function at line 83]]
--[[
Upvalues:
[1] = u6
[2] = u14
[3] = u16
[4] = u18
[5] = u20
[6] = u21
[7] = u17
[8] = u13
[9] = u27
[10] = u22
[11] = u9
[12] = u10
[13] = u28
[14] = u33
[15] = u30
[16] = u23
--]]
local u36 = u35.Channel:Get("AnimalList") or {}
local function v56(p37) --[[Anonymous function at line 109]]
--[[
Upvalues:
[1] = u35
[2] = u36
[3] = u6
[4] = u14
[5] = u16
[6] = u18
[7] = u20
[8] = u21
[9] = u17
[10] = u13
[11] = u27
[12] = u22
[13] = u9
--]]
if not u35.AnimalsModels[p37] and u36[p37] then
local v38 = u36[p37]
if typeof(v38) == "table" then
if u35.ModelsCollector[p37] == nil then
u35.ModelsCollector[p37] = u6.new()
end
local u39 = u14[u36[p37].Index]:Clone()
for _, v40 in u39:GetDescendants() do
if v40:IsA("BasePart") then
v40.CanCollide = false
v40.CanQuery = false
v40.CanTouch = false
v40.Massless = true
elseif v40:IsA("ParticleEmitter") then
v40:GetAttribute("ParticleType")
end
end
local v41 = u36[p37].Mutation
if v41 then
u16:ApplyMutation(u39, u36[p37].Index, v41)
end
u39.PrimaryPart.Anchored = true
u39.Parent = workspace

u39:PivotTo(u35.PlotModel.AnimalPodiums:FindFirstChild(p37).Base.Spawn:GetPivot())
local v42 = u39:FindFirstChildOfClass("AnimationController") or
Instance.new("AnimationController", u39)
local v43 = v42:FindFirstChildOfClass("Animator") or
Instance.new("Animator", v42)
local v44 = u18:FindFirstChild(u36[p37].Index)
if v44 then
v44 = v44:FindFirstChild("Idle")
end
if v44 and v43 then
local v45 = v43:LoadAnimation(v44)
v45.Looped = true
v45:Play()
end
local v46 = Instance.new("Attachment",
u35.PlotModel.AnimalPodiums:FindFirstChild(p37).Base.Spawn)
local v47 = u39:GetExtentsSize()
v46.CFrame = CFrame.new(0, v47.Y * 0.75, 0)
local v48 = u20[u36[p37].Index]
local v49 = u21[v48.Rarity]
local u50 = u17:Clone()
u50.DisplayName.Text = v48.DisplayName
u50.Generation.Text =
("$%*/s"):format((u13:ToString(u16:GetGeneration(u36[p37].Index, u36[p37].Mutation,
nil))))
u50.Price.Text = ("$
%*"):format((u13:ToString(u16:GetPrice(u36[p37].Index, u27))))
u50.Rarity.Text = v48.Rarity
u50.Rarity.TextColor3 = u21[v48.Rarity].Color
if v41 then
local v51 = u22[v41]
u50.Mutation.Text = v51.DisplayText
u50.Mutation.TextColor3 = v51.MainColor
end
u50.Mutation.Visible = v41 ~= nil
if u21[v48.Rarity].StrokeColor then
u50.Rarity.UIStroke.Color = u21[v48.Rarity].StrokeColor
end
u50.Parent = v46
if v49.EasyVisualsPresset then
u35.AnimalsGradients[p37] = u9.new(u50.Rarity,
v49.EasyVisualsPresset, 0.5)
end
u35.ModelsCollector[p37]:Add(u35.Channel:OnChanged(("AnimalList.
%*.Steal"):format(p37), function(p52) --[[Anonymous function at line 182]]
--[[
Upvalues:
[1] = u39
[2] = u50
--]]
for _, v53 in u39:GetDescendants() do
if v53:IsA("BasePart") then
local v54 = v53:GetAttribute("DefaultTransparency")
if v54 == nil then
v54 = v53.Transparency
v53:SetAttribute("DefaultTransparency", v54)
end
if p52 == true and v53.Transparency < 1 then
v53.Transparency = 0.5
else
v53.Transparency = v54
end
end
end
for _, v55 in u50:GetChildren() do
if v55:IsA("TextLabel") then
if not v55:GetAttribute("DefaultState") then
v55:SetAttribute("DefaultState", v55.Visible)
end
if p52 == true then
if v55.Name == "Stolen" then
v55.Visible = true
else
v55.Visible = false
end
elseif v55.Name == "Stolen" then
v55.Visible = false
else
v55.Visible = v55:GetAttribute("DefaultState")
end
end
end
end, true))
u35.AnimalsInfo[p37] = v46
u35.AnimalsModels[p37] = u39
end
end
end
local function v61(p57) --[[Anonymous function at line 228]]
--[[
Upvalues:
[1] = u36
[2] = u20
[3] = u16
[4] = u27
[5] = u35
[6] = u13
--]]
local v58 = u36[p57]
local _ = u20[v58.Index]
local v59 = workspace:GetServerTimeNow() - v58.LastCollect
local v60 = math.floor(v59) * u16:GetGeneration(v58.Index, v58.Mutation,
u27)

u35.PlotModel.AnimalPodiums:FindFirstChild(p57).Claim.Main.Collect.Collect.Text =
("Collect <br/><font color=\"#73ff00\">$%*</font>"):format((u13:ToString(v60)))
if v58.OfflineGain then

u35.PlotModel.AnimalPodiums:FindFirstChild(p57).Claim.Main.Collect.Offline.Text =
("(Offline Cash: <font
color=\"#73ff00\">$%*</font>)"):format((u13:ToString(v58.OfflineGain *
u16:GetGeneration(v58.Index, v58.Mutation, u27))))
end

u35.PlotModel.AnimalPodiums:FindFirstChild(p57).Claim.Main.Collect.Offline.Visible
= v58.OfflineGain ~= nil
u35.PlotModel.AnimalPodiums:FindFirstChild(p57).Claim.Main.Collect.Enabled
= true
end
local function v67(u62) --[[Anonymous function at line 241]]
--[[
Upvalues:
[1] = u36
[2] = u35
[3] = u10
[4] = u27
[5] = u28
[6] = u33
[7] = u30
--]]
local v63 = u36[u62]
local v64 = v63.Index
local v65 = u35.PlotModel.AnimalPodiums:FindFirstChild(u62).Base.Spawn
if u35.AnimalsPrompt[u62] then
if u35.AnimalsPrompt[u62].AnimalIndex == v64 then
return
end
u35.AnimalsPrompt[u62]:Destroy()
u35.AnimalsPrompt[u62] = u10.new(u62, v64, v65.PromptAttachment)
else
u35.AnimalsPrompt[u62] = u10.new(u62, v64, v65.PromptAttachment)
end
local v66 = u35.AnimalsPrompt[u62]
if u35:GetOwner() == u27 and v66:GetState() ~= "Owner" then
v66:SetState("Owner", function() --[[Anonymous function at line 260]]
--[[
Upvalues:
[1] = u28
[2] = u62
--]]
u28:FireServer(u62)
end)
return
elseif v63.Steal == true and v66:GetState() ~= "Stealing" then
v66:SetState("Stealing")
elseif v66:GetState() ~= "Steal" then
v66:SetState("Steal", function() --[[Anonymous function at line 266]]
--[[
Upvalues:
[1] = u33
[2] = u30
[3] = u35
[4] = u62
--]]
u33(u30, workspace:GetServerTimeNow() + 248, "4387907b-47ba-4711-
a39f-db5c57ff11f2", u35.PlotModel.Name, u62)
u30:FireServer(workspace:GetServerTimeNow() + 248, "2bfdbfa6-2f00-
421d-bec4-2b7bf75c3480", u35.PlotModel.Name, u62)
end)
end
end
local function v69(p68) --[[Anonymous function at line 87]]
--[[
Upvalues:
[1] = u35
--]]
if u35.AnimalsGradients[p68] then
u35.AnimalsGradients[p68]:Destroy()
u35.AnimalsGradients[p68] = nil
end
if u35.AnimalsModels[p68] then
u35.AnimalsModels[p68]:Destroy()
u35.AnimalsModels[p68] = nil
end
if u35.AnimalsInfo[p68] then
u35.AnimalsInfo[p68]:Destroy()
u35.AnimalsInfo[p68] = nil
end
if u35.AnimalsPrompt[p68] then
u35.AnimalsPrompt[p68]:Destroy()
u35.AnimalsPrompt[p68] = nil
end
if u35.ModelsCollector[p68] then
u35.ModelsCollector[p68]:Clean()
end
end
for v70 = 1, u23[u35.PlotModel:GetAttribute("Tier")].MaxAnimals do
local v71 = u36[v70]
if v71 == "Empty" or v71 == nil then
v69(v70)

u35.PlotModel.AnimalPodiums:FindFirstChild(v70).Claim.Main.Collect.Enabled = false
elseif v71 and typeof(v71) == "table" then
v56(v70)
v61(v70)
v67(v70)
else
v69(v70)

u35.PlotModel.AnimalPodiums:FindFirstChild(v70).Claim.Main.Collect.Enabled = false
end
end
end
local function u80(p73) --[[Anonymous function at line 316]]
--[[
Upvalues:
[1] = u12
--]]
p73:GetOwner()
local v74
if p73.Channel:Get("BlockEndTime") == nil then
v74 = false
else
local v75 = p73.Channel:Get("BlockEndTime") - workspace:GetServerTimeNow()
local v76 = math.round(v75)
local v77 = math.clamp(v76, 0, (1 / 0))
for _, v78 in p73.PlotModel.Purchases:GetChildren() do
v78.Main.BillboardGui.RemainingTime.Text = u12:C(v77)
end
v74 = true
end
for _, v79 in p73.PlotModel.Purchases:GetChildren() do
v79.Main.BillboardGui.LockStudio.Visible = not v74
v79.Main.BillboardGui.RemainingTime.Visible = v74
v79.Main.BillboardGui.Locked.Visible = v74
end
end
local function u88(p81) --[[Anonymous function at line 340]]
--[[
Upvalues:
[1] = u12
--]]
if p81.Channel:Get("BlockEndTime") == nil then
p81:GetOwner()
local v82
if p81.Channel:Get("BlockedDelayTime") == nil then
v82 = false
else
local v83 = p81.Channel:Get("BlockedDelayTime") -
workspace:GetServerTimeNow()
local v84 = math.round(v83)
local v85 = math.clamp(v84, 0, (1 / 0))
for _, v86 in p81.PlotModel.Purchases:GetChildren() do
v86.Main.BillboardGui.RemainingTime.Text = u12:C(v85)
end
v82 = true
end
for _, v87 in p81.PlotModel.Purchases:GetChildren() do
v87.Main.BillboardGui.LockStudio.Visible = not v82
v87.Main.BillboardGui.RemainingTime.Visible = v82
v87.Main.BillboardGui.Delay.Visible = v82
end
end
end
local function u92(p89) --[[Anonymous function at line 368]]
--[[
Upvalues:
[1] = u27
--]]
if p89:GetOwner() ~= u27 then
local v90 = p89.Channel:Get("BlockEndTime") ~= nil
for _, v91 in p89.PlotModel.Unlock:GetChildren() do
v91.UnlockBase.Enabled = v90
end
end
end
local function u100(p93) --[[Anonymous function at line 384]]
--[[
Upvalues:
[1] = u27
[2] = u25
--]]
if p93.Channel then
if p93.Channel.Get then
local v94 = p93.Channel:Get("BlockEndTime") ~= nil
local v95
if p93:GetOwner() == u27 then
v95 = false
else
local v96 = p93:GetOwner()
if v96 and v94 == true then
local v97 = u25:GetInGameFriends(u27)
v95 = (not table.find(v97, v96) or
p93.Channel:Get("FriendsAllowed") ~= true) and true or false
else
v95 = false
end
end
local v98 = p93.PlotModel:WaitForChild("LaserHitbox", 5)
if v98 then
for _, v99 in v98:GetChildren() do
v99.CanCollide = v95
end
end
else
return
end
else
return
end
end
function u34.GetOwner(p101) --[[Anonymous function at line 426]]
return p101.Channel:Get("Owner")
end
function u34.GetSpawn(p102) --[[Anonymous function at line 430]]
return p102.PlotModel.Spawn
end
function u34.GetUID(p103) --[[Anonymous function at line 434]]
return p103.UID
end
function u34.new(u104) --[[Anonymous function at line 438]]
--[[
Upvalues:
[1] = u34
[2] = u6
[3] = u5
[4] = u23
[5] = u27
[6] = u2
[7] = u33
[8] = u31
[9] = u3
[10] = u29
[11] = u7
[12] = u80
[13] = u92
[14] = u72
[15] = u88
[16] = u100
[17] = u26
[18] = u25
[19] = u32
--]]
local v105 = u34
local u106 = setmetatable({}, v105)
u106.UID = u104.Name
u106.PlotModel = u104
u106.Collector = u6.new()
u106.OwnerCollector = u6.new()
u106.Collector:Add(u106.OwnerCollector, "Destroy")
u106.CacheModels = {}
u106.AnimalsModels = {}
u106.AnimalsInfo = {}
u106.AnimalsGradients = {}
u106.AnimalsPrompt = {}
u106.ModelsCollector = {}
u106.Channel = u5:Wait(u106.UID)
local function u117() --[[Anonymous function at line 455]]
--[[
Upvalues:
[1] = u106
--]]
for v107, v108 in u106.CacheModels do
v108:Destroy()
u106.CacheModels[v107] = nil
end
for v109, v110 in u106.AnimalsInfo do
v110:Destroy()
u106.AnimalsInfo[v109] = nil
end
for v111, v112 in u106.AnimalsPrompt do
v112:Destroy()
u106.AnimalsPrompt[v111] = nil
end
for v113, v114 in u106.AnimalsModels do
v114:Destroy()
u106.AnimalsModels[v113] = nil
end
for v115, v116 in u106.AnimalsGradients do
v116:Destroy()
u106.AnimalsGradients[v115] = nil
end
end
local function v137() --[[Anonymous function at line 480]]
--[[
Upvalues:
[1] = u106
[2] = u117
[3] = u23
[4] = u104
[5] = u27
[6] = u2
[7] = u33
[8] = u31
[9] = u3
[10] = u29
[11] = u7
[12] = u80
[13] = u92
[14] = u72
[15] = u88
[16] = u100
[17] = u26
[18] = u25
[19] = u32
--]]
u106.OwnerCollector:Clean()
u117()
for u118 = 1, u23[u104:GetAttribute("Tier")].MaxAnimals do
if u106:GetOwner() == u27 then
local v119 = {}
for _, v120 in u106.PlotModel:GetChildren() do
if v120.Name == "DeliveryHitbox" then
table.insert(v119, v120)
end
end
local u121 = OverlapParams.new()
u121.FilterDescendantsInstances = v119
u121.FilterType = Enum.RaycastFilterType.Include
u121.MaxParts = 1
local u122 = 0
u106.OwnerCollector:Add(u2.PostSimulation:Connect(function(p123) --
[[Anonymous function at line 503]]
--[[
Upvalues:
[1] = u122
[2] = u27
[3] = u121
[4] = u33
[5] = u31
--]]
u122 = u122 + p123
if u122 < 0.05 then
return
else
u122 = 0
if u27:GetAttribute("Stealing") then
local v124 = u27.Character
if v124 then
local v125 = v124:GetPivot().Position
if #workspace:GetPartBoundsInBox(CFrame.new(v125),
Vector3.new(4, 4, 2), u121) > 0 then
u33(u31, "87fde5d4-f1bd-4efc-a7bb-
089d2e0e74a2")
u31:FireServer("87fde5d4-f1bd-4efc-a7bb-
089d2e0e74a2")
end
else
return
end
else
return
end
end
end))
local v126 = u106.PlotModel.AnimalPodiums:FindFirstChild(u118)
if v126 then
v126 = v126.Claim.Hitbox
end
u106.OwnerCollector:Add(v126.Touched:Connect(function(p127) --
[[Anonymous function at line 548]]
--[[
Upvalues:
[1] = u3
[2] = u27
[3] = u106
[4] = u29
[5] = u118
--]]
if p127.Name == "HumanoidRootPart" then
local v128 = u3:GetPlayerFromCharacter(p127.Parent)
if v128 then
if v128 == u27 then
if v128 == u106:GetOwner() then
u29:FireServer(u118)
end
end
else
return
end
else
return
end
end))
end
end
u106.OneSecondTimer = u7.new(1)
u106.OwnerCollector:Add(u106.OneSecondTimer, "Destroy")
u106.OwnerCollector:Add(u106.OneSecondTimer.Tick:Connect(function() --
[[Anonymous function at line 564]]
--[[
Upvalues:
[1] = u80
[2] = u106
[3] = u92
[4] = u72
[5] = u88
--]]
u80(u106)
u92(u106)
u72(u106)
u88(u106)
end))
u106.OneSecondTimer:StartNow()
u106.OwnerCollector:Add(u106.Channel:OnChanged("BlockEndTime", function()
--[[Anonymous function at line 572]]
--[[
Upvalues:
[1] = u80
[2] = u106
[3] = u92
[4] = u88
[5] = u100
--]]
u80(u106)
u92(u106)
u88(u106)
u100(u106)
end, true))
u106.OwnerCollector:Add(u106.Channel:OnChanged("BlockedDelayTime",
function() --[[Anonymous function at line 579]]
--[[
Upvalues:
[1] = u80
[2] = u106
[3] = u88
[4] = u100
--]]
u80(u106)
u88(u106)
u100(u106)
end, true))
u106.OwnerCollector:Add(u106.Channel:OnChanged("AnimalList", function(_) --
[[Anonymous function at line 585]]
--[[
Upvalues:
[1] = u72
[2] = u106
--]]
u72(u106)
end, true))
for _, v129 in u106.PlotModel.Unlock:GetChildren() do

u106.OwnerCollector:Add(v129.UnlockBase.Triggered:Connect(function(p130) --
[[Anonymous function at line 591]]
--[[
Upvalues:
[1] = u106
[2] = u26
--]]
if p130 and p130:IsA("Player") then
if u106:GetOwner() == p130 then
return
end
local v131 = u106:GetOwner().UserId
if u106.Channel:Get("BlockEndTime") ~= nil then
u26:FireServer(3301638537, v131)
end
end
end))

u106.OwnerCollector:Add(u106.PlotModel.Unlock.ChildAdded:Connect(function(p132) --
[[Anonymous function at line 603]]
--[[
Upvalues:
[1] = u106
[2] = u26
[3] = u100
--]]

u106.OwnerCollector:Add(p132.UnlockBase.Triggered:Connect(function(p133) --
[[Anonymous function at line 604]]
--[[
Upvalues:
[1] = u106
[2] = u26
--]]
if p133 and p133:IsA("Player") then
if u106:GetOwner() == p133 then
return
end
local v134 = u106:GetOwner().UserId
if u106.Channel:Get("BlockEndTime") ~= nil then
u26:FireServer(3301638537, v134)
end
end
end))
u100(u106)
end))
end
local u135 = u106.PlotModel.FriendPanel.Main.ProximityPrompt
u106.OwnerCollector:Add(u106.Channel:OnChanged("FriendsAllowed",
function(p136) --[[Anonymous function at line 621]]
--[[
Upvalues:
[1] = u135
[2] = u106
[3] = u100
--]]
u135.ObjectText = p136 == true and "Disallow Friends" or "Allow
Friends"
u106.PlotModel.FriendPanel.Main.SurfaceGui.ImageLabel.Image = p136 ==
true and "rbxassetid://110507824065923" or "rbxassetid://110783679426495"
u100(u106)
end, true))
u106.OwnerCollector:Add(u25.OnFriendsUpdate:Connect(function() --
[[Anonymous function at line 627]]
--[[
Upvalues:
[1] = u100
[2] = u106
--]]
u100(u106)
end))
u106.OwnerCollector:Add(u135.Triggered:Connect(function() --[[Anonymous
function at line 631]]
--[[
Upvalues:
[1] = u106
[2] = u27
[3] = u32
--]]
if u106:GetOwner() == u27 then
u32:FireServer()
end
end))
u106.PlotModel.PlotSign.YourBase.Enabled = u106:GetOwner() == u27
end
u106.Collector:Add(u106.Channel:OnChanged("Owner", v137, true))

u106.Collector:Add(u106.PlotModel:GetAttributeChangedSignal("Tier"):Connect(v137))
return u106
end
function u34.Destroy(p138) --[[Anonymous function at line 650]]
for v139, v140 in p138.CacheModels do
v140:Destroy()
p138.CacheModels[v139] = nil
end
for v141, v142 in p138.AnimalsInfo do
v142:Destroy()
p138.AnimalsInfo[v141] = nil
end
for v143, v144 in p138.AnimalsPrompt do
v144:Destroy()
p138.AnimalsPrompt[v143] = nil
end
for v145, v146 in p138.AnimalsModels do
v146:Destroy()
p138.AnimalsModels[v145] = nil
end
for v147, v148 in p138.AnimalsGradients do
v148:Destroy()
p138.AnimalsGradients[v147] = nil
end
p138.Collector:Destroy()
end
return u34

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy