Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Location: game.StarterPlayer.StarterPlayerScripts.Handle_Client
- -- Synapse Decompiler
- -- Purchase Here: https://brack4712.xyz/synapse/purchase/
- local Player = game.Players.LocalPlayer
- local Camera = game.Workspace.CurrentCamera
- local coreUI = script.Parent:WaitForChild("Core_UI")
- coreUI.Parent = Player:WaitForChild("PlayerGui")
- local modules = script.Parent:WaitForChild("Modules")
- local buttonModule = require(modules.Button_Manager)
- local matching = coreUI.Lobby.Matching
- local startMatching = matching.Play
- local toggleFill = matching.FillButton
- local toggleType = matching.TypeButton
- local remoteEvents = game.ReplicatedStorage.Remote_Events
- local remoteFunctions = game.ReplicatedStorage.Remote_Functions
- local playerData = game.ReplicatedStorage.Player_Data:WaitForChild(Player.Name)
- local marketplaceService = game:GetService("MarketplaceService")
- local onlineFriends = 0
- local tock = tick()
- local dotCount = 0
- local currentlyPlaying, currentlyPlayingButton
- local types = {
- "Solo",
- "Duo",
- "Squad"
- }
- local friendsOpen = false
- local friendsRefresh = tick() - 2
- local friends
- local counter = 5
- local lastFriendCount = 0
- local callingMatching = false
- local callingToggleFill = false
- local callingToggleType = false
- local togglingInvite = false
- local leavingGroup = false
- local pages = {
- coreUI.Lobby,
- coreUI.Locker,
- coreUI.ItemShop,
- coreUI.Stats,
- coreUI.Leaderboard,
- coreUI.Store,
- coreUI.Codes,
- coreUI.Inventory,
- coreUI.Possibles,
- coreUI.Edit,
- coreUI.News,
- coreUI.Keybinds
- }
- local selectedPage = 1
- local requestQue = {}
- local invitePlayer
- local canUseCode = true
- local storeSwapped = false
- local lastLeaderboardGet = 0
- local currentLeaderboardType = 1
- local soloDeathsX, soloWinsX, soloKillsX, duoDeathsX, duoWinsX, duoKillsX, squadDeathsX, squadWinsX, squadKillsX = {}, {}, {}, {}, {}, {}, {}, {}, {}
- local tpDataTick = tick()
- local tpService = game:GetService("TeleportService")
- local leaderboardSecondUpdate = 0
- local exclusiveOpen = false
- local doingBuyChest = false
- local doingEquip = false
- local doingBuy = false
- local doingEdit = false
- local rewardOpen = false
- local purchasedEdits = false
- local beforeEdit = {}
- local creditTiers = {
- 1000,
- 5000,
- 26000,
- 56000,
- 119000
- }
- local tierIds = {
- 136082859,
- 136158395,
- 136158425,
- 136158463,
- 136158507
- }
- local levelData = {
- Color3.new(0.5450980392156862, 0.5686274509803921, 0.6470588235294118),
- Color3.new(0.13333333333333333, 0.7725490196078432, 0.09803921568627451),
- Color3.new(0.07450980392156863, 0.596078431372549, 0.8196078431372549),
- Color3.new(0.5725490196078431, 0.13333333333333333, 0.8274509803921568),
- Color3.new(0.8156862745098039, 0.5333333333333333, 0.20784313725490197),
- Color3.new(0.9215686274509803, 0.8156862745098039, 0.3843137254901961)
- }
- local playerObj = script.LocalPlayer
- playerObj.Name = Player.Name
- playerObj:WaitForChild("Head").Info.Username.Text = Player.Name
- playerObj.Parent = workspace.Characters
- local Character = playerObj
- local Humanoid = Character:WaitForChild("Humanoid")
- local UIS = game:GetService("UserInputService")
- UIS.ModalEnabled = true
- game.Workspace:WaitForChild("Cam_Point").Transparency = 1
- Camera.CameraType = Enum.CameraType.Scriptable
- Camera.CFrame = game.Workspace.Cam_Point.CFrame
- local commaSeperate = function(Value)
- local commadString = ""
- local String = tostring(Value)
- local currentInt = 0
- for i = 1, string.len(String) do
- if currentInt < 3 then
- commadString = string.sub(String, string.len(String), string.len(String)) .. commadString
- String = string.sub(String, 1, string.len(String) - 1)
- else
- currentInt = 0
- commadString = "," .. commadString
- commadString = string.sub(String, string.len(String), string.len(String)) .. commadString
- String = string.sub(String, 1, string.len(String) - 1)
- end
- currentInt = currentInt + 1
- end
- return commadString
- end
- local function toggleExclusive(override, trueOverride)
- if not override then
- exclusiveOpen = not exclusiveOpen
- else
- exclusiveOpen = trueOverride
- end
- if exclusiveOpen then
- coreUI.Exclusive.Visible = true
- coreUI.Exclusive:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quart", 0.25, true)
- else
- coreUI.Exclusive:TweenPosition(UDim2.new(-1, 0, 0, 0), "Out", "Quart", 0.25, true)
- wait(0.255)
- if coreUI.Exclusive.Position == UDim2.new(-1, 0, 0, 0) then
- coreUI.Exclusive.Visible = false
- end
- end
- end
- local buyingExclusive = false
- local function purchaseExclusive()
- if not playerData.Exclusive_Purchased.Value then
- buyingExclusive = true
- marketplaceService:PromptProductPurchase(Player, 237087206)
- wait(2)
- buyingExclusive = false
- end
- end
- local function toggleReward(val)
- if val then
- coreUI.Reward.Visible = true
- coreUI.Reward:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quart", 0.25, true)
- else
- coreUI.Reward:TweenPosition(UDim2.new(-1, 0, 0, 0), "Out", "Quart", 0.25, true)
- wait(0.255)
- if coreUI.Reward.Position == UDim2.new(-1, 0, 0, 0) then
- coreUI.Reward.Visible = false
- end
- end
- end
- local keybindValues = {
- [0] = "?",
- [8] = "Bck",
- [9] = "Tab",
- [12] = "Clr",
- [13] = "Rtn",
- [19] = "Pse",
- [27] = "Esc",
- [32] = "Space",
- [35] = "#",
- [36] = "$",
- [37] = "%",
- [38] = "&",
- [39] = "\"",
- [40] = "(",
- [41] = ")",
- [42] = "*",
- [43] = "+",
- [44] = ",",
- [45] = "-",
- [46] = ".",
- [47] = "/",
- [48] = "0",
- [49] = "1",
- [50] = "2",
- [51] = "3",
- [52] = "4",
- [53] = "5",
- [54] = "6",
- [55] = "7",
- [56] = "8",
- [57] = "9",
- [58] = ":",
- [59] = ";",
- [60] = "<",
- [61] = "=",
- [62] = ">",
- [63] = "?",
- [64] = "@",
- [91] = "[",
- [93] = "]",
- [94] = "^",
- [95] = "_",
- [96] = "`",
- [97] = "A",
- [98] = "B",
- [99] = "C",
- [100] = "D",
- [101] = "E",
- [102] = "F",
- [103] = "G",
- [104] = "H",
- [105] = "I",
- [106] = "J",
- [107] = "K",
- [108] = "L",
- [109] = "M",
- [110] = "N",
- [111] = "O",
- [112] = "P",
- [113] = "Q",
- [114] = "R",
- [115] = "S",
- [116] = "T",
- [117] = "U",
- [118] = "V",
- [119] = "W",
- [120] = "X",
- [121] = "Y",
- [122] = "Z",
- [123] = "{",
- [124] = "|",
- [125] = "}",
- [126] = "~",
- [127] = "Del",
- [256] = "K0",
- [257] = "K1",
- [258] = "K2",
- [259] = "K3",
- [260] = "K4",
- [261] = "K5",
- [262] = "K6",
- [263] = "K7",
- [264] = "K8",
- [265] = "K9",
- [266] = "K.",
- [267] = "K/",
- [268] = "K*",
- [269] = "K-",
- [270] = "K+",
- [271] = "KRt",
- [272] = "K=",
- [273] = "Up",
- [274] = "Dwn",
- [275] = "Rgt",
- [276] = "Lft",
- [277] = "Ins",
- [278] = "Hme",
- [279] = "End",
- [280] = "PgUp",
- [281] = "PgDn",
- [304] = "Shift",
- [303] = "RShift",
- [308] = "Alt",
- [307] = "RAlt",
- [306] = "Ctl",
- [305] = "RCtl",
- [301] = "Caps",
- [300] = "Num",
- [302] = "Scrl",
- [322] = "Undo",
- [282] = "F1",
- [283] = "F2",
- [284] = "F3",
- [285] = "F4",
- [286] = "F5",
- [287] = "F6",
- [288] = "F7",
- [289] = "F8",
- [290] = "F9",
- [291] = "F10",
- [292] = "F11",
- [293] = "F12",
- [294] = "F13",
- [295] = "F14",
- [296] = "F15",
- [1000] = "X",
- [1001] = "Y",
- [1002] = "A",
- [1003] = "B",
- [1004] = "R1",
- [1005] = "L1",
- [1006] = "R2",
- [1007] = "L2",
- [1008] = "R3",
- [1009] = "L3",
- [1010] = "Start",
- [1011] = "Sel",
- [1012] = "PadL",
- [1013] = "PadR",
- [1014] = "PadU",
- [1015] = "PadD",
- [1016] = "Stick1",
- [1017] = "Stick2"
- }
- local keybindValues2 = {
- [0] = "MB1",
- [1] = "MB2",
- [2] = "MMB",
- [3] = "Scroll"
- }
- local keybindNames = {
- BRotate_KB = "Build Rotate",
- BSlot1_KB = "Build Slot 1",
- BSlot2_KB = "Build Slot 2",
- BSlot3_KB = "Build Slot 3",
- Build_KB = "Toggle Build",
- Crouch_KB = "Toggle Crouch",
- Emote_KB = "Use Emote",
- Inventory_KB = "Open Inventory",
- Map_KB = "Open Map",
- Pickup_KB = "Search/Pickup/Revive",
- Slot1_KB = "Item Slot 1",
- Slot2_KB = "Item Slot 2",
- Slot3_KB = "Item Slot 3",
- Slot4_KB = "Item Slot 4",
- Slot5_KB = "Item Slot 5",
- Slot6_KB = "Item Slot 6",
- Sprint_KB = "Sprint",
- Reload_KB = "Reload",
- ADS_KB = "Aim/Scope",
- MatSwap_XKB = "Change Build Material",
- FireUse_XKB = "Fire/Use/Hit",
- Keybinds_KB = "Coming Soon"
- }
- local savingKeybinds = false
- local changingKeybind = false
- local hasChangedKeybind = false
- local preKeybindEdit = {}
- local function setDefaults()
- hasChangedKeybind = true
- for i, c in pairs(playerData:GetChildren()) do
- if string.find(c.Name, "_KB") and game.ReplicatedStorage.Player_Data.Default:FindFirstChild(c.Name) then
- c.Value = game.ReplicatedStorage.Player_Data.Default[c.Name].Value
- end
- end
- for i, c in pairs(playerData:GetChildren()) do
- pcall(function()
- if string.find(c.Name, "_KB") then
- preKeybindEdit[c.Name] = c.Value
- if coreUI.Keybinds.Base.Info.Keybinds:FindFirstChild(c.Name) then
- if keybindValues2[c.Value] then
- coreUI.Keybinds.Base.Info.Keybinds[c.Name].SetBind.Text = string.upper(keybindValues2[c.Value])
- elseif keybindValues[c.Value] then
- coreUI.Keybinds.Base.Info.Keybinds[c.Name].SetBind.Text = string.upper(keybindValues[c.Value])
- else
- coreUI.Keybinds.Base.Info.Keybinds[c.Name].SetBind.Text = "NONE"
- end
- end
- end
- end)
- end
- end
- local function saveKeybinds()
- savingKeybinds = true
- coreUI.Keybinds.Base.Top.Save.Text = "Saving"
- if hasChangedKeybind then
- hasChangedKeybind = false
- if changingKeybind and changingKeybind[1] and changingKeybind[2] then
- if keybindValues2[preKeybindEdit[changingKeybind[2].Name]] then
- changingKeybind[1].Text = keybindValues2[preKeybindEdit[changingKeybind[2].Name]]
- elseif keybindValues[preKeybindEdit[changingKeybind[2].Name]] then
- changingKeybind[1].Text = keybindValues[preKeybindEdit[changingKeybind[2].Name]]
- end
- end
- changingKeybind = false
- local newKeybinds = {}
- for i, c in pairs(playerData:GetChildren()) do
- if string.find(c.Name, "_KB") then
- newKeybinds[c.Name] = c.Value
- end
- end
- remoteFunctions.Save_Keybinds:InvokeServer(newKeybinds)
- checkUpdate()
- else
- if changingKeybind and changingKeybind[1] and changingKeybind[2] then
- if keybindValues2[preKeybindEdit[changingKeybind[2].Name]] then
- changingKeybind[1].Text = keybindValues2[preKeybindEdit[changingKeybind[2].Name]]
- elseif keybindValues[preKeybindEdit[changingKeybind[2].Name]] then
- changingKeybind[1].Text = keybindValues[preKeybindEdit[changingKeybind[2].Name]]
- end
- end
- changingKeybind = false
- end
- coreUI.Keybinds.Base.Top.Save.Text = "Saved!"
- wait(1)
- coreUI.Keybinds.Base.Top.Save.Text = "Save"
- savingKeybinds = false
- end
- local function editKeybind(obj, bind)
- if not changingKeybind and not savingKeybinds then
- obj.Text = "PRESS KEY"
- changingKeybind = {obj, bind}
- end
- end
- buttonModule.handleButton(coreUI.Keybinds.Base.Top.Save, saveKeybinds)
- buttonModule.handleButton(coreUI.Keybinds.Base.Top.Default, setDefaults)
- UIS.InputBegan:connect(function(input)
- if changingKeybind and not savingKeybinds then
- if input and input.KeyCode and input.KeyCode.Value and changingKeybind[1] and changingKeybind[2] and keybindValues[input.KeyCode.Value] and input.KeyCode.Value ~= 0 then
- hasChangedKeybind = true
- changingKeybind[2].Value = input.KeyCode.Value
- changingKeybind[1].Text = keybindValues[input.KeyCode.Value]
- changingKeybind = false
- elseif input and input.UserInputType and string.find(input.UserInputType.Name, "MouseButton") and input.UserInputType.Value and changingKeybind[1] and changingKeybind[2] and keybindValues2[input.UserInputType.Value] and 1 < input.UserInputType.Value and 2 >= input.UserInputType.Value then
- hasChangedKeybind = true
- changingKeybind[2].Value = input.UserInputType.Value
- changingKeybind[1].Text = keybindValues2[input.UserInputType.Value]
- changingKeybind = false
- else
- if keybindValues2[preKeybindEdit[changingKeybind[2].Name]] then
- changingKeybind[1].Text = keybindValues2[preKeybindEdit[changingKeybind[2].Name]]
- elseif keybindValues[preKeybindEdit[changingKeybind[2].Name]] then
- changingKeybind[1].Text = keybindValues[preKeybindEdit[changingKeybind[2].Name]]
- end
- changingKeybind = false
- end
- end
- end)
- function checkUpdate()
- if selectedPage ~= 12 and hasChangedKeybind then
- for i, c in pairs(playerData:GetChildren()) do
- if c and preKeybindEdit[c.Name] then
- c.Value = preKeybindEdit[c.Name]
- end
- end
- end
- if selectedPage == 2 then
- for i, c in pairs(coreUI.Locker.Base.Base:GetChildren()) do
- if c.Name == "Glider" or c.Name == "Clothing" or c.Name == "Hat" or c.Name == "Tool" or c.Name == "Face" or c.Name == "Win Effect" or c.Name == "Death Effect" or c.Name == "Dive Trail" or c.Name == "Bullet Trail" or c.Name == "Emote" then
- local useName = c.Name
- if c.Name == "Win Effect" or c.Name == "Death Effect" then
- useName = "Effect"
- elseif c.Name == "Dive Trail" or c.Name == "Bullet Trail" then
- useName = "Trail"
- end
- if playerData:FindFirstChild(c.Name) and game.ReplicatedStorage.Character_Clothing[useName]:FindFirstChild(playerData[c.Name].Value) then
- c.Base.ItemName.Text = playerData[c.Name].Value
- if game.ReplicatedStorage.Character_Clothing[useName][playerData[c.Name].Value]:FindFirstChild("Image") then
- c.Base.Icon.Image = "rbxassetid://" .. game.ReplicatedStorage.Character_Clothing[useName][playerData[c.Name].Value].Image.Value
- else
- c.Base.Icon.Image = ""
- end
- if game.ReplicatedStorage.Character_Clothing[useName][playerData[c.Name].Value]:FindFirstChild("Level") then
- local level = game.ReplicatedStorage.Character_Clothing[useName][playerData[c.Name].Value].Level.Value
- c.BackgroundColor3 = levelData[level]
- else
- c.BackgroundColor3 = levelData[1]
- end
- if game.ReplicatedStorage.Character_Clothing[useName][playerData[c.Name].Value]:FindFirstChild("Color") then
- c.Base.Icon.Image = ""
- c.BackgroundColor3 = game.ReplicatedStorage.Character_Clothing[useName][playerData[c.Name].Value].Color.Value.Color
- end
- end
- end
- end
- elseif selectedPage == 4 then
- coreUI.Stats.Base.Top.Top.Longshot.Text = "Farthest Shot: " .. playerData.Farthest_Shot.Value .. "m"
- coreUI.Stats.Base.Info.Solo_Wins.Text = "Solo Wins: " .. playerData.Solo_Wins.Value
- coreUI.Stats.Base.Info.Solo_Kills.Text = "Solo Kills: " .. playerData.Solo_Kills.Value
- coreUI.Stats.Base.Info.Solo_Place.Text = "Top Solo Placement: " .. playerData.Solo_Place.Value
- local calcKDR = 0
- if playerData.Solo_Kills.Value > 0 and 0 < playerData.Solo_Deaths.Value then
- calcKDR = playerData.Solo_Kills.Value / playerData.Solo_Deaths.Value
- elseif playerData.Solo_Kills.Value > 0 and playerData.Solo_Deaths.Value == 0 then
- calcKDR = playerData.Solo_Kills.Value
- end
- coreUI.Stats.Base.Info.Solo_KDR.Text = "Solo KDR: " .. calcKDR
- coreUI.Stats.Base.Info.Solo_Wins_Total.Text = "Solo Wins: " .. playerData.Solo_Wins_Total.Value
- coreUI.Stats.Base.Info.Solo_Kills_Total.Text = "Solo Kills: " .. playerData.Solo_Kills_Total.Value
- coreUI.Stats.Base.Info.Solo_Place_Total.Text = "Top Solo Placement: " .. playerData.Solo_Place_Total.Value
- local calcKDR = 0
- if 0 < playerData.Solo_Kills_Total.Value and 0 < playerData.Solo_Deaths_Total.Value then
- calcKDR = playerData.Solo_Kills_Total.Value / playerData.Solo_Deaths_Total.Value
- elseif 0 < playerData.Solo_Kills_Total.Value and playerData.Solo_Deaths_Total.Value == 0 then
- calcKDR = playerData.Solo_Kills_Total.Value
- end
- coreUI.Stats.Base.Info.Solo_KDR_Total.Text = "Solo KDR: " .. calcKDR
- coreUI.Stats.Base.Info.Duo_Wins.Text = "Duo Wins: " .. playerData.Duo_Wins.Value
- coreUI.Stats.Base.Info.Duo_Kills.Text = "Duo Kills: " .. playerData.Duo_Kills.Value
- coreUI.Stats.Base.Info.Duo_Place.Text = "Top Duo Placement: " .. playerData.Duo_Place.Value
- local calcKDR = 0
- if 0 < playerData.Duo_Kills.Value and 0 < playerData.Duo_Deaths.Value then
- calcKDR = playerData.Duo_Kills.Value / playerData.Duo_Deaths.Value
- elseif 0 < playerData.Duo_Kills.Value and playerData.Duo_Deaths.Value == 0 then
- calcKDR = playerData.Duo_Kills.Value
- end
- coreUI.Stats.Base.Info.Duo_KDR.Text = "Duo KDR: " .. calcKDR
- coreUI.Stats.Base.Info.Duo_Wins_Total.Text = "Duo Wins: " .. playerData.Duo_Wins_Total.Value
- coreUI.Stats.Base.Info.Duo_Kills_Total.Text = "Duo Kills: " .. playerData.Duo_Kills_Total.Value
- coreUI.Stats.Base.Info.Duo_Place_Total.Text = "Top Duo Placement: " .. playerData.Duo_Place_Total.Value
- local calcKDR = 0
- if 0 < playerData.Duo_Kills_Total.Value and 0 < playerData.Duo_Deaths_Total.Value then
- calcKDR = playerData.Duo_Kills_Total.Value / playerData.Duo_Deaths_Total.Value
- elseif 0 < playerData.Duo_Kills_Total.Value and playerData.Duo_Deaths_Total.Value == 0 then
- calcKDR = playerData.Duo_Kills_Total.Value
- end
- coreUI.Stats.Base.Info.Duo_KDR_Total.Text = "Duo KDR: " .. calcKDR
- coreUI.Stats.Base.Info.Squad_Wins.Text = "Squad Wins: " .. playerData.Squad_Wins.Value
- coreUI.Stats.Base.Info.Squad_Kills.Text = "Squad Kills: " .. playerData.Squad_Kills.Value
- coreUI.Stats.Base.Info.Squad_Place.Text = "Top Squad Placement: " .. playerData.Squad_Place.Value
- local calcKDR = 0
- if 0 < playerData.Squad_Kills.Value and 0 < playerData.Squad_Deaths.Value then
- calcKDR = playerData.Squad_Kills.Value / playerData.Squad_Deaths.Value
- elseif 0 < playerData.Squad_Kills.Value and playerData.Squad_Deaths.Value == 0 then
- calcKDR = playerData.Squad_Kills.Value
- end
- coreUI.Stats.Base.Info.Squad_KDR.Text = "Squad KDR: " .. calcKDR
- coreUI.Stats.Base.Info.Squad_Wins_Total.Text = "Squad Wins: " .. playerData.Squad_Wins_Total.Value
- coreUI.Stats.Base.Info.Squad_Kills_Total.Text = "Squad Kills: " .. playerData.Squad_Kills_Total.Value
- coreUI.Stats.Base.Info.Squad_Place_Total.Text = "Top Squad Placement: " .. playerData.Squad_Place_Total.Value
- local calcKDR = 0
- if 0 < playerData.Squad_Kills_Total.Value and 0 < playerData.Squad_Deaths_Total.Value then
- calcKDR = playerData.Squad_Kills_Total.Value / playerData.Squad_Deaths_Total.Value
- elseif 0 < playerData.Squad_Kills_Total.Value and playerData.Squad_Deaths_Total.Value == 0 then
- calcKDR = playerData.Squad_Kills_Total.Value
- end
- coreUI.Stats.Base.Info.Squad_KDR_Total.Text = "Squad KDR: " .. calcKDR
- elseif selectedPage == 10 then
- local hasChanged = 0
- local isFree = false
- if playerData.First_Join.Value == 0 then
- isFree = true
- coreUI.Edit.Base.Base.First.Visible = true
- else
- coreUI.Edit.Base.Base.First.Visible = false
- end
- for i, c in pairs(playerData:GetChildren()) do
- if beforeEdit[c.Name] and beforeEdit[c.Name] ~= c.Value then
- hasChanged = hasChanged + 1
- end
- end
- local totalCost = 500 * hasChanged
- if hasChanged > 0 then
- coreUI.Edit.Base.Base.Cost.Visible = true
- coreUI.Edit.Base.Base.Purchase.Visible = true
- if isFree then
- coreUI.Edit.Base.Base.Purchase.Text = "Apply Edits"
- coreUI.Edit.Base.Base.Cost.Cost.Text = "FREE"
- else
- coreUI.Edit.Base.Base.Purchase.Text = "Purchase Edits"
- coreUI.Edit.Base.Base.Cost.Cost.Text = commaSeperate(totalCost)
- end
- else
- coreUI.Edit.Base.Base.Cost.Visible = false
- coreUI.Edit.Base.Base.Purchase.Visible = false
- end
- elseif selectedPage == 3 then
- for i, c in pairs(coreUI.ItemShop.Base.Shop.Base:GetChildren()) do
- pcall(function()
- if c.ClassName == "ImageButton" and not string.find(c.Name, "Chest") then
- if string.find(playerData.Owned_Items.Value, c.ItemName.Value .. ":") then
- c.Owned.Visible = true
- c.Cost.Visible = false
- else
- c.Owned.Visible = false
- c.Cost.Visible = true
- end
- local realItem = game.ReplicatedStorage.Character_Clothing[c.Category.Value][c.ItemName.Value]
- if realItem:FindFirstChild("Image") then
- c.Icon.Image = "rbxassetid://" .. realItem.Image.Value
- end
- c.Base.Title.Text = realItem.Name
- c.Base.Type.Text = realItem.Parent.Name
- if realItem:FindFirstChild("Level") then
- c.BackgroundColor3 = levelData[realItem.Level.Value]
- else
- c.BackgroundColor3 = levelData[1]
- end
- c.Cost.Cost.Text = commaSeperate(realItem.Cost.Value)
- end
- end)
- end
- elseif selectedPage == 12 then
- hasChangedKeybind = false
- changingKeybind = false
- preKeybindEdit = {}
- for i, cc in pairs(keybindNames) do
- pcall(function()
- if playerData:FindFirstChild(i) then
- local c = playerData[i]
- if string.find(c.Name, "_KB") or string.find(c.Name, "_XKB") then
- preKeybindEdit[c.Name] = c.Value
- if not coreUI.Keybinds.Base.Info.Keybinds:FindFirstChild(c.Name) then
- local newBind = script.Keybind:Clone()
- newBind.Name = c.Name
- if keybindNames[c.Name] then
- newBind.BindName.Text = keybindNames[c.Name]
- else
- newBind.BindName.Text = "UNKNOWN"
- end
- local canChange = true
- if string.find(c.Name, "_XKB") then
- newBind.SetBind.AutoButtonColor = false
- newBind.BackgroundColor3 = Color3.new(0.07450980392156863, 0.1843137254901961, 0.24705882352941178)
- newBind.SetBind.Selectable = false
- canChange = false
- end
- if keybindValues2[c.Value] then
- newBind.SetBind.Text = string.upper(keybindValues2[c.Value])
- elseif keybindValues[c.Value] then
- newBind.SetBind.Text = string.upper(keybindValues[c.Value])
- else
- newBind.SetBind.Text = "NONE"
- end
- newBind.Parent = coreUI.Keybinds.Base.Info.Keybinds
- if canChange then
- buttonModule.handleButton(newBind.SetBind, editKeybind, {
- newBind.SetBind,
- c
- })
- end
- elseif keybindValues2[c.Value] then
- coreUI.Keybinds.Base.Info.Keybinds[c.Name].SetBind.Text = string.upper(keybindValues2[c.Value])
- elseif keybindValues[c.Value] then
- coreUI.Keybinds.Base.Info.Keybinds[c.Name].SetBind.Text = string.upper(keybindValues[c.Value])
- else
- coreUI.Keybinds.Base.Info.Keybinds[c.Name].SetBind.Text = "NONE"
- end
- end
- end
- end)
- end
- end
- end
- local function swapPage(old)
- checkUpdate()
- pages[old]:TweenPosition(UDim2.new(-1, 0, 0, 0), "Out", "Quart", 0.25, true)
- pages[selectedPage].Visible = true
- pages[selectedPage]:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quart", 0.25, true)
- if selectedPage ~= 1 then
- spawn(function()
- openInvite(true)
- end)
- if selectedPage ~= 10 then
- game.Lighting.Blur_Effect.Size = 50
- else
- game.Lighting.Blur_Effect.Size = 4
- end
- else
- game.Lighting.Blur_Effect.Size = 4
- end
- wait(0.255)
- if pages[old].Position == UDim2.new(-1, 0, 0, 0) then
- pages[old].Visible = false
- end
- end
- local function swapStorePage(swapVal, instant)
- storeSwapped = swapVal
- local timeTo = 0.25
- if instant then
- timeTo = 0
- end
- if storeSwapped then
- coreUI.Store.Base.Page2:TweenPosition(UDim2.new(-1.504, 0, 0.525, 0), "Out", "Quart", timeTo, true)
- coreUI.Store.Base.Page.Visible = true
- coreUI.Store.Base.Page:TweenPosition(UDim2.new(0.504, 0, 0.525, 0), "Out", "Quart", timeTo, true)
- wait(timeTo)
- if coreUI.Store.Base.Page2.Position == UDim2.new(-1.504, 0, 0.525, 0) then
- coreUI.Store.Base.Page2.Visible = false
- end
- else
- coreUI.Store.Base.Page:TweenPosition(UDim2.new(1.504, 0, 0.525, 0), "Out", "Quart", timeTo, true)
- coreUI.Store.Base.Page2.Visible = true
- coreUI.Store.Base.Page2:TweenPosition(UDim2.new(0.504, 0, 0.525, 0), "Out", "Quart", timeTo, true)
- wait(timeTo)
- if coreUI.Store.Base.Page.Position == UDim2.new(1.504, 0, 0.525, 0) then
- coreUI.Store.Base.Page.Visible = false
- end
- end
- end
- local function doFillToggle()
- if not callingToggleFill then
- callingToggleFill = true
- remoteFunctions.Toggle_Fill:InvokeServer(not Player.Data.Fill.Value)
- callingToggleFill = false
- end
- end
- local function doTypeToggle()
- if not callingToggleType then
- callingToggleType = true
- remoteFunctions.Change_Type:InvokeServer()
- callingToggleType = false
- end
- end
- local function changePageNumber(typeTo, setTo, isEditing)
- playPreviewSound()
- if not isEditing then
- if doingEdit then
- doingEdit = false
- if not purchasedEdits then
- for i, c in pairs(playerData:GetChildren()) do
- if beforeEdit[c.Name] then
- c.Value = beforeEdit[c.Name]
- end
- end
- end
- purchasedEdits = false
- end
- else
- coreUI.Edit.Base.Base.Color.Base.ItemName.Text = ""
- coreUI.Edit.Base.Base.Color.Icon.ImageTransparency = 1
- coreUI.Edit.Base.Base.Color.Icon.BackgroundTransparency = 0
- coreUI.Edit.Base.Base.Color.Icon.BackgroundColor3 = playerData["Hair Color"].Value.Color
- coreUI.Edit.Base.Base.Skin.Base.ItemName.Text = ""
- coreUI.Edit.Base.Base.Skin.Icon.ImageTransparency = 1
- coreUI.Edit.Base.Base.Skin.Icon.BackgroundTransparency = 0
- coreUI.Edit.Base.Base.Skin.Icon.BackgroundColor3 = playerData["Skin Color"].Value.Color
- coreUI.Edit.Base.Base.Hair.Base.ItemName.Text = playerData.Hair.Value
- if game.ReplicatedStorage.Character_Clothing.Hair:FindFirstChild(playerData.Hair.Value) then
- coreUI.Edit.Base.Base.Hair.Base.Icon.Image = "rbxassetid://" .. game.ReplicatedStorage.Character_Clothing.Hair:FindFirstChild(playerData.Hair.Value).Image.Value
- end
- end
- local old = selectedPage
- if typeTo == 1 then
- selectedPage = selectedPage + 1
- elseif typeTo == 2 then
- selectedPage = selectedPage - 1
- elseif typeTo == 3 then
- selectedPage = setTo
- end
- swapPage(old)
- end
- local function shopToStore(val)
- swapStorePage(val, true)
- changePageNumber(3, 6)
- end
- local function toggleEdit(val)
- if val then
- doingEdit = true
- beforeEdit = {
- ["Skin Color"] = playerData["Skin Color"].Value,
- Hair = playerData.Hair.Value,
- ["Hair Color"] = playerData["Hair Color"].Value
- }
- changePageNumber(3, 10, true)
- else
- doingEdit = false
- if not purchasedEdits then
- for i, c in pairs(playerData:GetChildren()) do
- if beforeEdit[c.Name] then
- c.Value = beforeEdit[c.Name]
- end
- end
- end
- purchasedEdits = false
- changePageNumber(3, 2, true)
- end
- end
- local function tooPoor(neededFunds)
- local useThis
- for i, c in pairs(creditTiers) do
- if neededFunds <= c or i == #creditTiers then
- useThis = i
- break
- end
- end
- marketplaceService:PromptProductPurchase(Player, tierIds[useThis])
- end
- local function doEditPurchase()
- local hasEdited = false
- if not purchasedEdits then
- for i, c in pairs(playerData:GetChildren()) do
- if beforeEdit[c.Name] and beforeEdit[c.Name] ~= c.Value then
- hasEdited = true
- end
- end
- end
- if hasEdited then
- local hasChanged = 0
- for i, c in pairs(playerData:GetChildren()) do
- if beforeEdit[c.Name] and beforeEdit[c.Name] ~= c.Value then
- hasChanged = hasChanged + 1
- end
- end
- local totalCost = 500 * hasChanged
- if totalCost <= playerData.Credits.Value or playerData.First_Join.Value == 0 then
- do
- local afterEdit = {}
- for i, c in pairs(playerData:GetChildren()) do
- if beforeEdit[c.Name] and beforeEdit[c.Name] ~= c.Value then
- afterEdit[c.Name] = c.Value
- end
- end
- if pcall(function()
- remoteFunctions.Edit_Character:InvokeServer(afterEdit)
- end) then
- doingEdit = false
- changePageNumber(3, 2)
- end
- end
- else
- tooPoor(totalCost - playerData.Credits.Value)
- end
- else
- changePageNumber(3, 2)
- end
- end
- local function equipSelectedEdit(itemName, itemCategory)
- playerData[itemCategory].Value = itemName
- changePageNumber(3, 10, true)
- end
- local function equipSelected(itemName, itemCategory, dataName)
- if not doingEquip then
- doingEquip = true
- remoteFunctions.Equip_Item:InvokeServer(itemName, itemCategory, dataName)
- changePageNumber(3, 2)
- doingEquip = false
- end
- end
- local function buyItemShop(itemName, itemCategory)
- if not doingBuy and game.ReplicatedStorage.Character_Clothing:FindFirstChild(itemCategory) and game.ReplicatedStorage.Character_Clothing[itemCategory]:FindFirstChild(itemName) and not string.find(playerData.Owned_Items.Value, itemName .. ":") then
- if playerData.Credits.Value >= game.ReplicatedStorage.Character_Clothing[itemCategory][itemName].Cost.Value then
- doingBuy = true
- if remoteFunctions.Buy_Item:InvokeServer(itemName, itemCategory) then
- script.Purchase:Play()
- end
- checkUpdate()
- doingBuy = false
- else
- tooPoor(game.ReplicatedStorage.Character_Clothing[itemCategory][itemName].Cost.Value - playerData.Credits.Value)
- end
- end
- end
- local function buyChestShop(itemName)
- if not doingBuyChest and game.ReplicatedStorage.Chests:FindFirstChild(itemName) then
- if playerData.Credits.Value >= game.ReplicatedStorage.Chests[itemName].Cost.Value then
- doingBuyChest = true
- do
- local obj, prev = remoteFunctions.Buy_Chest:InvokeServer(itemName)
- if obj then
- spawn(function()
- local newitem = coreUI.Unboxed.Base.Woot.Base.Recieved
- if obj:FindFirstChild("Image") then
- newitem.Icon.Image = "rbxassetid://" .. obj.Image.Value
- else
- newitem.Icon.Image = "rbxassetid://1337"
- end
- newitem.Bottom.ItemName.Text = obj.Name
- newitem.Bottom.ItemCat.Text = obj.Parent.Name
- if obj:FindFirstChild("Level") then
- newitem.BackgroundColor3 = levelData[obj.Level.Value]
- else
- newitem.BackgroundColor3 = levelData[1]
- end
- if obj:FindFirstChild("Color") then
- newitem.Icon.Image = "0"
- newitem.BackgroundTransparency = 0
- newitem.BackgroundColor3 = obj.Color.Value.Color
- end
- if prev then
- coreUI.Unboxed.Base.Woot.Base.Duplicate.Visible = true
- else
- coreUI.Unboxed.Base.Woot.Base.Duplicate.Visible = false
- end
- end)
- coreUI.Unboxed:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quart", 0.25, true)
- script.Chest_Open:Play()
- wait(2.75)
- coreUI.Unboxed:TweenPosition(UDim2.new(0, 0, -1, 0), "Out", "Quart", 0.25, true)
- end
- checkUpdate()
- doingBuyChest = false
- end
- else
- tooPoor(game.ReplicatedStorage.Chests[itemName].Cost.Value - playerData.Credits.Value)
- end
- end
- end
- local possibleItemsChest = {}
- for i, c in pairs(game.ReplicatedStorage.Character_Clothing:GetChildren()) do
- if c.Name == "Clothing" or c.Name == "Face" or c.Name == "Glider" or c.Name == "Hat" or c.Name == "Tool" then
- for ii, cc in pairs(c:GetChildren()) do
- if cc.Name ~= "Normal" and cc.Name ~= "None" and cc.Name ~= "Pickaxe" and not cc:FindFirstChild("Featured") then
- table.insert(possibleItemsChest, cc)
- end
- end
- end
- end
- local possibleItemsChest2 = {}
- for i, c in pairs(game.ReplicatedStorage.Character_Clothing:GetChildren()) do
- if c.Name == "Effect" or c.Name == "Trail" or c.Name == "Emote" then
- for ii, cc in pairs(c:GetChildren()) do
- if cc.Name ~= "Normal" and cc.Name ~= "None" and cc.Name ~= "Pickaxe" and not cc:FindFirstChild("Featured") then
- table.insert(possibleItemsChest2, cc)
- end
- end
- end
- end
- function playPreviewSound(soundId, button)
- if not soundId then
- if currentlyPlaying then
- currentlyPlaying:Stop()
- currentlyPlayingButton.Icon.Image = "rbxassetid://1351656403"
- currentlyPlaying:Destroy()
- end
- else
- if currentlyPlaying then
- currentlyPlaying:Stop()
- currentlyPlayingButton.Icon.Image = "rbxassetid://1351656403"
- end
- if currentlyPlayingButton == button then
- currentlyPlaying:Destroy()
- currentlyPlayingButton = nil
- currentlyPlaying = nil
- else
- if currentlyPlaying then
- currentlyPlaying:Destroy()
- currentlyPlayingButton = nil
- currentlyPlaying = nil
- end
- currentlyPlaying = Instance.new("Sound")
- currentlyPlaying.SoundId = "rbxassetid://" .. soundId
- currentlyPlayingButton = button
- currentlyPlayingButton.Icon.Image = "rbxassetid://1351656404"
- currentlyPlaying.Name = "Preview_Sound"
- currentlyPlaying.Parent = script
- currentlyPlaying:Play()
- end
- end
- end
- local function swapToPossibles(viewName)
- if game.ReplicatedStorage.Chests:FindFirstChild(viewName) then
- for i, c in pairs(coreUI.Possibles.Base.Bottom.Holder:GetChildren()) do
- if c.ClassName == "TextButton" then
- c:Destroy()
- end
- end
- local useThis = possibleItemsChest
- if viewName == "Chest 2" then
- useThis = possibleItemsChest2
- end
- for i, c in pairs(useThis) do
- local newitem = script.ItemPossible:Clone()
- if c:FindFirstChild("Image") then
- newitem.Icon.Image = "rbxassetid://" .. c.Image.Value
- end
- newitem.Selectable = false
- newitem.AutoButtonColor = false
- newitem.Bottom.ItemName.Text = c.Name
- newitem.Bottom.ItemCat.Text = c.Parent.Name
- newitem.Name = c.Name
- newitem.Parent = coreUI.Possibles.Base.Bottom.Holder
- if c:FindFirstChild("Level") then
- newitem.BackgroundColor3 = levelData[c.Level.Value]
- else
- newitem.BackgroundColor3 = levelData[1]
- end
- if c:FindFirstChild("Color") then
- newitem.Icon.Image = "0"
- newitem.BackgroundTransparency = 0
- newitem.BackgroundColor3 = c.Color.Value.Color
- end
- if c:FindFirstChild("Sound") then
- buttonModule.handleButton(newitem.Play, playPreviewSound, {
- c.Sound.Value,
- newitem.Play
- })
- else
- newitem.Play:Destroy()
- end
- end
- coreUI.Possibles.Base.Top.Top.Title.Text = string.upper(viewName) .. " CONTAINS"
- changePageNumber(3, 9)
- coreUI.Possibles.Base.Bottom.Holder.CanvasPosition = Vector2.new(0, 0)
- end
- end
- local function swapToEquip(viewName, dataName)
- if game.ReplicatedStorage.Character_Clothing:FindFirstChild(viewName) then
- for i, c in pairs(coreUI.Inventory.Base.Bottom.Holder:GetChildren()) do
- if c.ClassName == "TextButton" then
- c:Destroy()
- end
- end
- for i, c in pairs(game.ReplicatedStorage.Character_Clothing[viewName]:GetChildren()) do
- if doingEdit or c.Name == "Normal" or c.Name == "Normal2" or c.Name == "None" or c.Name == "Pickaxe" or playerData[dataName].Value == c.Name or string.find(playerData.Owned_Items.Value, c.Name .. ":") then
- local newitem = script.Item:Clone()
- if c:FindFirstChild("Image") then
- newitem.Icon.Image = "rbxassetid://" .. c.Image.Value
- end
- newitem.Bottom.ItemName.Text = c.Name
- newitem.Name = c.Name
- newitem.Parent = coreUI.Inventory.Base.Bottom.Holder
- if playerData[dataName].Value == c.Name then
- newitem.BorderSizePixel = 3
- end
- if c:FindFirstChild("Level") then
- newitem.BackgroundColor3 = levelData[c.Level.Value]
- else
- newitem.BackgroundColor3 = levelData[1]
- end
- if string.find(viewName, "Color") then
- newitem.Icon.Image = "0"
- newitem.BackgroundTransparency = 0
- newitem.BackgroundColor3 = c.Value.Color
- end
- if c:FindFirstChild("Color") then
- newitem.Icon.Image = "0"
- newitem.BackgroundTransparency = 0
- newitem.BackgroundColor3 = c.Color.Value.Color
- end
- if doingEdit then
- if string.find(viewName, "Color") then
- buttonModule.handleButton(newitem, equipSelectedEdit, {
- c.Value,
- viewName
- })
- else
- buttonModule.handleButton(newitem, equipSelectedEdit, {
- c.Name,
- viewName
- })
- end
- else
- buttonModule.handleButton(newitem, equipSelected, {
- c.Name,
- viewName,
- dataName
- })
- end
- if c:FindFirstChild("Sound") then
- buttonModule.handleButton(newitem.Play, playPreviewSound, {
- c.Sound.Value,
- newitem.Play
- })
- else
- newitem.Play:Destroy()
- end
- end
- end
- if not doingEdit then
- coreUI.Inventory.Base.Top.Top.Title.Text = string.upper(viewName) .. " - OWNED"
- changePageNumber(3, 8)
- else
- coreUI.Inventory.Base.Top.Top.Title.Text = string.upper(viewName)
- changePageNumber(3, 8, true)
- end
- coreUI.Inventory.Base.Bottom.Holder.CanvasPosition = Vector2.new(0, 0)
- end
- end
- function openInvite(override)
- if not togglingInvite or override then
- togglingInvite = true
- if override then
- friendsOpen = false
- elseif not Player.Data.Waiting.Value and not Player.Data.Line.Value and not Player.Data.Ready.Value then
- friendsOpen = not friendsOpen
- else
- friendsOpen = false
- end
- if friendsOpen then
- if selectedPage ~= 1 then
- changePageNumber(3, 1)
- end
- coreUI.Friends.Visible = true
- coreUI.Friends:TweenPosition(UDim2.new(0.8, 0, 0.285, 0), "Out", "Quart", 0.25, true)
- else
- coreUI.Friends:TweenPosition(UDim2.new(1.05, 0, 0.285, 0), "Out", "Quart", 0.25, true)
- spawn(function()
- wait(0.255)
- if coreUI.Friends.Position == UDim2.new(1.05, 0, 0.285, 0) then
- coreUI.Friends.Visible = false
- end
- end)
- end
- wait(0.125)
- togglingInvite = false
- end
- end
- local function doMatching()
- if not callingMatching then
- callingMatching = true
- spawn(function()
- openInvite(true)
- end)
- remoteFunctions.Toggle_Matching:InvokeServer()
- wait(1)
- callingMatching = false
- end
- end
- local function declineInvite()
- if invitePlayer then
- invitePlayer = nil
- end
- end
- local function acceptInvite()
- if invitePlayer then
- remoteEvents.Join_Group:FireServer(invitePlayer)
- invitePlayer = nil
- end
- end
- local function leaveGroup()
- if not leavingGroup then
- leavingGroup = true
- remoteEvents.Leave_Group:FireServer()
- wait(1)
- leavingGroup = false
- end
- end
- local function redeemCode()
- if canUseCode and coreUI.Codes.Base.Holder.CodeBox.Text ~= "" and coreUI.Codes.Base.Holder.CodeBox.Text ~= " " and coreUI.Codes.Base.Holder.CodeBox.Text ~= "Enter Code Here" then
- canUseCode = false
- local note = remoteFunctions.Twitter_Code:InvokeServer(coreUI.Codes.Base.Holder.CodeBox.Text)
- if note then
- coreUI.Codes.Base.Holder.CodeBox.Text = note
- end
- wait(5)
- coreUI.Codes.Base.Holder.CodeBox.Text = "Enter Code Here"
- canUseCode = true
- else
- coreUI.Codes.Base.Holder.CodeBox.Text = "Enter Code Here"
- end
- end
- local sortTable = function(tab)
- local reversed = {}
- local nums = {}
- for i, c in pairs(tab) do
- if not reversed[c] then
- reversed[c] = {}
- end
- table.insert(reversed[c], i)
- table.insert(nums, c)
- end
- table.sort(nums)
- local newTable = {}
- local current = {}
- for i = #nums, 1, -1 do
- if nums[i] then
- if not current[nums[i]] then
- current[nums[i]] = 1
- else
- current[nums[i]] = current[nums[i]] + 1
- end
- table.insert(newTable, {
- playerName = reversed[nums[i]][current[nums[i]]],
- Val = nums[i]
- })
- end
- end
- return newTable
- end
- local function doThing(tab1, tab2)
- local count = 1
- for i, c in pairs(tab1[1]:GetChildren()) do
- if c.ClassName == "TextLabel" then
- c:Destroy()
- end
- end
- local deathsTable = sortTable(tab2[1])
- for i, c in pairs(deathsTable) do
- local newName = script.Player1:Clone()
- newName.Text = "#" .. count .. ". " .. c.playerName .. ": " .. c.Val .. " Deaths"
- if c.playerName == Player.Name then
- newName.BackgroundColor3 = Color3.fromRGB(36, 89, 117)
- end
- newName.Parent = tab1[1]
- count = count + 1
- end
- count = 1
- for i, c in pairs(tab1[2]:GetChildren()) do
- if c.ClassName == "TextLabel" then
- c:Destroy()
- end
- end
- local winsTable = sortTable(tab2[2])
- for i, c in pairs(winsTable) do
- local newName = script.Player1:Clone()
- newName.Text = "#" .. count .. ". " .. c.playerName .. ": " .. c.Val .. " Wins"
- if c.playerName == Player.Name then
- newName.BackgroundColor3 = Color3.fromRGB(36, 89, 117)
- end
- newName.Parent = tab1[2]
- count = count + 1
- end
- count = 1
- for i, c in pairs(tab1[3]:GetChildren()) do
- if c.ClassName == "TextLabel" then
- c:Destroy()
- end
- end
- local killsTable = sortTable(tab2[3])
- for i, c in pairs(killsTable) do
- local newName = script.Player1:Clone()
- newName.Text = "#" .. count .. ". " .. c.playerName .. ": " .. c.Val .. " Kills"
- if c.playerName == Player.Name then
- newName.BackgroundColor3 = Color3.fromRGB(36, 89, 117)
- end
- newName.Parent = tab1[3]
- count = count + 1
- end
- end
- local function updateLeaderboard(leaderboardType)
- currentLeaderboardType = leaderboardType
- if leaderboardType == 1 then
- coreUI.Leaderboard.Base.Select.Deaths.Text = "Top 100 Deaths - Solo"
- coreUI.Leaderboard.Base.Select.Wins.Text = "Top 100 Wins - Solo"
- coreUI.Leaderboard.Base.Select.Kills.Text = "Top 100 Kills - Solo"
- doThing({
- coreUI.Leaderboard.Base.Info.Deaths.Holder,
- coreUI.Leaderboard.Base.Info.Wins.Holder,
- coreUI.Leaderboard.Base.Info.Kills.Holder
- }, {
- soloDeathsX,
- soloWinsX,
- soloKillsX
- })
- elseif leaderboardType == 2 then
- coreUI.Leaderboard.Base.Select.Deaths.Text = "Top 100 Deaths - Duo"
- coreUI.Leaderboard.Base.Select.Wins.Text = "Top 100 Wins - Duo"
- coreUI.Leaderboard.Base.Select.Kills.Text = "Top 100 Kills - Duo"
- doThing({
- coreUI.Leaderboard.Base.Info.Deaths.Holder,
- coreUI.Leaderboard.Base.Info.Wins.Holder,
- coreUI.Leaderboard.Base.Info.Kills.Holder
- }, {
- duoDeathsX,
- duoWinsX,
- duoKillsX
- })
- elseif leaderboardType == 3 then
- coreUI.Leaderboard.Base.Select.Deaths.Text = "Top 100 Deaths - Squad"
- coreUI.Leaderboard.Base.Select.Wins.Text = "Top 100 Wins - Squad"
- coreUI.Leaderboard.Base.Select.Kills.Text = "Top 100 Kills - Squad"
- doThing({
- coreUI.Leaderboard.Base.Info.Deaths.Holder,
- coreUI.Leaderboard.Base.Info.Wins.Holder,
- coreUI.Leaderboard.Base.Info.Kills.Holder
- }, {
- squadDeathsX,
- squadWinsX,
- squadKillsX
- })
- end
- end
- local function getLeaderboards()
- if tick() - lastLeaderboardGet >= 55 then
- lastLeaderboardGet = tick()
- local soloDeaths, soloWins, soloKills, duoDeaths, duoWins, duoKills, squadDeaths, squadWins, squadKills = remoteFunctions.Get_Leaderboards:InvokeServer()
- if soloDeaths then
- soloDeathsX, soloWinsX, soloKillsX, duoDeathsX, duoWinsX, duoKillsX, squadDeathsX, squadWinsX, squadKillsX = soloDeaths, soloWins, soloKills, duoDeaths, duoWins, duoKills, squadDeaths, squadWins, squadKills
- updateLeaderboard(currentLeaderboardType)
- end
- end
- end
- local function buyItem(buyType, itemID)
- if buyType == 1 then
- if not Player.Data.Teleporting.Value then
- marketplaceService:PromptProductPurchase(Player, itemID)
- end
- elseif buyType == 2 then
- marketplaceService:PromptGamePassPurchase(Player, itemID)
- end
- end
- local playerClickedRecent = {}
- local function inviteFriend(PlayerName, playerFriendsID)
- if friends then
- local c = friends[playerFriendsID]
- if game.Players:FindFirstChild(PlayerName) then
- remoteEvents.Request_Invite:FireServer(game.Players[PlayerName])
- elseif c.LocationType == 0 or c.PlaceId ~= game.PlaceId then
- if c.LocationType ~= 0 and c.PlaceId ~= 1320174999 then
- _G.notify("Player not in game", Color3.new(1, 1, 1))
- elseif c.LocationType ~= 0 and c.PlaceId == 1320174999 then
- _G.notify("Player currently in game", Color3.new(1, 1, 1))
- end
- elseif c.LocationType ~= 0 and c.PlaceId == game.PlaceId then
- if not playerClickedRecent[PlayerName] then
- playerClickedRecent[PlayerName] = true
- spawn(function()
- wait(3)
- playerClickedRecent[PlayerName] = nil
- end)
- _G.notify("Player not in same server", Color3.new(1, 1, 1))
- wait()
- _G.notify("Invite again to join their lobby!", Color3.new(0.25, 1, 0.25))
- else
- print("Attempting to follow...")
- playerClickedRecent[PlayerName] = nil
- local good, PlayerID = pcall(function()
- return game.Players:GetUserIdFromNameAsync(PlayerName)
- end)
- if good and PlayerID then
- local ret = remoteFunctions.Follow:InvokeServer(PlayerID)
- if ret == 0 then
- _G.notify("Joining Players lobby!", Color3.new(1, 1, 1))
- elseif ret == 1 then
- _G.notify("Player no longer in lobby", Color3.new(1, 0.25, 0.25))
- elseif ret == 2 then
- _G.notify("Error joining Player", Color3.new(1, 0, 0))
- end
- else
- _G.notify("Error fetching Player ID", Color3.new(1, 0, 0))
- end
- end
- end
- elseif game.Players:FindFirstChild(PlayerName) then
- remoteEvents.Request_Invite:FireServer(game.Players[PlayerName])
- elseif not playerClickedRecent[PlayerName] then
- playerClickedRecent[PlayerName] = true
- spawn(function()
- wait(3)
- playerClickedRecent[PlayerName] = nil
- end)
- _G.notify("Player not in same server", Color3.new(1, 1, 1))
- wait()
- _G.notify("Invite again to join their lobby!", Color3.new(0.25, 1, 0.25))
- else
- print("Attempting to follow...")
- playerClickedRecent[PlayerName] = nil
- local good, PlayerID = pcall(function()
- return game.Players:GetUserIdFromNameAsync(PlayerName)
- end)
- if good and PlayerID then
- local ret = remoteFunctions.Follow:InvokeServer(PlayerID)
- if ret == 0 then
- _G.notify("Joining Players lobby!", Color3.new(1, 1, 1))
- elseif ret == 1 then
- _G.notify("Player no longer in lobby", Color3.new(1, 0.25, 0.25))
- elseif ret == 2 then
- _G.notify("Error joining Player", Color3.new(1, 0, 0))
- else
- _G.notify("Unknown error joining Player", Color3.new(1, 0, 0))
- end
- else
- _G.notify("Error fetching Player ID", Color3.new(1, 0, 0))
- end
- end
- end
- local function updateStorePrices()
- pcall(function()
- local developerProducts = marketplaceService:GetDeveloperProductsAsync():GetCurrentPage()
- local products = {}
- for _, developerProduct in pairs(developerProducts) do
- products[developerProduct.ProductId] = developerProduct
- end
- for i, c in pairs(coreUI.Store.Base.Page.Page:GetChildren()) do
- pcall(function()
- if products[c.ID.Value] and products[c.ID.Value].PriceInRobux then
- c.Base.Cost.Text = products[c.ID.Value].PriceInRobux .. " Robux"
- end
- end)
- end
- for i, c in pairs(coreUI.Store.Base.Page2:GetChildren()) do
- pcall(function()
- if products[c.ID.Value] and products[c.ID.Value].PriceInRobux then
- c.Base.Cost.Text = products[c.ID.Value].PriceInRobux .. " Robux"
- end
- end)
- end
- end)
- end
- remoteEvents.Request_Invite.OnClientEvent:connect(function(From)
- local has = false
- for i, c in pairs(requestQue) do
- if c == From then
- has = true
- end
- end
- if not has then
- table.insert(requestQue, From)
- repeat
- wait()
- until requestQue[1] == From
- invitePlayer = From
- coreUI.Invite.PlayerName.Text = From.Name
- coreUI.Invite.Visible = true
- coreUI.Invite:TweenPosition(UDim2.new(0.02, 0, 0.45, 0), "Out", "Quart", 0.25, true)
- local start = tick()
- repeat
- wait()
- until tick() - start >= 10 or not invitePlayer
- coreUI.Invite:TweenPosition(UDim2.new(-0.52, 0, 0.45, 0), "Out", "Quart", 0.25, true)
- wait(0.25)
- coreUI.Invite.Visible = false
- if requestQue[1] == From then
- table.remove(requestQue, 1)
- end
- invitePlayer = nil
- end
- end)
- remoteEvents.Sent_Invite.OnClientEvent:connect(function()
- _G.notify("Group invite sent!", Color3.new(1, 1, 1))
- end)
- remoteEvents.Full_Invite.OnClientEvent:connect(function()
- _G.notify("Player already in group!", Color3.new(1, 1, 1))
- end)
- local function goBackPossibles()
- if not doingEdit then
- changePageNumber(3, 2)
- else
- changePageNumber(3, 10, true)
- end
- end
- remoteEvents.Daily_Reward.OnClientEvent:connect(function(totalDays, amount)
- wait(1)
- coreUI.Reward.Base.Shop.Base.Days.Text = totalDays .. " Consecutive Days!"
- coreUI.Reward.Base.Shop.Base.Reward.Text = "+" .. commaSeperate(amount) .. " Bucks!"
- repeat
- wait(0.25)
- until not exclusiveOpen
- toggleReward(true)
- end)
- game:GetService("RunService").Heartbeat:connect(function()
- if Player:FindFirstChild("Data") and Player.Data.Status.Value ~= "" then
- if tick() - tock >= 0.75 then
- tock = tick()
- coreUI.Buttons.Status.Info.Text = Player.Data.Status.Value .. string.rep(".", dotCount)
- dotCount = dotCount + 1
- if dotCount > 3 then
- dotCount = 0
- end
- elseif coreUI.Buttons.Status.Info.Text == "" then
- coreUI.Buttons.Status.Info.Text = Player.Data.Status.Value
- end
- coreUI.Buttons.Status:TweenPosition(UDim2.new(0.02, 0, -0.05, 0), "Out", "Quart", 0.25, true)
- else
- coreUI.Buttons.Status:TweenPosition(UDim2.new(-0.52, 0, -0.05, 0), "Out", "Quart", 0.25, true)
- spawn(function()
- wait(0.25)
- if Player.Data.Status.Value == "" then
- coreUI.Buttons.Status.Info.Text = ""
- end
- end)
- end
- if Player.Data.Waiting.Value and not Player.Data.Teleporting.Value then
- coreUI.Lobby.Buttons.Count.Info.Text = game.ReplicatedStorage.Server_Data[types[Player.Data.Group.Value.Owner.Value.Data.Type.Value] .. "_Count"].Value .. " Players"
- coreUI.Lobby.Buttons.Count:TweenPosition(UDim2.new(0.105, 0, 0.65, 0), "Out", "Quart", 0.25, true)
- else
- coreUI.Lobby.Buttons.Count:TweenPosition(UDim2.new(-0.505, 0, 0.65, 0), "Out", "Quart", 0.25, true)
- end
- if tick() - leaderboardSecondUpdate >= 1 then
- local currentTime = os.time()
- if selectedPage == 5 or selectedPage == 4 then
- leaderboardSecondUpdate = tick()
- local lastUpdateLeaderboard = game.ReplicatedStorage.Server_Data.Leaderboard_Update.Value
- if currentTime - lastUpdateLeaderboard < 604800 then
- local difference = 604800 - (currentTime - lastUpdateLeaderboard)
- local days = "0"
- local hours = "00"
- local minutes = "00"
- local seconds = "00"
- if 0 < difference / 60 / 60 then
- local hoursX = math.floor(difference / 60 / 60)
- local daysX = math.floor(hoursX / 24)
- if daysX > 0 then
- days = tostring(daysX)
- difference = difference - daysX * 24 * 60 * 60
- end
- local hoursX = math.floor(difference / 60 / 60)
- if hoursX >= 10 then
- hours = tostring(hoursX)
- else
- hours = "0" .. hoursX
- end
- difference = difference - hoursX * 60 * 60
- end
- if 0 < difference / 60 then
- local minutesX = math.floor(difference / 60)
- if minutesX >= 10 then
- minutes = tostring(minutesX)
- else
- minutes = "0" .. minutesX
- end
- difference = difference - minutesX * 60
- end
- if difference > 0 then
- local secondsX = math.floor(difference)
- if secondsX >= 10 then
- seconds = tostring(secondsX)
- else
- seconds = "0" .. secondsX
- end
- end
- coreUI.Leaderboard.Base.Top.Timer.Text = "Resets in: " .. days .. ":" .. hours .. ":" .. minutes .. ":" .. seconds
- coreUI.Stats.Base.Top.Top.Reset.Text = "Weekly reset in: " .. days .. ":" .. hours .. ":" .. minutes .. ":" .. seconds
- else
- coreUI.Leaderboard.Base.Top.Timer.Text = "Resetting soon..."
- coreUI.Stats.Base.Top.Top.Reset.Text = "Resetting soon..."
- end
- end
- if exclusiveOpen or selectedPage == 1 then
- local lastUpdateStarterPack = playerData.Exclusive.Value
- if currentTime - lastUpdateStarterPack < 172800 and not playerData.Exclusive_Purchased.Value then
- local difference = 172800 - (currentTime - lastUpdateStarterPack)
- local hours = "00"
- local minutes = "00"
- local seconds = "00"
- if 0 < difference / 60 / 60 then
- local hoursX = math.floor(difference / 60 / 60)
- local hoursX = math.floor(difference / 60 / 60)
- if hoursX >= 10 then
- hours = tostring(hoursX)
- else
- hours = "0" .. hoursX
- end
- difference = difference - hoursX * 60 * 60
- end
- if 0 < difference / 60 then
- local minutesX = math.floor(difference / 60)
- if minutesX >= 10 then
- minutes = tostring(minutesX)
- else
- minutes = "0" .. minutesX
- end
- difference = difference - minutesX * 60
- end
- if difference > 0 then
- local secondsX = math.floor(difference)
- if secondsX >= 10 then
- seconds = tostring(secondsX)
- else
- seconds = "0" .. secondsX
- end
- end
- coreUI.Lobby.Buttons.Exclusive.Visible = true
- coreUI.Lobby.Buttons.Exclusive.Text = "EXCLUSIVE! " .. hours .. ":" .. minutes .. ":" .. seconds
- coreUI.Exclusive.Base.Top.Top.Timer.Text = hours .. ":" .. minutes .. ":" .. seconds
- else
- coreUI.Lobby.Buttons.Exclusive.Visible = false
- toggleExclusive(true, false)
- end
- end
- end
- coreUI.Buttons.Cash.Count.Text = commaSeperate(playerData.Credits.Value)
- if selectedPage == 1 then
- coreUI.Lobby.Level.Level.Text = "Level " .. playerData.Player_Level.Value
- coreUI.Lobby.Level.Total.Text = playerData.Player_XP.Value .. "|" .. (playerData.Player_Level.Value * 10) ^ 2
- local percent = playerData.Player_XP.Value / (playerData.Player_Level.Value * 10) ^ 2
- if percent > 1 then
- percent = 1
- end
- coreUI.Lobby.Level.Bar.Inner.Size = UDim2.new(percent, 0, 1, 0)
- if Player.Data.Group.Value and Player.Data.Group.Value:FindFirstChild("Owner") and Player.Data.Group.Value.Owner.Value ~= Player or Player.Data.Group.Value.Name ~= Player.Name or 1 < #Player.Data.Group.Value:GetChildren() then
- coreUI.Lobby.Buttons.LeaveGroup:TweenPosition(UDim2.new(0.9, 0, 0.65, 0), "Out", "Quart", 0.25, true)
- else
- coreUI.Lobby.Buttons.LeaveGroup:TweenPosition(UDim2.new(1.25, 0, 0.65, 0), "Out", "Quart", 0.25, true)
- end
- if Player.Data.Group.Value and Player.Data.Group.Value:FindFirstChild("Owner") and Player.Data.Group.Value.Owner.Value then
- local Player = Player.Data.Group.Value.Owner.Value
- if Player.Data.Fill.Value then
- coreUI.Lobby.Matching.FillButton.Text = "Fill"
- else
- coreUI.Lobby.Matching.FillButton.Text = "No Fill"
- end
- coreUI.Lobby.Matching.TypeButton.Text = types[Player.Data.Type.Value]
- end
- if Player.Data.Ready.Value then
- coreUI.Lobby.Matching.Play.Text = "Not Ready"
- else
- coreUI.Lobby.Matching.Play.Text = "Ready"
- end
- if Player.Data.Ready.Value then
- workspace.Characters[Player.Name].Head.Info.Ready.Text = "Ready"
- workspace.Characters[Player.Name].Head.Info.Ready.TextColor3 = Color3.new(0.25, 1, 0.25)
- else
- workspace.Characters[Player.Name].Head.Info.Ready.Text = "Not Ready"
- workspace.Characters[Player.Name].Head.Info.Ready.TextColor3 = Color3.new(1, 0.125, 0.125)
- end
- if game.ReplicatedStorage.Player_Data:FindFirstChild(Player.Name) then
- workspace.Characters[Player.Name].Head.Info.Level.Text = "Level " .. game.ReplicatedStorage.Player_Data[Player.Name].Player_Level.Value
- end
- for i, c in pairs(workspace.Characters:GetChildren()) do
- if c:FindFirstChild("Head") then
- c.Head.Info.Enabled = true
- end
- end
- else
- for i, c in pairs(workspace.Characters:GetChildren()) do
- if c:FindFirstChild("Head") then
- c.Head.Info.Enabled = false
- end
- end
- end
- end)
- game:GetService("RunService").Stepped:connect(function()
- if tick() - tpDataTick >= 1 and Player.Data.Ready.Value and Player.Data.Waiting.Value and Player.Data.Group.Value then
- local playerIds = {}
- for i, c in pairs(Player.Data.Group.Value:GetChildren()) do
- if c and c.Value then
- table.insert(playerIds, c.Value.UserId)
- end
- end
- tpService:SetTeleportSetting("Group_IDs", playerIds)
- end
- local ii = 1
- for i = 1, 4 do
- if Player.Data.Group.Value and not Player.Data.Group.Value:GetChildren()[i] then
- if coreUI.Invites:FindFirstChild("Invite_" .. ii) then
- local obj = coreUI.Invites["Invite_" .. ii]
- local pos = Camera:WorldToViewportPoint(workspace["Spot" .. ii].Position + Vector3.new(0, 7, 0))
- obj.Position = UDim2.new(0, pos.x, 0, pos.y)
- if not obj.Visible then
- for iii, cc in pairs(workspace.Characters:GetChildren()) do
- if cc:FindFirstChild("ID:" .. ii) then
- cc:Destroy()
- end
- end
- end
- if selectedPage == 1 then
- obj.Visible = true
- else
- obj.Visible = false
- end
- ii = ii + 1
- end
- elseif Player.Data.Group.Value and Player.Data.Group.Value:GetChildren()[i] then
- if Player.Data.Group.Value:GetChildren()[i].Value ~= Player and coreUI.Invites:FindFirstChild("Invite_" .. ii) then
- local obj = coreUI.Invites["Invite_" .. ii]
- if not workspace.Characters:FindFirstChild(Player.Data.Group.Value:GetChildren()[i].Value.Name) then
- local playerModel = script[ii]:Clone()
- playerModel.Name = Player.Data.Group.Value:GetChildren()[i].Value.Name
- playerModel.Head.Info.Username.Text = playerModel.Name
- local id = Instance.new("BoolValue")
- id.Name = "ID:" .. ii
- id.Parent = playerModel
- playerModel.Parent = workspace.Characters
- end
- obj.Visible = false
- ii = ii + 1
- end
- local Player = Player.Data.Group.Value:GetChildren()[i].Value
- if workspace.Characters:FindFirstChild(Player.Name) then
- if Player.Data.Ready.Value then
- workspace.Characters[Player.Name].Head.Info.Ready.Text = "Ready"
- workspace.Characters[Player.Name].Head.Info.Ready.TextColor3 = Color3.new(0.25, 1, 0.25)
- else
- workspace.Characters[Player.Name].Head.Info.Ready.Text = "Not Ready"
- workspace.Characters[Player.Name].Head.Info.Ready.TextColor3 = Color3.new(1, 0.125, 0.125)
- end
- if game.ReplicatedStorage.Player_Data:FindFirstChild(Player.Name) then
- workspace.Characters[Player.Name].Head.Info.Level.Text = "Level " .. game.ReplicatedStorage.Player_Data[Player.Name].Player_Level.Value
- end
- end
- end
- end
- if tick() - friendsRefresh >= 4 then
- onlineFriends = 0
- friendsRefresh = tick()
- if not pcall(function()
- friends = game.Players.LocalPlayer:GetFriendsOnline(200)
- end) then
- friends = nil
- warn("Friends list fetch failed!")
- counter = counter + 1
- if counter % 8 == 0 then
- _G.notify("Friends list currently unavailable.", Color3.new(1, 0.125, 0.125))
- end
- for i, c in pairs(coreUI.Friends.Holder:GetChildren()) do
- if c.ClassName == "TextButton" then
- c:Destroy()
- end
- end
- for i, c in pairs(game.Players:GetChildren()) do
- if c and c ~= Player and c:IsFriendsWith(Player.UserId) then
- local newFriend = script.Friend:Clone()
- newFriend.PlayerName.Text = c.Name
- newFriend.Parent = coreUI.Friends.Holder
- buttonModule.handleButton(newFriend.Invite, inviteFriend, {
- c.Name,
- i
- })
- end
- end
- else
- for i, c in pairs(coreUI.Friends.Holder:GetChildren()) do
- if c.ClassName == "TextButton" then
- c:Destroy()
- end
- end
- for i, c in pairs(friends) do
- if c then
- local newFriend = script.Friend:Clone()
- newFriend.PlayerName.Text = c.UserName
- if not game.Players:FindFirstChild(c.UserName) then
- if c.LocationType == 0 or c.PlaceId ~= game.PlaceId then
- if c.LocationType ~= 0 and c.PlaceId ~= 1320174999 then
- newFriend.Icon.Image = "rbxassetid://1102807089"
- elseif c.LocationType ~= 0 and c.PlaceId == 1320174999 then
- newFriend.Icon.Image = "rbxassetid://1215289314"
- end
- elseif c.LocationType ~= 0 and c.PlaceId == game.PlaceId then
- onlineFriends = onlineFriends + 1
- end
- else
- onlineFriends = onlineFriends + 1
- end
- newFriend.Parent = coreUI.Friends.Holder
- buttonModule.handleButton(newFriend.Invite, inviteFriend, {
- c.UserName,
- i
- })
- end
- end
- end
- if (onlineFriends > lastFriendCount or onlineFriends < lastFriendCount) and onlineFriends >= 1 then
- spawn(function()
- coreUI.Buttons.Group:TweenSizeAndPosition(UDim2.new(0.06, 0, 0.6, 0), UDim2.new(0.955, 0, 0.1, 0), "Out", "Quart", 0.225, true)
- wait(0.225)
- coreUI.Buttons.Group:TweenSizeAndPosition(UDim2.new(0.06, 0, 0.6, 0), UDim2.new(0.955, 0, 0.25, 0), "Out", "Quart", 0.225, true)
- wait(0.225)
- coreUI.Buttons.Group:TweenSizeAndPosition(UDim2.new(0.06, 0, 0.6, 0), UDim2.new(0.955, 0, 0.1, 0), "Out", "Quart", 0.225, true)
- wait(0.225)
- coreUI.Buttons.Group:TweenSizeAndPosition(UDim2.new(0.06, 0, 0.6, 0), UDim2.new(0.955, 0, 0.25, 0), "Out", "Quart", 0.225, true)
- end)
- end
- lastFriendCount = onlineFriends
- getLeaderboards()
- updateStorePrices()
- end
- coreUI.Buttons.Group.Count.Text = onlineFriends
- end)
- local recentInvites = 0
- coreUI.Friends.Type.Box.FocusLost:connect(function(PressedEnter)
- if PressedEnter and string.len(coreUI.Friends.Type.Box.Text) > 0 and recentInvites <= 2 then
- if game.Players:FindFirstChild(coreUI.Friends.Type.Box.Text) then
- if coreUI.Friends.Type.Box.Text ~= Player.Name then
- remoteEvents.Request_Invite:FireServer(game.Players[coreUI.Friends.Type.Box.Text])
- else
- _G.notify("Cannot invite self", Color3.new(1, 1, 1))
- end
- else
- _G.notify("Player not in server", Color3.new(1, 1, 1))
- end
- recentInvites = recentInvites + 1
- coreUI.Friends.Type.Box.Text = "Enter Username"
- coreUI.Friends.Type.Box:ReleaseFocus()
- _G.chatOpen = false
- else
- coreUI.Friends.Type.Box.Text = "Enter Username"
- coreUI.Friends.Type.Box:ReleaseFocus()
- _G.chatOpen = false
- end
- wait(1)
- recentInvites = recentInvites - 1
- end)
- local lastChange = tick()
- local function changeInvite()
- if tick() - lastChange >= 0.25 then
- lastChange = tick()
- remoteEvents.Change_Invite:FireServer()
- end
- end
- local inviteOptions = {
- "Allowing All Invites",
- "Allowing Friend Invites",
- "Allowing NO Invites"
- }
- playerData.Invite_Option.Changed:connect(function()
- coreUI.Lobby.Bottom.AcceptInvites.Text = inviteOptions[playerData.Invite_Option.Value + 1]
- end)
- coreUI.Lobby.Bottom.AcceptInvites.Text = inviteOptions[playerData.Invite_Option.Value + 1]
- swapPage(1)
- updateStorePrices()
- local currentTime = os.time()
- local lastUpdateStarterPack = playerData.Exclusive.Value
- if currentTime - lastUpdateStarterPack < 172800 and not playerData.Exclusive_Purchased.Value then
- coreUI.Lobby.Buttons.Exclusive.Visible = true
- toggleExclusive(true, true)
- else
- coreUI.Lobby.Buttons.Exclusive.Visible = false
- end
- playerData.Exclusive_Purchased.Changed:connect(function()
- if playerData.Exclusive_Purchased.Value then
- script.Chest_Open:Play()
- end
- end)
- local lastCredits = playerData.Credits.Value
- playerData.Credits.Changed:connect(function()
- if playerData.Credits.Value > lastCredits then
- coreUI.Buttons.Cash:TweenSizeAndPosition(UDim2.new(0.105, 0, 0.65, 0), UDim2.new(0.87, 0, 0.2, 0), "Out", "Quart", 0.175, true)
- wait(0.175)
- coreUI.Buttons.Cash:TweenSizeAndPosition(UDim2.new(0.1, 0, 0.6, 0), UDim2.new(0.87, 0, 0.25, 0), "Out", "Quart", 0.175, true)
- wait(0.175)
- coreUI.Buttons.Cash:TweenSizeAndPosition(UDim2.new(0.105, 0, 0.65, 0), UDim2.new(0.87, 0, 0.2, 0), "Out", "Quart", 0.175, true)
- wait(0.175)
- coreUI.Buttons.Cash:TweenSizeAndPosition(UDim2.new(0.1, 0, 0.6, 0), UDim2.new(0.87, 0, 0.25, 0), "Out", "Quart", 0.175, true)
- end
- lastCredits = playerData.Credits.Value
- end)
- buttonModule.handleButton(coreUI.Lobby.Bottom.AcceptInvites, changeInvite)
- buttonModule.handleButton(coreUI.Edit.Base.Base.Cash, shopToStore, {true})
- buttonModule.handleButton(coreUI.Edit.Base.Base.Purchase, doEditPurchase)
- buttonModule.handleButton(coreUI.Locker.Base.Base.Edit, toggleEdit, {true})
- buttonModule.handleButton(coreUI.Edit.Base.Top.Back, toggleEdit, {false})
- buttonModule.handleButton(coreUI.Edit.Base.Base.Color, swapToEquip, {"Hair Color", "Hair Color"})
- buttonModule.handleButton(coreUI.Edit.Base.Base.Hair, swapToEquip, {"Hair", "Hair"})
- buttonModule.handleButton(coreUI.Edit.Base.Base.Skin, swapToEquip, {"Skin Color", "Skin Color"})
- buttonModule.handleButton(coreUI.Lobby.Bottom.News, changePageNumber, {3, 11})
- buttonModule.handleButton(coreUI.Lobby.Bottom.Keybinds, changePageNumber, {3, 12})
- buttonModule.handleButton(coreUI.Lobby.Buttons.Exclusive, toggleExclusive)
- buttonModule.handleButton(coreUI.Exclusive.Base.Top.Close, toggleExclusive, {true, false})
- buttonModule.handleButton(coreUI.Exclusive.Base.Shop.Base.Buy, purchaseExclusive)
- buttonModule.handleButton(coreUI.Reward.Base.Top.Close, toggleReward, {false})
- buttonModule.handleButton(coreUI.ItemShop.Base.Shop.Base.Cash, shopToStore, {true})
- buttonModule.handleButton(coreUI.ItemShop.Base.Shop.Base.Passes, shopToStore, {false})
- buttonModule.handleButton(coreUI.ItemShop.Base.Shop.Base.Twitter, changePageNumber, {3, 7})
- buttonModule.handleButton(coreUI.Store.Base.Top.Bucks, swapStorePage, {true})
- buttonModule.handleButton(coreUI.Store.Base.Top.Passes, swapStorePage, {false})
- buttonModule.handleButton(coreUI.Locker.Base.Base.Cash, shopToStore, {true})
- buttonModule.handleButton(coreUI.Locker.Base.Base.Passes, shopToStore, {false})
- buttonModule.handleButton(coreUI.Locker.Base.Base.Twitter, changePageNumber, {3, 7})
- buttonModule.handleButton(coreUI.Codes.Base.Holder.Redeem, redeemCode)
- buttonModule.handleButton(startMatching, doMatching)
- buttonModule.handleButton(toggleFill, doFillToggle)
- buttonModule.handleButton(toggleType, doTypeToggle)
- buttonModule.handleButton(coreUI.Invites.Invite_1, openInvite)
- buttonModule.handleButton(coreUI.Invites.Invite_2, openInvite)
- buttonModule.handleButton(coreUI.Invites.Invite_3, openInvite)
- buttonModule.handleButton(coreUI.Invite.Accept, acceptInvite)
- buttonModule.handleButton(coreUI.Invite.Decline, declineInvite)
- buttonModule.handleButton(coreUI.Lobby.Buttons.LeaveGroup, leaveGroup)
- buttonModule.handleButton(coreUI.Buttons.Lobby, changePageNumber, {3, 1})
- buttonModule.handleButton(coreUI.Buttons.Locker, changePageNumber, {3, 2})
- buttonModule.handleButton(coreUI.Buttons.ItemShop, changePageNumber, {3, 3})
- buttonModule.handleButton(coreUI.Buttons.Stats, changePageNumber, {3, 4})
- buttonModule.handleButton(coreUI.Buttons.Leaderboard, changePageNumber, {3, 5})
- buttonModule.handleButton(coreUI.Buttons.Store, changePageNumber, {3, 6})
- buttonModule.handleButton(coreUI.Buttons.Codes, changePageNumber, {3, 7})
- buttonModule.handleButton(coreUI.Inventory.Base.Top.Back, goBackPossibles)
- buttonModule.handleButton(coreUI.Possibles.Base.Top.Back, changePageNumber, {3, 3})
- buttonModule.handleButton(coreUI.Buttons.Cash, shopToStore, {true})
- buttonModule.handleButton(coreUI.Buttons.Group, openInvite)
- buttonModule.handleButton(coreUI.Leaderboard.Base.Top.Solo, updateLeaderboard, {1})
- buttonModule.handleButton(coreUI.Leaderboard.Base.Top.Duo, updateLeaderboard, {2})
- buttonModule.handleButton(coreUI.Leaderboard.Base.Top.Squad, updateLeaderboard, {3})
- for i, c in pairs(coreUI.Store.Base.Page.Page:GetChildren()) do
- if c.ClassName == "ImageButton" then
- buttonModule.handleButton(c, buyItem, {
- 1,
- c:WaitForChild("ID").Value
- })
- end
- end
- for i, c in pairs(coreUI.Store.Base.Page2:GetChildren()) do
- if c.ClassName == "ImageButton" then
- buttonModule.handleButton(c, buyItem, {
- 2,
- c:WaitForChild("ID").Value
- })
- end
- end
- for i, c in pairs(coreUI.ItemShop.Base.Shop.Base:GetChildren()) do
- if c.ClassName == "ImageButton" then
- if string.find(c.Name, "Chest") then
- buttonModule.handleButton(c, buyChestShop, {
- c.Name
- })
- buttonModule.handleButton(c.Info, swapToPossibles, {
- c.Name
- })
- else
- buttonModule.handleButton(c, buyItemShop, {
- c:WaitForChild("ItemName").Value,
- c:WaitForChild("Category").Value
- })
- end
- end
- end
- for i, c in pairs(coreUI.Locker.Base.Base:GetChildren()) do
- if c.Name == "Glider" or c.Name == "Clothing" or c.Name == "Hat" or c.Name == "Tool" or c.Name == "Face" or c.Name == "Win Effect" or c.Name == "Death Effect" or c.Name == "Dive Trail" or c.Name == "Bullet Trail" or c.Name == "Emote" then
- local useName = c.Name
- if c.Name == "Win Effect" or c.Name == "Death Effect" then
- useName = "Effect"
- elseif c.Name == "Dive Trail" or c.Name == "Bullet Trail" then
- useName = "Trail"
- end
- buttonModule.handleButton(c, swapToEquip, {
- useName,
- c.Name
- })
- end
- end
- coreUI.Loading:TweenSizeAndPosition(UDim2.new(1, 0, 0, 0), UDim2.new(0.5, 0, 0.5, 0), "Out", "Quart", 0.25, true)
- wait(0.25)
- coreUI.Loading.Visible = false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement