New test cores
This commit is contained in:
parent
10badbdcbf
commit
0cd83ccac7
|
|
@ -39,7 +39,6 @@ pcall(function()
|
||||||
waitForProperty(game,"PlaceId")
|
waitForProperty(game,"PlaceId")
|
||||||
if game.PlaceId == deepakTestingPlace then
|
if game.PlaceId == deepakTestingPlace then
|
||||||
scriptContext:AddCoreScript(52177626,screenGui,"RBXStatusBuffsGUIScript")
|
scriptContext:AddCoreScript(52177626,screenGui,"RBXStatusBuffsGUIScript")
|
||||||
scriptContext:AddCoreScript(52177590,screenGui,"HealthScript v4.0")
|
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ local hereText
|
||||||
|
|
||||||
-- user facing images
|
-- user facing images
|
||||||
local assetUrls = {}
|
local assetUrls = {}
|
||||||
local assetUrl = "http://www.roblox.com/Asset/?id="
|
local assetUrl = "http://www.morblox.us/Asset/?id="
|
||||||
local errorImageUrl = assetUrl .. "42557901" table.insert(assetUrls, errorImageUrl)
|
local errorImageUrl = assetUrl .. "42557901" table.insert(assetUrls, errorImageUrl)
|
||||||
local buyImageUrl = assetUrl .. "104651457" table.insert(assetUrls,buyImageUrl)
|
local buyImageUrl = assetUrl .. "104651457" table.insert(assetUrls,buyImageUrl)
|
||||||
local buyImageDownUrl = assetUrl .. "104651515" table.insert(assetUrls, buyImageDownUrl)
|
local buyImageDownUrl = assetUrl .. "104651515" table.insert(assetUrls, buyImageDownUrl)
|
||||||
|
|
@ -661,9 +661,9 @@ function startSpinner()
|
||||||
|
|
||||||
while pos < 8 do
|
while pos < 8 do
|
||||||
if pos == spinPos or pos == ((spinPos+1)%8) then
|
if pos == spinPos or pos == ((spinPos+1)%8) then
|
||||||
spinnerIcons[pos+1].Image = "http://www.roblox.com/Asset?id=45880668"
|
spinnerIcons[pos+1].Image = "http://www.morblox.us/Asset?id=45880668"
|
||||||
else
|
else
|
||||||
spinnerIcons[pos+1].Image = "http://www.roblox.com/Asset?id=45880710"
|
spinnerIcons[pos+1].Image = "http://www.morblox.us/Asset?id=45880710"
|
||||||
end
|
end
|
||||||
|
|
||||||
pos = pos + 1
|
pos = pos + 1
|
||||||
|
|
@ -716,7 +716,7 @@ function createSpinner(size,position,parent)
|
||||||
spinnerImage.Position = UDim2.new(.5+.3*math.cos(math.rad(45*spinnerNum)), -8, .5+.3*math.sin(math.rad(45*spinnerNum)), -8)
|
spinnerImage.Position = UDim2.new(.5+.3*math.cos(math.rad(45*spinnerNum)), -8, .5+.3*math.sin(math.rad(45*spinnerNum)), -8)
|
||||||
spinnerImage.BackgroundTransparency = 1
|
spinnerImage.BackgroundTransparency = 1
|
||||||
spinnerImage.ZIndex = 10
|
spinnerImage.ZIndex = 10
|
||||||
spinnerImage.Image = "http://www.roblox.com/Asset/?id=45880710"
|
spinnerImage.Image = "http://www.morblox.us/Asset/?id=45880710"
|
||||||
spinnerImage.Parent = spinnerFrame
|
spinnerImage.Parent = spinnerFrame
|
||||||
|
|
||||||
spinnerIcons[spinnerNum] = spinnerImage
|
spinnerIcons[spinnerNum] = spinnerImage
|
||||||
|
|
|
||||||
4685
public/asset/11
4685
public/asset/11
File diff suppressed because it is too large
Load Diff
188
public/asset/12
188
public/asset/12
|
|
@ -18,6 +18,19 @@ local function waitForProperty(instance, property)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function IsTouchDevice()
|
||||||
|
local touchEnabled = false
|
||||||
|
pcall(function() touchEnabled = Game:GetService('UserInputService').TouchEnabled end)
|
||||||
|
return touchEnabled
|
||||||
|
end
|
||||||
|
|
||||||
|
local function IsPhone()
|
||||||
|
if gui.AbsoluteSize.Y <= 320 then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
waitForChild(game,"Players")
|
waitForChild(game,"Players")
|
||||||
waitForProperty(game.Players,"LocalPlayer")
|
waitForProperty(game.Players,"LocalPlayer")
|
||||||
local player = game.Players.LocalPlayer
|
local player = game.Players.LocalPlayer
|
||||||
|
|
@ -25,12 +38,29 @@ local player = game.Players.LocalPlayer
|
||||||
-- First up is the current loadout
|
-- First up is the current loadout
|
||||||
local CurrentLoadout = Instance.new("Frame")
|
local CurrentLoadout = Instance.new("Frame")
|
||||||
CurrentLoadout.Name = "CurrentLoadout"
|
CurrentLoadout.Name = "CurrentLoadout"
|
||||||
CurrentLoadout.Position = UDim2.new(0.5, -240, 1, -85)
|
CurrentLoadout.Position = UDim2.new(0.5, -300, 1, -85)
|
||||||
CurrentLoadout.Size = UDim2.new(0, 480, 0, 48)
|
CurrentLoadout.Size = UDim2.new(0, 600, 0, 54)
|
||||||
CurrentLoadout.BackgroundTransparency = 1
|
CurrentLoadout.BackgroundTransparency = 1
|
||||||
CurrentLoadout.RobloxLocked = true
|
CurrentLoadout.RobloxLocked = true
|
||||||
CurrentLoadout.Parent = gui
|
CurrentLoadout.Parent = gui
|
||||||
|
|
||||||
|
local CLBackground = Instance.new('ImageLabel')
|
||||||
|
CLBackground.Name = 'Background';
|
||||||
|
CLBackground.Size = UDim2.new(1.2, 0, 1.2, 0);
|
||||||
|
CLBackground.Image = "rbxasset://Textures/IPadInGameGUIToolbar.png"
|
||||||
|
CLBackground.BackgroundTransparency = 1.0;
|
||||||
|
CLBackground.Position = UDim2.new(-0.1, 0, -0.1, 0);
|
||||||
|
CLBackground.ZIndex = 0.0;
|
||||||
|
CLBackground.Parent = CurrentLoadout
|
||||||
|
CLBackground.Visible = false
|
||||||
|
|
||||||
|
local BackgroundUp = Instance.new('ImageLabel')
|
||||||
|
BackgroundUp.Size = UDim2.new(1, 0, 0.025, 1)
|
||||||
|
BackgroundUp.Position = UDim2.new(0, 0, 0, 0)
|
||||||
|
BackgroundUp.Image = 'rbxasset://Textures/IPadInGameGUIToolbarTop03.png'
|
||||||
|
BackgroundUp.BackgroundTransparency = 1.0
|
||||||
|
BackgroundUp.Parent = CLBackground
|
||||||
|
|
||||||
local Debounce = Instance.new("BoolValue")
|
local Debounce = Instance.new("BoolValue")
|
||||||
Debounce.Name = "Debounce"
|
Debounce.Name = "Debounce"
|
||||||
Debounce.RobloxLocked = true
|
Debounce.RobloxLocked = true
|
||||||
|
|
@ -41,36 +71,73 @@ BackpackButton.RobloxLocked = true
|
||||||
BackpackButton.Visible = false
|
BackpackButton.Visible = false
|
||||||
BackpackButton.Name = "BackpackButton"
|
BackpackButton.Name = "BackpackButton"
|
||||||
BackpackButton.BackgroundTransparency = 1
|
BackpackButton.BackgroundTransparency = 1
|
||||||
BackpackButton.Image = "rbxasset://textures/ui/backpackButton.png"
|
BackpackButton.Image = "rbxasset://Textures/IPadInGameGUIToolbarBkpkTabTopV3.png"
|
||||||
BackpackButton.Position = UDim2.new(0.5, -195, 1, -30)
|
BackpackButton.Position = UDim2.new(0.5, -60, 1, -108)
|
||||||
BackpackButton.Size = UDim2.new(0,107,0,26)
|
BackpackButton.Size = UDim2.new(0, 120, 0, 18)
|
||||||
waitForChild(gui,"ControlFrame")
|
waitForChild(gui,"ControlFrame")
|
||||||
BackpackButton.Parent = gui.ControlFrame
|
BackpackButton.Parent = gui.ControlFrame
|
||||||
|
|
||||||
for i = 0, 9 do
|
local NumSlots = 9
|
||||||
|
|
||||||
|
if IsPhone() then
|
||||||
|
NumSlots = 3
|
||||||
|
CurrentLoadout.Size = UDim2.new(0, 180, 0, 54)
|
||||||
|
CurrentLoadout.Position = UDim2.new(0.5, -90, 1, -85)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
for i = 0, NumSlots do
|
||||||
local slotFrame = Instance.new("Frame")
|
local slotFrame = Instance.new("Frame")
|
||||||
slotFrame.RobloxLocked = true
|
slotFrame.RobloxLocked = true
|
||||||
slotFrame.BackgroundColor3 = Color3.new(0,0,0)
|
slotFrame.BackgroundColor3 = Color3.new(0,0,0)
|
||||||
slotFrame.BackgroundTransparency = 1
|
slotFrame.BackgroundTransparency = 1
|
||||||
slotFrame.BorderColor3 = Color3.new(1,1,1)
|
slotFrame.BorderColor3 = Color3.new(1, 1, 1)
|
||||||
slotFrame.Name = "Slot" .. tostring(i)
|
slotFrame.Name = "Slot" .. tostring(i)
|
||||||
|
slotFrame.ZIndex = 4.0
|
||||||
if i == 0 then
|
if i == 0 then
|
||||||
slotFrame.Position = UDim2.new(0.9,0,0,0)
|
slotFrame.Position = UDim2.new(0.9, 0, 0, 0)
|
||||||
else
|
else
|
||||||
slotFrame.Position = UDim2.new((i - 1) * 0.1,0,0,0)
|
slotFrame.Position = UDim2.new((i - 1) * 0.1, (i-1)* 6,0,0)
|
||||||
end
|
end
|
||||||
slotFrame.Size = UDim2.new(0.1,0,1,0)
|
|
||||||
slotFrame.Parent = CurrentLoadout
|
|
||||||
|
slotFrame.Size = UDim2.new(0, 54, 1, 0)
|
||||||
|
slotFrame.Parent = CurrentLoadout
|
||||||
|
|
||||||
|
if gui.AbsoluteSize.Y <= 320 then
|
||||||
|
slotFrame.Position = UDim2.new(0, (i-1)* 60, 0, -50)
|
||||||
|
print('Well got here', slotFrame, slotFrame.Position.X.Scale, slotFrame.Position.X.Offset)
|
||||||
|
end
|
||||||
|
if gui.AbsoluteSize.Y <= 320 and i == 0 then
|
||||||
|
slotFrame:Destroy()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local TempSlot = Instance.new("ImageButton")
|
local TempSlot = Instance.new("ImageButton")
|
||||||
TempSlot.Name = "TempSlot"
|
TempSlot.Name = "TempSlot"
|
||||||
TempSlot.Active = true
|
TempSlot.Active = true
|
||||||
TempSlot.Size = UDim2.new(1,0,1,0)
|
TempSlot.Size = UDim2.new(1,0,1,0)
|
||||||
TempSlot.Style = Enum.ButtonStyle.RobloxButton
|
TempSlot.BackgroundTransparency = 1.0
|
||||||
|
TempSlot.Style = 'Custom'
|
||||||
TempSlot.Visible = false
|
TempSlot.Visible = false
|
||||||
TempSlot.RobloxLocked = true
|
TempSlot.RobloxLocked = true
|
||||||
TempSlot.Parent = CurrentLoadout
|
TempSlot.Parent = CurrentLoadout
|
||||||
|
TempSlot.ZIndex = 4.0
|
||||||
|
|
||||||
|
local slotBackground = Instance.new('ImageLabel')
|
||||||
|
slotBackground.Name = 'Background'
|
||||||
|
slotBackground.BackgroundTransparency = 1.0
|
||||||
|
slotBackground.Image = 'rbxasset://Textures/IPadInGameGUITool.png'
|
||||||
|
slotBackground.Size = UDim2.new(1, 0, 1, 0)
|
||||||
|
slotBackground.Parent = TempSlot
|
||||||
|
|
||||||
|
local HighLight = Instance.new('ImageLabel')
|
||||||
|
HighLight.Name = 'Highlight'
|
||||||
|
HighLight.BackgroundTransparency = 1.0
|
||||||
|
HighLight.Image = 'http://www.morblox.us/asset/?id=97643886'
|
||||||
|
HighLight.Size = UDim2.new(1, 0, 1, 0)
|
||||||
|
--HighLight.Parent = TempSlot
|
||||||
|
HighLight.Visible = false
|
||||||
|
|
||||||
-- TempSlot Children
|
-- TempSlot Children
|
||||||
local GearReference = Instance.new("ObjectValue")
|
local GearReference = Instance.new("ObjectValue")
|
||||||
|
|
@ -78,6 +145,7 @@ TempSlot.Parent = CurrentLoadout
|
||||||
GearReference.RobloxLocked = true
|
GearReference.RobloxLocked = true
|
||||||
GearReference.Parent = TempSlot
|
GearReference.Parent = TempSlot
|
||||||
|
|
||||||
|
|
||||||
local ToolTipLabel = Instance.new("TextLabel")
|
local ToolTipLabel = Instance.new("TextLabel")
|
||||||
ToolTipLabel.Name = "ToolTipLabel"
|
ToolTipLabel.Name = "ToolTipLabel"
|
||||||
ToolTipLabel.RobloxLocked = true
|
ToolTipLabel.RobloxLocked = true
|
||||||
|
|
@ -94,6 +162,7 @@ TempSlot.Parent = CurrentLoadout
|
||||||
ToolTipLabel.Size = UDim2.new(1,60,0,20)
|
ToolTipLabel.Size = UDim2.new(1,60,0,20)
|
||||||
ToolTipLabel.Position = UDim2.new(0,-30,0,-30)
|
ToolTipLabel.Position = UDim2.new(0,-30,0,-30)
|
||||||
ToolTipLabel.Parent = TempSlot
|
ToolTipLabel.Parent = TempSlot
|
||||||
|
|
||||||
|
|
||||||
local Kill = Instance.new("BoolValue")
|
local Kill = Instance.new("BoolValue")
|
||||||
Kill.Name = "Kill"
|
Kill.Name = "Kill"
|
||||||
|
|
@ -103,9 +172,9 @@ TempSlot.Parent = CurrentLoadout
|
||||||
local GearImage = Instance.new("ImageLabel")
|
local GearImage = Instance.new("ImageLabel")
|
||||||
GearImage.Name = "GearImage"
|
GearImage.Name = "GearImage"
|
||||||
GearImage.BackgroundTransparency = 1
|
GearImage.BackgroundTransparency = 1
|
||||||
GearImage.Position = UDim2.new(0,-7,0,-7)
|
GearImage.Position = UDim2.new(0, 0, 0, 0)
|
||||||
GearImage.Size = UDim2.new(1,14,1,14)
|
GearImage.Size = UDim2.new(1, 0, 1, 0)
|
||||||
GearImage.ZIndex = 2
|
GearImage.ZIndex = 5.0
|
||||||
GearImage.RobloxLocked = true
|
GearImage.RobloxLocked = true
|
||||||
GearImage.Parent = TempSlot
|
GearImage.Parent = TempSlot
|
||||||
|
|
||||||
|
|
@ -115,26 +184,30 @@ TempSlot.Parent = CurrentLoadout
|
||||||
SlotNumber.BorderSizePixel = 0
|
SlotNumber.BorderSizePixel = 0
|
||||||
SlotNumber.Font = Enum.Font.ArialBold
|
SlotNumber.Font = Enum.Font.ArialBold
|
||||||
SlotNumber.FontSize = Enum.FontSize.Size18
|
SlotNumber.FontSize = Enum.FontSize.Size18
|
||||||
SlotNumber.Position = UDim2.new(0,-7,0,-7)
|
SlotNumber.Position = UDim2.new(0, 0, 0, 0)
|
||||||
SlotNumber.Size = UDim2.new(0,10,0,15)
|
SlotNumber.Size = UDim2.new(0,10,0,15)
|
||||||
SlotNumber.TextColor3 = Color3.new(1,1,1)
|
SlotNumber.TextColor3 = Color3.new(1,1,1)
|
||||||
SlotNumber.TextTransparency = 0
|
SlotNumber.TextTransparency = 0
|
||||||
SlotNumber.TextXAlignment = Enum.TextXAlignment.Left
|
SlotNumber.TextXAlignment = Enum.TextXAlignment.Left
|
||||||
SlotNumber.TextYAlignment = Enum.TextYAlignment.Bottom
|
SlotNumber.TextYAlignment = Enum.TextYAlignment.Bottom
|
||||||
SlotNumber.ZIndex = 4
|
|
||||||
SlotNumber.RobloxLocked = true
|
SlotNumber.RobloxLocked = true
|
||||||
SlotNumber.Parent = TempSlot
|
SlotNumber.Parent = TempSlot
|
||||||
|
SlotNumber.ZIndex = 5
|
||||||
|
|
||||||
|
if IsTouchDevice() then
|
||||||
|
SlotNumber.Visible = false
|
||||||
|
end
|
||||||
|
|
||||||
local SlotNumberDownShadow = SlotNumber:clone()
|
local SlotNumberDownShadow = SlotNumber:Clone()
|
||||||
SlotNumberDownShadow.Name = "SlotNumberDownShadow"
|
SlotNumberDownShadow.Name = "SlotNumberDownShadow"
|
||||||
SlotNumberDownShadow.TextColor3 = Color3.new(0,0,0)
|
SlotNumberDownShadow.TextColor3 = Color3.new(0,0,0)
|
||||||
SlotNumberDownShadow.ZIndex = 3
|
SlotNumberDownShadow.Position = UDim2.new(0, 1, 0, -1)
|
||||||
SlotNumberDownShadow.Position = UDim2.new(0,-6,0,-6)
|
|
||||||
SlotNumberDownShadow.Parent = TempSlot
|
SlotNumberDownShadow.Parent = TempSlot
|
||||||
|
SlotNumberDownShadow.ZIndex = 2
|
||||||
|
|
||||||
local SlotNumberUpShadow = SlotNumberDownShadow:clone()
|
local SlotNumberUpShadow = SlotNumberDownShadow:Clone()
|
||||||
SlotNumberUpShadow.Name = "SlotNumberUpShadow"
|
SlotNumberUpShadow.Name = "SlotNumberUpShadow"
|
||||||
SlotNumberUpShadow.Position = UDim2.new(0,-8,0,-8)
|
SlotNumberUpShadow.Position = UDim2.new(0, -1, 0, -1)
|
||||||
SlotNumberUpShadow.Parent = TempSlot
|
SlotNumberUpShadow.Parent = TempSlot
|
||||||
|
|
||||||
local GearText = Instance.new("TextLabel")
|
local GearText = Instance.new("TextLabel")
|
||||||
|
|
@ -143,13 +216,13 @@ TempSlot.Parent = CurrentLoadout
|
||||||
GearText.BackgroundTransparency = 1
|
GearText.BackgroundTransparency = 1
|
||||||
GearText.Font = Enum.Font.Arial
|
GearText.Font = Enum.Font.Arial
|
||||||
GearText.FontSize = Enum.FontSize.Size14
|
GearText.FontSize = Enum.FontSize.Size14
|
||||||
GearText.Position = UDim2.new(0,-8,0,-8)
|
GearText.Position = UDim2.new(0,-8,0,-8)
|
||||||
GearText.ZIndex = 2
|
|
||||||
GearText.Size = UDim2.new(1,16,1,16)
|
GearText.Size = UDim2.new(1,16,1,16)
|
||||||
GearText.Text = ""
|
GearText.Text = ""
|
||||||
GearText.TextColor3 = Color3.new(1,1,1)
|
GearText.TextColor3 = Color3.new(1,1,1)
|
||||||
GearText.TextWrap = true
|
GearText.TextWrap = true
|
||||||
GearText.Parent = TempSlot
|
GearText.Parent = TempSlot
|
||||||
|
GearText.ZIndex = 5.0
|
||||||
|
|
||||||
--- Great, now lets make the inventory!
|
--- Great, now lets make the inventory!
|
||||||
|
|
||||||
|
|
@ -157,9 +230,9 @@ local Backpack = Instance.new("Frame")
|
||||||
Backpack.RobloxLocked = true
|
Backpack.RobloxLocked = true
|
||||||
Backpack.Visible = false
|
Backpack.Visible = false
|
||||||
Backpack.Name = "Backpack"
|
Backpack.Name = "Backpack"
|
||||||
Backpack.Position = UDim2.new(0.5,0,0.5,0)
|
Backpack.Position = UDim2.new(0.5, 0, 0.5, 0)
|
||||||
Backpack.BackgroundColor3 = Color3.new(0,0,0)
|
Backpack.BackgroundColor3 = Color3.new(32/255, 32/255, 32/255)
|
||||||
Backpack.BackgroundTransparency = 0.08
|
Backpack.BackgroundTransparency = 0.0
|
||||||
Backpack.BorderSizePixel = 0
|
Backpack.BorderSizePixel = 0
|
||||||
Backpack.Parent = gui
|
Backpack.Parent = gui
|
||||||
Backpack.Active = true
|
Backpack.Active = true
|
||||||
|
|
@ -183,7 +256,8 @@ Backpack.Active = true
|
||||||
|
|
||||||
local Tabs = Instance.new("Frame")
|
local Tabs = Instance.new("Frame")
|
||||||
Tabs.Name = "Tabs"
|
Tabs.Name = "Tabs"
|
||||||
Tabs.Visible = true
|
Tabs.Visible = false
|
||||||
|
Tabs.Active = false
|
||||||
Tabs.RobloxLocked = true
|
Tabs.RobloxLocked = true
|
||||||
Tabs.BackgroundColor3 = Color3.new(0,0,0)
|
Tabs.BackgroundColor3 = Color3.new(0,0,0)
|
||||||
Tabs.BackgroundTransparency = 0.08
|
Tabs.BackgroundTransparency = 0.08
|
||||||
|
|
@ -256,8 +330,8 @@ Backpack.Active = true
|
||||||
local XImage = Instance.new("ImageLabel")
|
local XImage = Instance.new("ImageLabel")
|
||||||
XImage.RobloxLocked = true
|
XImage.RobloxLocked = true
|
||||||
XImage.Name = "XImage"
|
XImage.Name = "XImage"
|
||||||
game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=75547445")
|
game:GetService("ContentProvider"):Preload("http://www.morblox.us/asset/?id=75547445")
|
||||||
XImage.Image = "http://www.roblox.com/asset/?id=75547445" --TODO: move to rbxasset
|
XImage.Image = "http://www.morblox.us/asset/?id=75547445" --TODO: move to rbxasset
|
||||||
XImage.BackgroundTransparency = 1
|
XImage.BackgroundTransparency = 1
|
||||||
XImage.Position = UDim2.new(-.25,-1,-.25,-1)
|
XImage.Position = UDim2.new(-.25,-1,-.25,-1)
|
||||||
XImage.Size = UDim2.new(1.5,2,1.5,2)
|
XImage.Size = UDim2.new(1.5,2,1.5,2)
|
||||||
|
|
@ -343,18 +417,27 @@ Backpack.Active = true
|
||||||
local GearGrid = Instance.new("Frame")
|
local GearGrid = Instance.new("Frame")
|
||||||
GearGrid.RobloxLocked = true
|
GearGrid.RobloxLocked = true
|
||||||
GearGrid.Name = "GearGrid"
|
GearGrid.Name = "GearGrid"
|
||||||
GearGrid.Size = UDim2.new(0.69,0,1,0)
|
GearGrid.Size = UDim2.new(0.95, 0, 1, 0)
|
||||||
GearGrid.BackgroundTransparency = 1
|
GearGrid.BackgroundTransparency = 1
|
||||||
GearGrid.Parent = Gear
|
GearGrid.Parent = Gear
|
||||||
|
|
||||||
|
|
||||||
local GearButton = Instance.new("ImageButton")
|
local GearButton = Instance.new("ImageButton")
|
||||||
GearButton.RobloxLocked = true
|
GearButton.RobloxLocked = true
|
||||||
GearButton.Visible = false
|
GearButton.Visible = false
|
||||||
GearButton.Name = "GearButton"
|
GearButton.Name = "GearButton"
|
||||||
GearButton.Size = UDim2.new(0,64,0,64)
|
GearButton.Size = UDim2.new(0, 54, 0, 54)
|
||||||
GearButton.Style = Enum.ButtonStyle.RobloxButton
|
GearButton.Style = 'Custom'
|
||||||
GearButton.Parent = GearGrid
|
GearButton.Parent = GearGrid
|
||||||
|
GearButton.BackgroundTransparency = 1.0
|
||||||
|
|
||||||
|
local slotBackground = Instance.new('ImageLabel')
|
||||||
|
slotBackground.Name = 'Background'
|
||||||
|
slotBackground.BackgroundTransparency = 1.0
|
||||||
|
slotBackground.Image = 'http://www.morblox.us/asset/?id=97613075'
|
||||||
|
slotBackground.Size = UDim2.new(1, 0, 1, 0)
|
||||||
|
slotBackground.Parent = GearButton
|
||||||
|
|
||||||
|
|
||||||
-- GearButton Children
|
-- GearButton Children
|
||||||
local GearReference = Instance.new("ObjectValue")
|
local GearReference = Instance.new("ObjectValue")
|
||||||
|
|
@ -389,8 +472,8 @@ Backpack.Active = true
|
||||||
local GearGridScrollingArea = Instance.new("Frame")
|
local GearGridScrollingArea = Instance.new("Frame")
|
||||||
GearGridScrollingArea.RobloxLocked = true
|
GearGridScrollingArea.RobloxLocked = true
|
||||||
GearGridScrollingArea.Name = "GearGridScrollingArea"
|
GearGridScrollingArea.Name = "GearGridScrollingArea"
|
||||||
GearGridScrollingArea.Position = UDim2.new(0.7,0,0,35)
|
GearGridScrollingArea.Position = UDim2.new(1, -19, 0, 35)
|
||||||
GearGridScrollingArea.Size = UDim2.new(0,17,1,-45)
|
GearGridScrollingArea.Size = UDim2.new(0, 17, 1, -45)
|
||||||
GearGridScrollingArea.BackgroundTransparency = 1
|
GearGridScrollingArea.BackgroundTransparency = 1
|
||||||
GearGridScrollingArea.Parent = Gear
|
GearGridScrollingArea.Parent = Gear
|
||||||
|
|
||||||
|
|
@ -684,24 +767,24 @@ Backpack.Active = true
|
||||||
|
|
||||||
--CharacterPane Children
|
--CharacterPane Children
|
||||||
local FaceFrame = makeCharFrame("FacesFrame", CharacterPane)
|
local FaceFrame = makeCharFrame("FacesFrame", CharacterPane)
|
||||||
game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=75460621")
|
game:GetService("ContentProvider"):Preload("http://www.morblox.us/asset/?id=75460621")
|
||||||
makeZone("FaceZone","http://www.roblox.com/asset/?id=75460621",UDim2.new(0,157,0,137),UDim2.new(0.5,-78,0.5,-68),FaceFrame)
|
makeZone("FaceZone","http://www.morblox.us/asset/?id=75460621",UDim2.new(0,157,0,137),UDim2.new(0.5,-78,0.5,-68),FaceFrame)
|
||||||
makeStyledButton("Face",UDim2.new(0,64,0,64),UDim2.new(0.5,-32,0.5,-135),FaceFrame)
|
makeStyledButton("Face",UDim2.new(0,64,0,64),UDim2.new(0.5,-32,0.5,-135),FaceFrame)
|
||||||
|
|
||||||
local HeadFrame = makeCharFrame("HeadsFrame", CharacterPane)
|
local HeadFrame = makeCharFrame("HeadsFrame", CharacterPane)
|
||||||
makeZone("FaceZone","http://www.roblox.com/asset/?id=75460621",UDim2.new(0,157,0,137),UDim2.new(0.5,-78,0.5,-68),HeadFrame)
|
makeZone("FaceZone","http://www.morblox.us/asset/?id=75460621",UDim2.new(0,157,0,137),UDim2.new(0.5,-78,0.5,-68),HeadFrame)
|
||||||
makeStyledButton("Head",UDim2.new(0,64,0,64),UDim2.new(0.5,-32,0.5,-135),HeadFrame)
|
makeStyledButton("Head",UDim2.new(0,64,0,64),UDim2.new(0.5,-32,0.5,-135),HeadFrame)
|
||||||
|
|
||||||
local HatsFrame = makeCharFrame("HatsFrame", CharacterPane)
|
local HatsFrame = makeCharFrame("HatsFrame", CharacterPane)
|
||||||
game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=75457888")
|
game:GetService("ContentProvider"):Preload("http://www.morblox.us/asset/?id=75457888")
|
||||||
local HatsZone = makeZone("HatsZone","http://www.roblox.com/asset/?id=75457888",UDim2.new(0,186,0,184),UDim2.new(0.5,-93,0.5,-100), HatsFrame)
|
local HatsZone = makeZone("HatsZone","http://www.morblox.us/asset/?id=75457888",UDim2.new(0,186,0,184),UDim2.new(0.5,-93,0.5,-100), HatsFrame)
|
||||||
makeStyledButton("Hat1Button",UDim2.new(0,64,0,64),UDim2.new(0,-1,0,-1),HatsZone,Enum.ButtonStyle.RobloxButton)
|
makeStyledButton("Hat1Button",UDim2.new(0,64,0,64),UDim2.new(0,-1,0,-1),HatsZone,Enum.ButtonStyle.RobloxButton)
|
||||||
makeStyledButton("Hat2Button",UDim2.new(0,64,0,64),UDim2.new(0,63,0,-1),HatsZone,Enum.ButtonStyle.RobloxButton)
|
makeStyledButton("Hat2Button",UDim2.new(0,64,0,64),UDim2.new(0,63,0,-1),HatsZone,Enum.ButtonStyle.RobloxButton)
|
||||||
makeStyledButton("Hat3Button",UDim2.new(0,64,0,64),UDim2.new(0,127,0,-1),HatsZone,Enum.ButtonStyle.RobloxButton)
|
makeStyledButton("Hat3Button",UDim2.new(0,64,0,64),UDim2.new(0,127,0,-1),HatsZone,Enum.ButtonStyle.RobloxButton)
|
||||||
|
|
||||||
local PantsFrame = makeCharFrame("PantsFrame", CharacterPane)
|
local PantsFrame = makeCharFrame("PantsFrame", CharacterPane)
|
||||||
game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=75457920")
|
game:GetService("ContentProvider"):Preload("http://www.morblox.us/asset/?id=75457920")
|
||||||
makeZone("PantsZone","http://www.roblox.com/asset/?id=75457920",UDim2.new(0,121,0,99),UDim2.new(0.5,-60,0.5,-100),PantsFrame)
|
makeZone("PantsZone","http://www.morblox.us/asset/?id=75457920",UDim2.new(0,121,0,99),UDim2.new(0.5,-60,0.5,-100),PantsFrame)
|
||||||
|
|
||||||
local pantFrame = Instance.new("Frame")
|
local pantFrame = Instance.new("Frame")
|
||||||
pantFrame.RobloxLocked = true
|
pantFrame.RobloxLocked = true
|
||||||
|
|
@ -739,19 +822,19 @@ Backpack.Active = true
|
||||||
makeTextLabel("LeftArmLabel","Left Arm",UDim2.new(0.5,-16,0,-25),leftArmButton)
|
makeTextLabel("LeftArmLabel","Left Arm",UDim2.new(0.5,-16,0,-25),leftArmButton)
|
||||||
|
|
||||||
local TShirtFrame = makeCharFrame("T-ShirtsFrame",CharacterPane)
|
local TShirtFrame = makeCharFrame("T-ShirtsFrame",CharacterPane)
|
||||||
game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=75460642")
|
game:GetService("ContentProvider"):Preload("http://www.morblox.us/asset/?id=75460642")
|
||||||
makeZone("TShirtZone","http://www.roblox.com/asset/?id=75460642",UDim2.new(0,121,0,154),UDim2.new(0.5,-60,0.5,-100),TShirtFrame)
|
makeZone("TShirtZone","http://www.morblox.us/asset/?id=75460642",UDim2.new(0,121,0,154),UDim2.new(0.5,-60,0.5,-100),TShirtFrame)
|
||||||
makeStyledButton("TShirtButton", UDim2.new(0,64,0,64),UDim2.new(0.5,-32,0.5,-64),TShirtFrame)
|
makeStyledButton("TShirtButton", UDim2.new(0,64,0,64),UDim2.new(0.5,-32,0.5,-64),TShirtFrame)
|
||||||
|
|
||||||
|
|
||||||
local ShirtFrame = makeCharFrame("ShirtsFrame", CharacterPane)
|
local ShirtFrame = makeCharFrame("ShirtsFrame", CharacterPane)
|
||||||
makeZone("ShirtZone","http://www.roblox.com/asset/?id=75460642",UDim2.new(0,121,0,154),UDim2.new(0.5,-60,0.5,-100),ShirtFrame)
|
makeZone("ShirtZone","http://www.morblox.us/asset/?id=75460642",UDim2.new(0,121,0,154),UDim2.new(0.5,-60,0.5,-100),ShirtFrame)
|
||||||
makeStyledButton("ShirtButton", UDim2.new(0,64,0,64),UDim2.new(0.5,-32,0.5,-64),ShirtFrame)
|
makeStyledButton("ShirtButton", UDim2.new(0,64,0,64),UDim2.new(0.5,-32,0.5,-64),ShirtFrame)
|
||||||
|
|
||||||
|
|
||||||
local ColorFrame = makeCharFrame("ColorFrame", CharacterPane)
|
local ColorFrame = makeCharFrame("ColorFrame", CharacterPane)
|
||||||
game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=76049888")
|
game:GetService("ContentProvider"):Preload("http://www.morblox.us/asset/?id=76049888")
|
||||||
local ColorZone = makeZone("ColorZone","http://www.roblox.com/asset/?id=76049888", UDim2.new(0,120,0,150),UDim2.new(0.5,-60,0.5,-100),ColorFrame)
|
local ColorZone = makeZone("ColorZone","http://www.morblox.us/asset/?id=76049888", UDim2.new(0,120,0,150),UDim2.new(0.5,-60,0.5,-100),ColorFrame)
|
||||||
makeStyledButton("Head",UDim2.new(0.26,0,0.19,0),UDim2.new(0.37,0,0.02,0),ColorZone).AutoButtonColor = false
|
makeStyledButton("Head",UDim2.new(0.26,0,0.19,0),UDim2.new(0.37,0,0.02,0),ColorZone).AutoButtonColor = false
|
||||||
makeStyledButton("LeftArm",UDim2.new(0.19,0,0.36,0),UDim2.new(0.78,0,0.26,0),ColorZone).AutoButtonColor = false
|
makeStyledButton("LeftArm",UDim2.new(0.19,0,0.36,0),UDim2.new(0.78,0,0.26,0),ColorZone).AutoButtonColor = false
|
||||||
makeStyledButton("RightArm",UDim2.new(0.19,0,0.36,0),UDim2.new(0.025,0,0.26,0),ColorZone).AutoButtonColor = false
|
makeStyledButton("RightArm",UDim2.new(0.19,0,0.36,0),UDim2.new(0.025,0,0.26,0),ColorZone).AutoButtonColor = false
|
||||||
|
|
@ -788,4 +871,5 @@ Backpack.Active = true
|
||||||
SaveButton.Parent = CharacterPane
|
SaveButton.Parent = CharacterPane
|
||||||
|
|
||||||
-- no need for this to stick around
|
-- no need for this to stick around
|
||||||
script:remove()
|
|
||||||
|
script:Destroy()
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
%13%
|
%13%
|
||||||
-- This script manages context switches in the backpack (Gear to Wardrobe, etc.) and player state changes. Also manages global functions across different tabs (currently only search)
|
-- This script manages context switches in the backpack (Gear to Wardrobe, etc.) and player state changes. Also manages global functions across different tabs (currently only search)
|
||||||
print("mamanger")
|
|
||||||
if game.CoreGui.Version < 7 then return end -- peace out if we aren't using the right client
|
if game.CoreGui.Version < 7 then return end -- peace out if we aren't using the right client
|
||||||
print("made it past gui version check")
|
|
||||||
|
|
||||||
-- basic functions
|
-- basic functions
|
||||||
local function waitForChild(instance, name)
|
local function waitForChild(instance, name)
|
||||||
|
|
@ -56,6 +54,10 @@ local searchBox = waitForChild(backpack.SearchFrame.SearchBoxFrame,"SearchBox")
|
||||||
local searchButton = waitForChild(backpack.SearchFrame,"SearchButton")
|
local searchButton = waitForChild(backpack.SearchFrame,"SearchButton")
|
||||||
local resetButton = waitForChild(backpack.SearchFrame,"ResetButton")
|
local resetButton = waitForChild(backpack.SearchFrame,"ResetButton")
|
||||||
|
|
||||||
|
local robloxGui = waitForChild(Game.CoreGui, 'RobloxGui')
|
||||||
|
local currentLoadout = waitForChild(robloxGui, 'CurrentLoadout')
|
||||||
|
local loadoutBackground = waitForChild(currentLoadout, 'Background')
|
||||||
|
|
||||||
local canToggle = true
|
local canToggle = true
|
||||||
local readyForNextEvent = true
|
local readyForNextEvent = true
|
||||||
local backpackIsOpen = false
|
local backpackIsOpen = false
|
||||||
|
|
@ -63,12 +65,20 @@ local active = true
|
||||||
|
|
||||||
local humanoidDiedCon = nil
|
local humanoidDiedCon = nil
|
||||||
|
|
||||||
|
local backpackButtonPos
|
||||||
|
|
||||||
local guiTweenSpeed = 0.25 -- how quickly we open/close the backpack
|
local guiTweenSpeed = 0.25 -- how quickly we open/close the backpack
|
||||||
|
|
||||||
local searchDefaultText = "Search..."
|
local searchDefaultText = "Search..."
|
||||||
local tilde = "~"
|
local tilde = "~"
|
||||||
local backquote = "`"
|
local backquote = "`"
|
||||||
|
|
||||||
|
local backpackSize = UDim2.new(0, 600, 0, 400)
|
||||||
|
|
||||||
|
if robloxGui.AbsoluteSize.Y <= 320 then
|
||||||
|
backpackSize = UDim2.new(0, 200, 0, 140)
|
||||||
|
end
|
||||||
|
|
||||||
------------------------ End Locals ---------------------------
|
------------------------ End Locals ---------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -120,6 +130,9 @@ function activateBackpack()
|
||||||
initHumanoidDiedConnections()
|
initHumanoidDiedConnections()
|
||||||
active = true
|
active = true
|
||||||
backpack.Visible = backpackIsOpen
|
backpack.Visible = backpackIsOpen
|
||||||
|
if backpackIsOpen then
|
||||||
|
toggleBackpack()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function initHumanoidDiedConnections()
|
function initHumanoidDiedConnections()
|
||||||
|
|
@ -139,7 +152,7 @@ local hideBackpack = function()
|
||||||
backpackCloseEvent:Fire(currentTab)
|
backpackCloseEvent:Fire(currentTab)
|
||||||
backpack.Tabs.Visible = false
|
backpack.Tabs.Visible = false
|
||||||
searchFrame.Visible = false
|
searchFrame.Visible = false
|
||||||
backpack:TweenSizeAndPosition(UDim2.new(0,0,0,0),UDim2.new(0.5,0,0.5,0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, guiTweenSpeed, true,
|
backpack:TweenSizeAndPosition(UDim2.new(0, backpackSize.X.Offset,0, 0), UDim2.new(0.5, -backpackSize.X.Offset/2, 1, -85), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, guiTweenSpeed, true,
|
||||||
function()
|
function()
|
||||||
game.GuiService:RemoveCenterDialog(backpack)
|
game.GuiService:RemoveCenterDialog(backpack)
|
||||||
backpack.Visible = false
|
backpack.Visible = false
|
||||||
|
|
@ -149,6 +162,7 @@ local hideBackpack = function()
|
||||||
game.GuiService:RemoveCenterDialog(backpack)
|
game.GuiService:RemoveCenterDialog(backpack)
|
||||||
backpack.Visible = false
|
backpack.Visible = false
|
||||||
backpackButton.Selected = false
|
backpackButton.Selected = false
|
||||||
|
readyForNextEvent = true
|
||||||
canToggle = true
|
canToggle = true
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
@ -164,20 +178,22 @@ function showBackpack()
|
||||||
backpackButton.Selected = false
|
backpackButton.Selected = false
|
||||||
end)
|
end)
|
||||||
backpack.Visible = true
|
backpack.Visible = true
|
||||||
backpackButton.Selected = true
|
backpackButton.Selected = true
|
||||||
backpack:TweenSizeAndPosition(UDim2.new(0.55, 0, 0.76, 0),UDim2.new(0.225, 0, 0.09, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, guiTweenSpeed, true)
|
backpack:TweenSizeAndPosition(backpackSize, UDim2.new(0.5, -backpackSize.X.Offset/2, 1, -backpackSize.Y.Offset - 88), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, guiTweenSpeed, true)
|
||||||
delay(guiTweenSpeed,function()
|
delay(guiTweenSpeed,function()
|
||||||
backpack.Tabs.Visible = true
|
backpack.Tabs.Visible = false
|
||||||
searchFrame.Visible = true
|
searchFrame.Visible = true
|
||||||
backpackOpenEvent:Fire(currentTab)
|
backpackOpenEvent:Fire(currentTab)
|
||||||
canToggle = true
|
canToggle = true
|
||||||
|
readyForNextEvent = true
|
||||||
|
backpackButton.Image = 'rbxasset://Textures/IPadInGameGUIToolbarBkpkTabTopV4.png'
|
||||||
|
backpackButton.Position = UDim2.new(0.5, -60, 1, -backpackSize.Y.Offset - 103)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
function toggleBackpack()
|
function toggleBackpack()
|
||||||
if not game.Players.LocalPlayer then return end
|
if not game.Players.LocalPlayer then return end
|
||||||
if not game.Players.LocalPlayer["Character"] then return end
|
if not game.Players.LocalPlayer["Character"] then return end
|
||||||
|
|
||||||
if not canToggle then return end
|
if not canToggle then return end
|
||||||
if not readyForNextEvent then return end
|
if not readyForNextEvent then return end
|
||||||
readyForNextEvent = false
|
readyForNextEvent = false
|
||||||
|
|
@ -185,11 +201,42 @@ function toggleBackpack()
|
||||||
|
|
||||||
backpackIsOpen = not backpackIsOpen
|
backpackIsOpen = not backpackIsOpen
|
||||||
|
|
||||||
if backpackIsOpen then
|
if backpackIsOpen then
|
||||||
|
loadoutBackground.Image = 'rbxasset://Textures/IPadInGameGUIToolBarBkgd.png'
|
||||||
|
loadoutBackground.Position = UDim2.new(-0.03, 0, -0.17, 0)
|
||||||
|
loadoutBackground.Size = UDim2.new(1.05, 0, 1.25, 0)
|
||||||
|
loadoutBackground.ZIndex = 2.0
|
||||||
|
loadoutBackground.Visible = true
|
||||||
|
--backpackButton.Position = UDim2.new(0.5, -60, 1, -503)
|
||||||
showBackpack()
|
showBackpack()
|
||||||
else
|
else
|
||||||
backpackButton.Selected = false
|
backpackButton.Position = UDim2.new(0.5, -60, 1, -44)
|
||||||
|
loadoutBackground.Visible = false
|
||||||
|
backpackButton.Selected = false
|
||||||
|
backpackButton.Image = "rbxasset://Textures/IPadInGameGUIToolbarBkpkTabTopV3.png"
|
||||||
|
loadoutBackground.Image = 'rbxasset://Textures/IPadInGameGUIToolbar.png'
|
||||||
|
loadoutBackground.Position = UDim2.new(-0.1, 0, -0.1, 0)
|
||||||
|
loadoutBackground.Size = UDim2.new(1.2, 0, 1.2, 0)
|
||||||
hideBackpack()
|
hideBackpack()
|
||||||
|
|
||||||
|
|
||||||
|
local clChildren = currentLoadout:GetChildren()
|
||||||
|
for i = 1, #clChildren do
|
||||||
|
if clChildren[i] and clChildren[i]:IsA('Frame') then
|
||||||
|
local frame = clChildren[i]
|
||||||
|
if #frame:GetChildren() > 0 then
|
||||||
|
backpackButton.Position = UDim2.new(0.5, -60, 1, -108)
|
||||||
|
backpackButton.Visible = true
|
||||||
|
loadoutBackground.Visible = true
|
||||||
|
if frame:GetChildren()[1]:IsA('ImageButton') then
|
||||||
|
local imgButton = frame:GetChildren()[1]
|
||||||
|
imgButton.Active = true
|
||||||
|
imgButton.Draggable = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -347,6 +394,7 @@ end)
|
||||||
if game.Players.LocalPlayer["Character"] then
|
if game.Players.LocalPlayer["Character"] then
|
||||||
activateBackpack()
|
activateBackpack()
|
||||||
end
|
end
|
||||||
|
|
||||||
game.Players.LocalPlayer.CharacterAdded:connect(activateBackpack)
|
game.Players.LocalPlayer.CharacterAdded:connect(activateBackpack)
|
||||||
|
|
||||||
-- search functions
|
-- search functions
|
||||||
|
|
@ -360,4 +408,9 @@ end)
|
||||||
searchButton.MouseButton1Click:connect(doSearch)
|
searchButton.MouseButton1Click:connect(doSearch)
|
||||||
resetButton.MouseButton1Click:connect(resetSearch)
|
resetButton.MouseButton1Click:connect(resetSearch)
|
||||||
|
|
||||||
backpackButton.Visible = true
|
if searchFrame and robloxGui.AbsoluteSize.Y <= 320 then
|
||||||
|
searchFrame.RobloxLocked = false
|
||||||
|
searchFrame:Destroy()
|
||||||
|
end
|
||||||
|
|
||||||
|
--backpackButton.Visible = true
|
||||||
|
|
@ -4,6 +4,7 @@ local function waitForChild(instance, name)
|
||||||
assert(instance)
|
assert(instance)
|
||||||
assert(name)
|
assert(name)
|
||||||
while not instance:FindFirstChild(name) do
|
while not instance:FindFirstChild(name) do
|
||||||
|
print('Waiting for ...', instance, name)
|
||||||
instance.ChildAdded:wait()
|
instance.ChildAdded:wait()
|
||||||
end
|
end
|
||||||
return instance:FindFirstChild(name)
|
return instance:FindFirstChild(name)
|
||||||
|
|
@ -16,6 +17,13 @@ local function waitForProperty(instance, property)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function IsTouchDevice()
|
||||||
|
local touchEnabled = false
|
||||||
|
pcall(function() touchEnabled = Game:GetService('UserInputService').TouchEnabled end)
|
||||||
|
return touchEnabled
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
waitForChild(game,"Players")
|
waitForChild(game,"Players")
|
||||||
waitForProperty(game.Players,"LocalPlayer")
|
waitForProperty(game.Players,"LocalPlayer")
|
||||||
local player = game.Players.LocalPlayer
|
local player = game.Players.LocalPlayer
|
||||||
|
|
@ -67,7 +75,7 @@ local searchRequestedEvent = waitForChild(backpackManager,"SearchRequestedEvent"
|
||||||
local tellBackpackReadyFunc = waitForChild(backpackManager,"BackpackReady")
|
local tellBackpackReadyFunc = waitForChild(backpackManager,"BackpackReady")
|
||||||
|
|
||||||
-- creating scroll bar early as to make sure items get placed correctly
|
-- creating scroll bar early as to make sure items get placed correctly
|
||||||
local scrollFrame, scrollUp, scrollDown, recalculateScroll = RbxGui.CreateScrollingFrame(nil,"grid")
|
local scrollFrame, scrollUp, scrollDown, recalculateScroll = RbxGui.CreateScrollingFrame(nil, "grid", Vector2.new(6, 6))
|
||||||
|
|
||||||
scrollFrame.Position = UDim2.new(0,0,0,30)
|
scrollFrame.Position = UDim2.new(0,0,0,30)
|
||||||
scrollFrame.Size = UDim2.new(1,0,1,-30)
|
scrollFrame.Size = UDim2.new(1,0,1,-30)
|
||||||
|
|
@ -236,6 +244,7 @@ end
|
||||||
|
|
||||||
function previewGear(button)
|
function previewGear(button)
|
||||||
if not browsingMenu then
|
if not browsingMenu then
|
||||||
|
gearPreview.Visible = false
|
||||||
gearPreview.GearImage.Image = button.Image
|
gearPreview.GearImage.Image = button.Image
|
||||||
gearPreview.GearStats.GearName.Text = button.GearReference.Value.Name
|
gearPreview.GearStats.GearName.Text = button.GearReference.Value.Name
|
||||||
end
|
end
|
||||||
|
|
@ -276,7 +285,7 @@ end
|
||||||
function resizeGrid()
|
function resizeGrid()
|
||||||
for k,v in pairs(backpackItems) do
|
for k,v in pairs(backpackItems) do
|
||||||
if not v:FindFirstChild("RobloxBuildTool") then
|
if not v:FindFirstChild("RobloxBuildTool") then
|
||||||
if not buttons[v] then
|
if not buttons[v] then
|
||||||
local buttonClone = gearButton:clone()
|
local buttonClone = gearButton:clone()
|
||||||
buttonClone.Parent = grid.ScrollingFrame
|
buttonClone.Parent = grid.ScrollingFrame
|
||||||
buttonClone.Visible = true
|
buttonClone.Visible = true
|
||||||
|
|
@ -289,18 +298,26 @@ function resizeGrid()
|
||||||
buttonClone.Draggable = true
|
buttonClone.Draggable = true
|
||||||
buttons[v] = buttonClone
|
buttons[v] = buttonClone
|
||||||
|
|
||||||
local unequipMenu = getGearContextMenu()
|
|
||||||
|
if not IsTouchDevice() then
|
||||||
|
local unequipMenu = getGearContextMenu()
|
||||||
|
|
||||||
|
|
||||||
unequipMenu.Visible = false
|
unequipMenu.Visible = false
|
||||||
unequipMenu.Parent = buttonClone
|
unequipMenu.Parent = buttonClone
|
||||||
|
end
|
||||||
|
|
||||||
local beginPos = nil
|
local beginPos = nil
|
||||||
buttonClone.DragBegin:connect(function(value)
|
buttonClone.DragBegin:connect(function(value)
|
||||||
buttonClone.ZIndex = 9
|
waitForChild(buttonClone, 'Background')
|
||||||
|
buttonClone['Background'].ZIndex = 10
|
||||||
|
buttonClone.ZIndex = 10
|
||||||
beginPos = value
|
beginPos = value
|
||||||
end)
|
end)
|
||||||
buttonClone.DragStopped:connect(function(x,y)
|
buttonClone.DragStopped:connect(function(x,y)
|
||||||
buttonClone.ZIndex = 1
|
waitForChild(buttonClone, 'Background')
|
||||||
|
buttonClone['Background'].ZIndex = 1.0
|
||||||
|
buttonClone.ZIndex = 2
|
||||||
if beginPos ~= buttonClone.Position then
|
if beginPos ~= buttonClone.Position then
|
||||||
if not checkForSwap(buttonClone,x,y) then
|
if not checkForSwap(buttonClone,x,y) then
|
||||||
buttonClone:TweenPosition(beginPos,Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.5, true)
|
buttonClone:TweenPosition(beginPos,Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.5, true)
|
||||||
|
|
@ -622,7 +639,7 @@ function nukeBackpack()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function getGearContextMenu()
|
function getGearContextMenu()
|
||||||
local gearContextMenu = Instance.new("Frame")
|
local gearContextMenu = Instance.new("Frame")
|
||||||
gearContextMenu.Active = true
|
gearContextMenu.Active = true
|
||||||
gearContextMenu.Name = "UnequipContextMenu"
|
gearContextMenu.Name = "UnequipContextMenu"
|
||||||
|
|
@ -671,27 +688,30 @@ function getGearContextMenu()
|
||||||
button.ZIndex = 9
|
button.ZIndex = 9
|
||||||
button.Parent = gearContextMenuButton
|
button.Parent = gearContextMenuButton
|
||||||
|
|
||||||
button.MouseButton1Click:connect(function()
|
if not IsTouchDevice() then
|
||||||
if button.Active and not gearContextMenu.Parent.Active then
|
|
||||||
local success, result = pcall(function() element.DoIt(element, gearContextMenu) end)
|
button.MouseButton1Click:connect(function()
|
||||||
browsingMenu = false
|
if button.Active and not gearContextMenu.Parent.Active then
|
||||||
gearContextMenu.Visible = false
|
local success, result = pcall(function() element.DoIt(element, gearContextMenu) end)
|
||||||
clearHighlight(button)
|
browsingMenu = false
|
||||||
clearPreview()
|
gearContextMenu.Visible = false
|
||||||
end
|
clearHighlight(button)
|
||||||
end)
|
clearPreview()
|
||||||
|
end
|
||||||
button.MouseEnter:connect(function()
|
end)
|
||||||
if button.Active and gearContextMenu.Parent.Active then
|
|
||||||
highlight(button)
|
button.MouseEnter:connect(function()
|
||||||
end
|
if button.Active and gearContextMenu.Parent.Active then
|
||||||
end)
|
highlight(button)
|
||||||
button.MouseLeave:connect(function()
|
end
|
||||||
if button.Active and gearContextMenu.Parent.Active then
|
end)
|
||||||
clearHighlight(button)
|
button.MouseLeave:connect(function()
|
||||||
end
|
if button.Active and gearContextMenu.Parent.Active then
|
||||||
end)
|
clearHighlight(button)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
contextElement.Button = button
|
contextElement.Button = button
|
||||||
contextElement.Element = button
|
contextElement.Element = button
|
||||||
elseif element.Type == "Label" then
|
elseif element.Type == "Label" then
|
||||||
|
|
|
||||||
225
public/asset/15
225
public/asset/15
|
|
@ -19,16 +19,47 @@ local StaticTabName = "gear"
|
||||||
|
|
||||||
local robloxGui = game:GetService("CoreGui"):FindFirstChild("RobloxGui")
|
local robloxGui = game:GetService("CoreGui"):FindFirstChild("RobloxGui")
|
||||||
assert(robloxGui)
|
assert(robloxGui)
|
||||||
|
local controlFrame = waitForChild(robloxGui, 'ControlFrame')
|
||||||
|
local backpackButton = waitForChild(controlFrame, 'BackpackButton')
|
||||||
|
local backpack = waitForChild(robloxGui, 'Backpack')
|
||||||
waitForChild(robloxGui,"CurrentLoadout")
|
waitForChild(robloxGui,"CurrentLoadout")
|
||||||
waitForChild(robloxGui.CurrentLoadout,"TempSlot")
|
waitForChild(robloxGui.CurrentLoadout,"TempSlot")
|
||||||
waitForChild(robloxGui.CurrentLoadout.TempSlot,"SlotNumber")
|
waitForChild(robloxGui.CurrentLoadout.TempSlot,"SlotNumber")
|
||||||
|
|
||||||
|
waitForChild(currentLoadout, 'Background')
|
||||||
|
local clBackground = currentLoadout.Background
|
||||||
|
|
||||||
|
local function IsTouchDevice()
|
||||||
|
local touchEnabled = false
|
||||||
|
pcall(function() touchEnabled = Game:GetService('UserInputService').TouchEnabled end)
|
||||||
|
return touchEnabled
|
||||||
|
end
|
||||||
|
|
||||||
|
local function moveHealthBar(pGui)
|
||||||
|
waitForChild(pGui, 'HealthGUI')
|
||||||
|
waitForChild(pGui['HealthGUI'], 'tray')
|
||||||
|
local tray = pGui['HealthGUI']['tray']
|
||||||
|
tray.Position = UDim2.new(0.5, -85, 1, -26)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--- Begin Locals
|
--- Begin Locals
|
||||||
waitForChild(game,"Players")
|
waitForChild(game,"Players")
|
||||||
waitForProperty(game.Players,"LocalPlayer")
|
waitForProperty(game.Players,"LocalPlayer")
|
||||||
local player = game.Players.LocalPlayer
|
local player = game.Players.LocalPlayer
|
||||||
|
|
||||||
|
waitForChild(player, 'PlayerGui')
|
||||||
|
Spawn(function()
|
||||||
|
moveHealthBar(player.PlayerGui)
|
||||||
|
end)
|
||||||
|
|
||||||
|
while player.Character == nil do wait(0.03) end
|
||||||
|
local humanoid = waitForChild(player.Character, 'Humanoid')
|
||||||
|
humanoid.Died:connect(function()
|
||||||
|
backpackButton.Visible = false
|
||||||
|
end)
|
||||||
|
|
||||||
waitForChild(game, "LocalBackpack")
|
waitForChild(game, "LocalBackpack")
|
||||||
game.LocalBackpack:SetOldSchoolBackpack(false)
|
game.LocalBackpack:SetOldSchoolBackpack(false)
|
||||||
|
|
||||||
|
|
@ -44,6 +75,10 @@ local resizeEvent = waitForChild(backpackManager,"ResizeEvent")
|
||||||
local inGearTab = true
|
local inGearTab = true
|
||||||
|
|
||||||
local maxNumLoadoutItems = 10
|
local maxNumLoadoutItems = 10
|
||||||
|
if robloxGui.AbsoluteSize.Y <= 320 then
|
||||||
|
maxNumLoadoutItems = 4
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
local characterChildAddedCon = nil
|
local characterChildAddedCon = nil
|
||||||
local backpackChildCon = nil
|
local backpackChildCon = nil
|
||||||
|
|
@ -56,6 +91,8 @@ local buttonSizeNormal = UDim2.new(1,0,1,0)
|
||||||
local enlargeOverride = true
|
local enlargeOverride = true
|
||||||
local guiTweenSpeed = 0.5
|
local guiTweenSpeed = 0.5
|
||||||
|
|
||||||
|
local firstInstanceOfLoadout = false
|
||||||
|
|
||||||
local inventory = {}
|
local inventory = {}
|
||||||
|
|
||||||
for i = 0, 9 do
|
for i = 0, 9 do
|
||||||
|
|
@ -66,6 +103,8 @@ local gearSlots = {}
|
||||||
for i = 1, maxNumLoadoutItems do
|
for i = 1, maxNumLoadoutItems do
|
||||||
gearSlots[i] = "empty"
|
gearSlots[i] = "empty"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local backpackWasOpened = false
|
||||||
--- End Locals
|
--- End Locals
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -74,6 +113,14 @@ end
|
||||||
|
|
||||||
|
|
||||||
-- Begin Functions
|
-- Begin Functions
|
||||||
|
local function backpackIsOpen()
|
||||||
|
if guiBackpack then
|
||||||
|
return guiBackpack.Visible
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
local function kill(prop,con,gear)
|
local function kill(prop,con,gear)
|
||||||
if con then con:disconnect() end
|
if con then con:disconnect() end
|
||||||
if prop == true and gear then
|
if prop == true and gear then
|
||||||
|
|
@ -118,15 +165,35 @@ function removeGear(gear)
|
||||||
gearSlots[emptySlot] = "empty"
|
gearSlots[emptySlot] = "empty"
|
||||||
|
|
||||||
local centerizeX = gear.Size.X.Scale/2
|
local centerizeX = gear.Size.X.Scale/2
|
||||||
local centerizeY = gear.Size.Y.Scale/2
|
local centerizeY = gear.Size.Y.Scale/2
|
||||||
gear:TweenSizeAndPosition(UDim2.new(0,0,0,0),
|
--[[gear:TweenSizeAndPosition(UDim2.new(0,0,0,0),
|
||||||
UDim2.new(gear.Position.X.Scale + centerizeX,gear.Position.X.Offset,gear.Position.Y.Scale + centerizeY,gear.Position.Y.Offset),
|
UDim2.new(gear.Position.X.Scale + centerizeX,gear.Position.X.Offset,gear.Position.Y.Scale + centerizeY,gear.Position.Y.Offset),
|
||||||
Enum.EasingDirection.Out, Enum.EasingStyle.Quad,guiTweenSpeed/4,true)
|
Enum.EasingDirection.Out, Enum.EasingStyle.Quad,guiTweenSpeed/4,true)]]
|
||||||
delay(guiTweenSpeed/2,
|
delay(0,
|
||||||
function()
|
function()
|
||||||
gear:remove()
|
gear:remove()
|
||||||
end)
|
end)
|
||||||
end
|
|
||||||
|
Spawn(function()
|
||||||
|
while backpackIsOpen() do wait(0.03) end
|
||||||
|
waitForChild(player, 'Backpack')
|
||||||
|
local allEmpty = true
|
||||||
|
for i = 1, #gearSlots do
|
||||||
|
if gearSlots[i] ~= 'empty' then
|
||||||
|
allEmpty = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if allEmpty then
|
||||||
|
if #player.Backpack:GetChildren() < 1 then
|
||||||
|
backpackButton.Visible = false
|
||||||
|
else
|
||||||
|
backpackButton.Position = UDim2.new(0.5, -60, 1, -44)
|
||||||
|
end
|
||||||
|
clBackground.Visible = false
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function insertGear(gear, addToSlot)
|
function insertGear(gear, addToSlot)
|
||||||
|
|
@ -320,8 +387,12 @@ enlargeButton = function(button)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if button:FindFirstChild('Highlight') then
|
||||||
|
button.Highlight.Visible = true
|
||||||
|
end
|
||||||
|
|
||||||
if button:IsA("ImageButton") or button:IsA("TextButton") then
|
if button:IsA("ImageButton") or button:IsA("TextButton") then
|
||||||
button.ZIndex = 2
|
button.ZIndex = 5
|
||||||
local centerizeX = -(buttonSizeEnlarge.X.Scale - button.Size.X.Scale)/2
|
local centerizeX = -(buttonSizeEnlarge.X.Scale - button.Size.X.Scale)/2
|
||||||
local centerizeY = -(buttonSizeEnlarge.Y.Scale - button.Size.Y.Scale)/2
|
local centerizeY = -(buttonSizeEnlarge.Y.Scale - button.Size.Y.Scale)/2
|
||||||
button:TweenSizeAndPosition(buttonSizeEnlarge,
|
button:TweenSizeAndPosition(buttonSizeEnlarge,
|
||||||
|
|
@ -349,6 +420,10 @@ normalizeButton = function(button, speed)
|
||||||
local moveSpeed = speed
|
local moveSpeed = speed
|
||||||
if moveSpeed == nil or type(moveSpeed) ~= "number" then moveSpeed = guiTweenSpeed/5 end
|
if moveSpeed == nil or type(moveSpeed) ~= "number" then moveSpeed = guiTweenSpeed/5 end
|
||||||
|
|
||||||
|
if button:FindFirstChild('Highlight') then
|
||||||
|
button.Highlight.Visible = false
|
||||||
|
end
|
||||||
|
|
||||||
if button:IsA("ImageButton") or button:IsA("TextButton") then
|
if button:IsA("ImageButton") or button:IsA("TextButton") then
|
||||||
button.ZIndex = 1
|
button.ZIndex = 1
|
||||||
local inverseEnlarge = 1/enlargeFactor
|
local inverseEnlarge = 1/enlargeFactor
|
||||||
|
|
@ -463,7 +538,7 @@ function unequipAllItems(dontEquipThis)
|
||||||
end
|
end
|
||||||
|
|
||||||
function showToolTip(button, tip)
|
function showToolTip(button, tip)
|
||||||
if button and button:FindFirstChild("ToolTipLabel") and button.ToolTipLabel:IsA("TextLabel") then
|
if button and button:FindFirstChild("ToolTipLabel") and button.ToolTipLabel:IsA("TextLabel") and not IsTouchDevice() then
|
||||||
button.ToolTipLabel.Text = tostring(tip)
|
button.ToolTipLabel.Text = tostring(tip)
|
||||||
local xSize = button.ToolTipLabel.TextBounds.X + 6
|
local xSize = button.ToolTipLabel.TextBounds.X + 6
|
||||||
button.ToolTipLabel.Size = UDim2.new(0,xSize,0,20)
|
button.ToolTipLabel.Size = UDim2.new(0,xSize,0,20)
|
||||||
|
|
@ -478,7 +553,7 @@ function hideToolTip(button, tip)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local addingPlayerChild = function(child, equipped, addToSlot, inventoryGearButton)
|
local addingPlayerChild = function(child, equipped, addToSlot, inventoryGearButton)
|
||||||
waitForDebounce()
|
waitForDebounce()
|
||||||
debounce = true
|
debounce = true
|
||||||
|
|
||||||
|
|
@ -495,11 +570,10 @@ local addingPlayerChild = function(child, equipped, addToSlot, inventoryGearButt
|
||||||
if gearSlots[i] ~= "empty" and gearSlots[i].GearReference.Value == child then -- we already have gear, do nothing
|
if gearSlots[i] ~= "empty" and gearSlots[i].GearReference.Value == child then -- we already have gear, do nothing
|
||||||
debounce = false
|
debounce = false
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local gearClone = currentLoadout.TempSlot:clone()
|
local gearClone = currentLoadout.TempSlot:clone()
|
||||||
gearClone.Name = child.Name
|
gearClone.Name = child.Name
|
||||||
gearClone.GearImage.Image = child.TextureId
|
gearClone.GearImage.Image = child.TextureId
|
||||||
|
|
@ -586,8 +660,8 @@ local addingPlayerChild = function(child, equipped, addToSlot, inventoryGearButt
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
dragBegin = gearClone.DragBegin:connect(function(pos)
|
dragBegin = gearClone.DragBegin:connect(function(pos)
|
||||||
dragBeginPos = pos
|
dragBeginPos = pos
|
||||||
gearClone.ZIndex = 7
|
gearClone.ZIndex = 7
|
||||||
local children = gearClone:GetChildren()
|
local children = gearClone:GetChildren()
|
||||||
for i = 1, #children do
|
for i = 1, #children do
|
||||||
if children[i]:IsA("TextLabel") then
|
if children[i]:IsA("TextLabel") then
|
||||||
|
|
@ -603,9 +677,9 @@ local addingPlayerChild = function(child, equipped, addToSlot, inventoryGearButt
|
||||||
end)
|
end)
|
||||||
dragStop = gearClone.DragStopped:connect(function(x,y)
|
dragStop = gearClone.DragStopped:connect(function(x,y)
|
||||||
if gearClone.Selected then
|
if gearClone.Selected then
|
||||||
gearClone.ZIndex = 2
|
gearClone.ZIndex = 4
|
||||||
else
|
else
|
||||||
gearClone.ZIndex = 1
|
gearClone.ZIndex = 3
|
||||||
end
|
end
|
||||||
local children = gearClone:GetChildren()
|
local children = gearClone:GetChildren()
|
||||||
for i = 1, #children do
|
for i = 1, #children do
|
||||||
|
|
@ -665,6 +739,16 @@ local addingPlayerChild = function(child, equipped, addToSlot, inventoryGearButt
|
||||||
|
|
||||||
debounce = false
|
debounce = false
|
||||||
|
|
||||||
|
Spawn(function()
|
||||||
|
while backpackIsOpen() do wait(0.03) end
|
||||||
|
for i = 1, #gearSlots do
|
||||||
|
if gearSlots[i] ~= 'empty' then
|
||||||
|
backpackButton.Position = UDim2.new(0.5, -60, 1, -108)
|
||||||
|
backpackButton.Visible = true
|
||||||
|
clBackground.Visible = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
function addToInventory(child)
|
function addToInventory(child)
|
||||||
|
|
@ -700,16 +784,21 @@ local spreadOutGear = function()
|
||||||
if loadoutChildren[i]:IsA("Frame") then
|
if loadoutChildren[i]:IsA("Frame") then
|
||||||
loadoutChildren[i].BackgroundTransparency = 0.5
|
loadoutChildren[i].BackgroundTransparency = 0.5
|
||||||
local slot = tonumber(string.sub(loadoutChildren[i].Name,5))
|
local slot = tonumber(string.sub(loadoutChildren[i].Name,5))
|
||||||
if slot == 0 then slot = 10 end
|
if slot == 0 then slot = 10 end
|
||||||
loadoutChildren[i]:TweenPosition(UDim2.new((slot - 1)/10,0,0,0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.25, true)
|
if robloxGui.AbsoluteSize.Y <= 320 then
|
||||||
|
loadoutChildren[i]:TweenPosition(UDim2.new(0,(slot-1) * 60,0,0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.25, true)
|
||||||
|
else
|
||||||
|
loadoutChildren[i]:TweenPosition(UDim2.new((slot - 1)/10,0,0,0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.25, true)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local centerGear = function()
|
local centerGear = function()
|
||||||
|
backpackWasOpened = true
|
||||||
loadoutChildren = currentLoadout:GetChildren()
|
loadoutChildren = currentLoadout:GetChildren()
|
||||||
local gearButtons = {}
|
local gearButtons = {}
|
||||||
local lastSlotAdd = nlii
|
local lastSlotAdd = nil
|
||||||
|
|
||||||
for i = 1, #loadoutChildren do
|
for i = 1, #loadoutChildren do
|
||||||
if loadoutChildren[i]:IsA("Frame") then
|
if loadoutChildren[i]:IsA("Frame") then
|
||||||
|
|
@ -726,12 +815,17 @@ local centerGear = function()
|
||||||
if lastSlotAdd then table.insert(gearButtons,lastSlotAdd) end
|
if lastSlotAdd then table.insert(gearButtons,lastSlotAdd) end
|
||||||
|
|
||||||
local startPos = ( 1 - (#gearButtons * 0.1) ) / 2
|
local startPos = ( 1 - (#gearButtons * 0.1) ) / 2
|
||||||
for i = 1, #gearButtons do
|
for i = 1, #gearButtons do
|
||||||
gearButtons[i]:TweenPosition(UDim2.new(startPos + ((i - 1) * 0.1),0,0,0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.25, true)
|
if robloxGui.AbsoluteSize.Y <= 320 then
|
||||||
|
startPos = ( 0.5 - (#gearButtons * 0.333)/2 )
|
||||||
|
gearButtons[i]:TweenPosition(UDim2.new(startPos + (i-1) * 0.33, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.25, true)
|
||||||
|
else
|
||||||
|
gearButtons[i]:TweenPosition(UDim2.new(startPos + ((i - 1) * 0.1),0,0,0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.25, true)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function editLoadout()
|
function editLoadout()
|
||||||
if inGearTab then
|
if inGearTab then
|
||||||
spreadOutGear()
|
spreadOutGear()
|
||||||
end
|
end
|
||||||
|
|
@ -743,12 +837,17 @@ function readonlyLoadout()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function setupBackpackListener()
|
function setupBackpackListener()
|
||||||
if backpackChildCon then backpackChildCon:disconnect() backpackChildCon = nil end
|
if backpackChildCon then backpackChildCon:disconnect() backpackChildCon = nil end
|
||||||
backpackChildCon = player.Backpack.ChildAdded:connect(function(child)
|
backpackChildCon = player.Backpack.ChildAdded:connect(function(child)
|
||||||
|
if not firstInstanceOfLoadout then
|
||||||
|
firstInstanceOfLoadout = true
|
||||||
|
backpackButton.Visible = true
|
||||||
|
clBackground.Visible = true
|
||||||
|
end
|
||||||
addingPlayerChild(child)
|
addingPlayerChild(child)
|
||||||
addToInventory(child)
|
addToInventory(child)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
function playerCharacterChildAdded(child)
|
function playerCharacterChildAdded(child)
|
||||||
|
|
@ -772,24 +871,54 @@ function tabHandler(inFocus)
|
||||||
readonlyLoadout()
|
readonlyLoadout()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- NOTE: Nuke once event based system works 100% cases
|
||||||
|
local function handlePhoneLag()
|
||||||
|
for i = 1, 45 do
|
||||||
|
if i < 25 or not backpackWasOpened then
|
||||||
|
if robloxGui.AbsoluteSize.Y <= 320 then
|
||||||
|
local cChildren = currentLoadout:GetChildren()
|
||||||
|
for i = 1, #cChildren do
|
||||||
|
local slotNum = tonumber(string.sub(cChildren[i].Name, 5, string.len(cChildren[i].Name)))
|
||||||
|
if type(slotNum) == 'number' then
|
||||||
|
cChildren[i].Position = UDim2.new(0, (slotNum-1) * 60, 0, 0)
|
||||||
|
cChildren[i].BackgroundTransparency = 1.0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
wait(0.25)
|
||||||
|
end
|
||||||
|
end
|
||||||
-- End Functions
|
-- End Functions
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- Begin Script
|
-- Begin Script
|
||||||
wait() -- let stuff initialize incase this is first heartbeat...
|
wait() -- let stuff initialize incase this is first heartbeat...
|
||||||
|
|
||||||
waitForChild(player,"Backpack")
|
waitForChild(player,"Backpack")
|
||||||
waitForProperty(player,"Character")
|
waitForProperty(player,"Character")
|
||||||
local backpackChildren = player.Backpack:GetChildren()
|
|
||||||
local size = math.min(10,#backpackChildren)
|
-- not sure why this had no delay but the player.CharacterAdded one had one... this type of error would be easier to avoid with function reusage
|
||||||
for i = 1, size do
|
delay(1,function()
|
||||||
addingPlayerChild(backpackChildren[i],false)
|
local backpackChildren = player.Backpack:GetChildren()
|
||||||
end
|
local size = math.min(10,#backpackChildren)
|
||||||
setupBackpackListener()
|
for i = 1, size do
|
||||||
|
backpackButton.Visible = true
|
||||||
|
clBackground.Visible = true
|
||||||
|
addingPlayerChild(backpackChildren[i],false)
|
||||||
|
end
|
||||||
|
setupBackpackListener()
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- NOTE: This is terrible. Event based system seems to fail almost 30% cases
|
||||||
|
-- So using polling here. Consider this as an intermediate alternative.
|
||||||
|
delay(0, handlePhoneLag)
|
||||||
|
|
||||||
|
player.ChildAdded:connect(function(child)
|
||||||
|
if child:IsA('PlayerGui') then
|
||||||
|
moveHealthBar(child)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
waitForProperty(player,"Character")
|
waitForProperty(player,"Character")
|
||||||
for i,v in ipairs(player.Character:GetChildren()) do
|
for i,v in ipairs(player.Character:GetChildren()) do
|
||||||
|
|
@ -801,7 +930,7 @@ waitForChild(player.Character,"Humanoid")
|
||||||
humanoidDiedCon = player.Character.Humanoid.Died:connect(function()
|
humanoidDiedCon = player.Character.Humanoid.Died:connect(function()
|
||||||
if humanoidDiedCon then humanoidDiedCon:disconnect() humanoidDiedCon = nil end
|
if humanoidDiedCon then humanoidDiedCon:disconnect() humanoidDiedCon = nil end
|
||||||
deactivateLoadout()
|
deactivateLoadout()
|
||||||
if backpackChildCon then backpackChildCon:disconnect() backpackChildCon = nil end
|
if backpackChildCon then backpackChildCon:disconnect() backpackChildCon = nil end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
player.CharacterRemoving:connect(function()
|
player.CharacterRemoving:connect(function()
|
||||||
|
|
@ -813,22 +942,25 @@ player.CharacterRemoving:connect(function()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
player.CharacterAdded:connect(function()
|
player.CharacterAdded:connect(function()
|
||||||
waitForProperty(game.Players,"LocalPlayer")
|
backpackWasOpened = false
|
||||||
|
waitForProperty(game.Players,"LocalPlayer")
|
||||||
player = game.Players.LocalPlayer -- make sure we are still looking at the correct character
|
player = game.Players.LocalPlayer -- make sure we are still looking at the correct character
|
||||||
waitForChild(player,"Backpack")
|
waitForChild(player,"Backpack")
|
||||||
|
|
||||||
|
|
||||||
delay(1,function()
|
delay(1,function()
|
||||||
local backpackChildren = player.Backpack:GetChildren()
|
local backpackChildren = player.Backpack:GetChildren()
|
||||||
local size = math.min(10,#backpackChildren)
|
local size = math.min(10,#backpackChildren)
|
||||||
for i = 1, size do
|
for i = 1, size do
|
||||||
|
backpackButton.Visible = true
|
||||||
|
clBackground.Visible = true
|
||||||
addingPlayerChild(backpackChildren[i],false)
|
addingPlayerChild(backpackChildren[i],false)
|
||||||
end
|
end
|
||||||
setupBackpackListener()
|
setupBackpackListener()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
activateLoadout()
|
activateLoadout()
|
||||||
|
|
||||||
if characterChildAddedCon then
|
if characterChildAddedCon then
|
||||||
characterChildAddedCon:disconnect()
|
characterChildAddedCon:disconnect()
|
||||||
|
|
@ -841,14 +973,23 @@ player.CharacterAdded:connect(function()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
waitForChild(player.Character,"Humanoid")
|
waitForChild(player.Character,"Humanoid")
|
||||||
|
if backpack.Visible then
|
||||||
|
backpackOpenEvent:Fire()
|
||||||
|
end
|
||||||
humanoidDiedCon =
|
humanoidDiedCon =
|
||||||
player.Character.Humanoid.Died:connect(function()
|
player.Character.Humanoid.Died:connect(function()
|
||||||
deactivateLoadout()
|
backpackButton.Visible = false
|
||||||
|
clBackground.Visible = false
|
||||||
|
firstInstanceOfLoadout = false
|
||||||
|
deactivateLoadout()
|
||||||
|
|
||||||
if humanoidDiedCon then humanoidDiedCon:disconnect() humanoidDiedCon = nil end
|
if humanoidDiedCon then humanoidDiedCon:disconnect() humanoidDiedCon = nil end
|
||||||
if backpackChildCon then backpackChildCon:disconnect() backpackChildCon = nil end
|
if backpackChildCon then backpackChildCon:disconnect() backpackChildCon = nil end
|
||||||
end)
|
end)
|
||||||
|
waitForChild(player, 'PlayerGui')
|
||||||
|
moveHealthBar(player.PlayerGui)
|
||||||
|
delay(0, handlePhoneLag)
|
||||||
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
waitForChild(guiBackpack,"SwapSlot")
|
waitForChild(guiBackpack,"SwapSlot")
|
||||||
|
|
|
||||||
|
|
@ -122,13 +122,13 @@ t.CreateStyledMessageDialog = function(title, message, style, buttons)
|
||||||
styleImage.Position = UDim2.new(0,5,0,15)
|
styleImage.Position = UDim2.new(0,5,0,15)
|
||||||
if style == "error" or style == "Error" then
|
if style == "error" or style == "Error" then
|
||||||
styleImage.Size = UDim2.new(0, 71, 0, 71)
|
styleImage.Size = UDim2.new(0, 71, 0, 71)
|
||||||
styleImage.Image = "http://www.roblox.com/asset?id=42565285"
|
styleImage.Image = "http://www.morblox.us/asset?id=42565285"
|
||||||
elseif style == "notify" or style == "Notify" then
|
elseif style == "notify" or style == "Notify" then
|
||||||
styleImage.Size = UDim2.new(0, 71, 0, 71)
|
styleImage.Size = UDim2.new(0, 71, 0, 71)
|
||||||
styleImage.Image = "http://www.roblox.com/asset?id=42604978"
|
styleImage.Image = "http://www.morblox.us/asset?id=42604978"
|
||||||
elseif style == "confirm" or style == "Confirm" then
|
elseif style == "confirm" or style == "Confirm" then
|
||||||
styleImage.Size = UDim2.new(0, 74, 0, 76)
|
styleImage.Size = UDim2.new(0, 74, 0, 76)
|
||||||
styleImage.Image = "http://www.roblox.com/asset?id=42557901"
|
styleImage.Image = "http://www.morblox.us/asset?id=42557901"
|
||||||
else
|
else
|
||||||
return t.CreateMessageDialog(title,message,buttons)
|
return t.CreateMessageDialog(title,message,buttons)
|
||||||
end
|
end
|
||||||
|
|
@ -237,7 +237,7 @@ t.CreateDropDownMenu = function(items, onSelect, forRoblox)
|
||||||
local dropDownIcon = Instance.new("ImageLabel")
|
local dropDownIcon = Instance.new("ImageLabel")
|
||||||
dropDownIcon.Name = "Icon"
|
dropDownIcon.Name = "Icon"
|
||||||
dropDownIcon.Active = false
|
dropDownIcon.Active = false
|
||||||
dropDownIcon.Image = "http://www.roblox.com/asset/?id=45732894"
|
dropDownIcon.Image = "http://www.morblox.us/asset/?id=45732894"
|
||||||
dropDownIcon.BackgroundTransparency = 1
|
dropDownIcon.BackgroundTransparency = 1
|
||||||
dropDownIcon.Size = UDim2.new(0,11,0,6)
|
dropDownIcon.Size = UDim2.new(0,11,0,6)
|
||||||
dropDownIcon.Position = UDim2.new(1,-11,0.5, -2)
|
dropDownIcon.Position = UDim2.new(1,-11,0.5, -2)
|
||||||
|
|
@ -1330,7 +1330,7 @@ t.CreateScrollingFrame = function(orderList,scrollStyle)
|
||||||
local scrollStamp = 0
|
local scrollStamp = 0
|
||||||
|
|
||||||
local scrollDrag = Instance.new("ImageButton")
|
local scrollDrag = Instance.new("ImageButton")
|
||||||
scrollDrag.Image = "http://www.roblox.com/asset/?id=61367186"
|
scrollDrag.Image = "http://www.morblox.us/asset/?id=61367186"
|
||||||
scrollDrag.Size = UDim2.new(1, 0, 0, 16)
|
scrollDrag.Size = UDim2.new(1, 0, 0, 16)
|
||||||
scrollDrag.BackgroundTransparency = 1
|
scrollDrag.BackgroundTransparency = 1
|
||||||
scrollDrag.Name = "ScrollDrag"
|
scrollDrag.Name = "ScrollDrag"
|
||||||
|
|
@ -2603,7 +2603,7 @@ t.CreateSetPanel = function(userIdsForSets, objectSelected, dialogClosed, size,
|
||||||
local cancelImage = Instance.new("ImageLabel")
|
local cancelImage = Instance.new("ImageLabel")
|
||||||
cancelImage.Name = "CancelImage"
|
cancelImage.Name = "CancelImage"
|
||||||
cancelImage.BackgroundTransparency = 1
|
cancelImage.BackgroundTransparency = 1
|
||||||
cancelImage.Image = "http://www.roblox.com/asset?id=54135717"
|
cancelImage.Image = "http://www.morblox.us/asset?id=54135717"
|
||||||
cancelImage.Position = UDim2.new(0,-2,0,-2)
|
cancelImage.Position = UDim2.new(0,-2,0,-2)
|
||||||
cancelImage.Size = UDim2.new(0,16,0,16)
|
cancelImage.Size = UDim2.new(0,16,0,16)
|
||||||
cancelImage.ZIndex = 6
|
cancelImage.ZIndex = 6
|
||||||
|
|
@ -2805,7 +2805,7 @@ t.CreateSetPanel = function(userIdsForSets, objectSelected, dialogClosed, size,
|
||||||
local function createDropDownMenuButton(parent)
|
local function createDropDownMenuButton(parent)
|
||||||
local dropDownButton = Instance.new("ImageButton")
|
local dropDownButton = Instance.new("ImageButton")
|
||||||
dropDownButton.Name = "DropDownButton"
|
dropDownButton.Name = "DropDownButton"
|
||||||
dropDownButton.Image = "http://www.roblox.com/asset/?id=67581509"
|
dropDownButton.Image = "http://www.morblox.us/asset/?id=67581509"
|
||||||
dropDownButton.BackgroundTransparency = 1
|
dropDownButton.BackgroundTransparency = 1
|
||||||
dropDownButton.Size = UDim2.new(0,16,0,16)
|
dropDownButton.Size = UDim2.new(0,16,0,16)
|
||||||
dropDownButton.Position = UDim2.new(1,-24,0,6)
|
dropDownButton.Position = UDim2.new(1,-24,0,6)
|
||||||
|
|
@ -3235,24 +3235,24 @@ t.CreateTerrainMaterialSelector = function(size,position)
|
||||||
-- we so need a better way to do this
|
-- we so need a better way to do this
|
||||||
for i,v in pairs(materialNames) do
|
for i,v in pairs(materialNames) do
|
||||||
materialToImageMap[v] = {}
|
materialToImageMap[v] = {}
|
||||||
if v == "Grass" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=56563112"
|
if v == "Grass" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=56563112"
|
||||||
elseif v == "Sand" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=62356652"
|
elseif v == "Sand" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=62356652"
|
||||||
elseif v == "Brick" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=65961537"
|
elseif v == "Brick" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=65961537"
|
||||||
elseif v == "Granite" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67532153"
|
elseif v == "Granite" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=67532153"
|
||||||
elseif v == "Asphalt" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67532038"
|
elseif v == "Asphalt" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=67532038"
|
||||||
elseif v == "Iron" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67532093"
|
elseif v == "Iron" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=67532093"
|
||||||
elseif v == "Aluminum" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67531995"
|
elseif v == "Aluminum" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=67531995"
|
||||||
elseif v == "Gold" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67532118"
|
elseif v == "Gold" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=67532118"
|
||||||
elseif v == "Plastic (red)" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67531848"
|
elseif v == "Plastic (red)" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=67531848"
|
||||||
elseif v == "Plastic (blue)" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67531924"
|
elseif v == "Plastic (blue)" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=67531924"
|
||||||
elseif v == "Plank" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67532015"
|
elseif v == "Plank" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=67532015"
|
||||||
elseif v == "Log" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67532051"
|
elseif v == "Log" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=67532051"
|
||||||
elseif v == "Gravel" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67532206"
|
elseif v == "Gravel" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=67532206"
|
||||||
elseif v == "Cinder Block" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67532103"
|
elseif v == "Cinder Block" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=67532103"
|
||||||
elseif v == "Stone Wall" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67531804"
|
elseif v == "Stone Wall" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=67531804"
|
||||||
elseif v == "Concrete" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67532059"
|
elseif v == "Concrete" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=67532059"
|
||||||
elseif v == "Water" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=81407474"
|
elseif v == "Water" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=81407474"
|
||||||
else materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=66887593" -- fill in the rest here!!
|
else materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=66887593" -- fill in the rest here!!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -3355,7 +3355,7 @@ t.CreateTerrainMaterialSelector = function(size,position)
|
||||||
end
|
end
|
||||||
|
|
||||||
t.CreateLoadingFrame = function(name,size,position)
|
t.CreateLoadingFrame = function(name,size,position)
|
||||||
game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=35238053")
|
game:GetService("ContentProvider"):Preload("http://www.morblox.us/asset/?id=35238053")
|
||||||
|
|
||||||
local loadingFrame = Instance.new("Frame")
|
local loadingFrame = Instance.new("Frame")
|
||||||
loadingFrame.Name = "LoadingFrame"
|
loadingFrame.Name = "LoadingFrame"
|
||||||
|
|
@ -3376,7 +3376,7 @@ t.CreateLoadingFrame = function(name,size,position)
|
||||||
|
|
||||||
local loadingGreenBar = Instance.new("ImageLabel")
|
local loadingGreenBar = Instance.new("ImageLabel")
|
||||||
loadingGreenBar.Name = "LoadingGreenBar"
|
loadingGreenBar.Name = "LoadingGreenBar"
|
||||||
loadingGreenBar.Image = "http://www.roblox.com/asset/?id=35238053"
|
loadingGreenBar.Image = "http://www.morblox.us/asset/?id=35238053"
|
||||||
loadingGreenBar.Position = UDim2.new(0,0,0,0)
|
loadingGreenBar.Position = UDim2.new(0,0,0,0)
|
||||||
loadingGreenBar.Size = UDim2.new(0,0,1,0)
|
loadingGreenBar.Size = UDim2.new(0,0,1,0)
|
||||||
loadingGreenBar.Visible = false
|
loadingGreenBar.Visible = false
|
||||||
|
|
|
||||||
|
|
@ -661,7 +661,7 @@ t.GetStampModel = function(assetId, terrainShape, useAssetVersionId)
|
||||||
if cellType == 3 then
|
if cellType == 3 then
|
||||||
local inverseCornerWedgeMesh = Instance.new("SpecialMesh")
|
local inverseCornerWedgeMesh = Instance.new("SpecialMesh")
|
||||||
inverseCornerWedgeMesh.MeshType = "FileMesh"
|
inverseCornerWedgeMesh.MeshType = "FileMesh"
|
||||||
inverseCornerWedgeMesh.MeshId = "http://www.roblox.com/asset?id=66832495"
|
inverseCornerWedgeMesh.MeshId = "http://www.morblox.us/asset?id=66832495"
|
||||||
inverseCornerWedgeMesh.Scale = Vector3.new(2, 2, 2)
|
inverseCornerWedgeMesh.Scale = Vector3.new(2, 2, 2)
|
||||||
inverseCornerWedgeMesh.Parent = newTerrainPiece
|
inverseCornerWedgeMesh.Parent = newTerrainPiece
|
||||||
end
|
end
|
||||||
|
|
|
||||||
3924
public/asset/5
3924
public/asset/5
File diff suppressed because it is too large
Load Diff
|
|
@ -53,7 +53,7 @@ popupImage.Parent = popupFrame
|
||||||
local backing = Instance.new("ImageLabel")
|
local backing = Instance.new("ImageLabel")
|
||||||
backing.BackgroundTransparency = 1
|
backing.BackgroundTransparency = 1
|
||||||
backing.Size = UDim2.new(1,0,1,0)
|
backing.Size = UDim2.new(1,0,1,0)
|
||||||
backing.Image = "http://www.roblox.com/asset/?id=47574181"
|
backing.Image = "http://www.morblox.us/asset/?id=47574181"
|
||||||
backing.Name = "Backing"
|
backing.Name = "Backing"
|
||||||
backing.ZIndex = 2
|
backing.ZIndex = 2
|
||||||
backing.Parent = popupImage
|
backing.Parent = popupImage
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ function makeFriend(fromPlayer,toPlayer)
|
||||||
if friendRequestBlacklist[fromPlayer] then return end -- previously cancelled friend request, we don't want it!
|
if friendRequestBlacklist[fromPlayer] then return end -- previously cancelled friend request, we don't want it!
|
||||||
|
|
||||||
popup.PopupText.Text = "Accept Friend Request from " .. tostring(fromPlayer.Name) .. "?"
|
popup.PopupText.Text = "Accept Friend Request from " .. tostring(fromPlayer.Name) .. "?"
|
||||||
popup.PopupImage.Image = "http://www.roblox.com/thumbs/avatar.ashx?userId="..tostring(fromPlayer.userId).."&x=352&y=352"
|
popup.PopupImage.Image = "http://www.morblox.us/thumbs/avatar.ashx?userId="..tostring(fromPlayer.userId).."&x=352&y=352"
|
||||||
|
|
||||||
showTwoButtons()
|
showTwoButtons()
|
||||||
popup.Visible = true
|
popup.Visible = true
|
||||||
|
|
@ -73,7 +73,7 @@ game.Players.FriendRequestEvent:connect(function(fromPlayer,toPlayer,event)
|
||||||
if event == Enum.FriendRequestEvent.Accept then
|
if event == Enum.FriendRequestEvent.Accept then
|
||||||
game:GetService("GuiService"):SendNotification("You are Friends",
|
game:GetService("GuiService"):SendNotification("You are Friends",
|
||||||
"With " .. toPlayer.Name .. "!",
|
"With " .. toPlayer.Name .. "!",
|
||||||
"http://www.roblox.com/thumbs/avatar.ashx?userId="..tostring(toPlayer.userId).."&x=48&y=48",
|
"http://www.morblox.us/thumbs/avatar.ashx?userId="..tostring(toPlayer.userId).."&x=48&y=48",
|
||||||
5,
|
5,
|
||||||
function()
|
function()
|
||||||
|
|
||||||
|
|
@ -84,7 +84,7 @@ game.Players.FriendRequestEvent:connect(function(fromPlayer,toPlayer,event)
|
||||||
if friendRequestBlacklist[fromPlayer] then return end -- previously cancelled friend request, we don't want it!
|
if friendRequestBlacklist[fromPlayer] then return end -- previously cancelled friend request, we don't want it!
|
||||||
game:GetService("GuiService"):SendNotification("Friend Request",
|
game:GetService("GuiService"):SendNotification("Friend Request",
|
||||||
"From " .. fromPlayer.Name,
|
"From " .. fromPlayer.Name,
|
||||||
"http://www.roblox.com/thumbs/avatar.ashx?userId="..tostring(fromPlayer.userId).."&x=48&y=48",
|
"http://www.morblox.us/thumbs/avatar.ashx?userId="..tostring(fromPlayer.userId).."&x=48&y=48",
|
||||||
8,
|
8,
|
||||||
function()
|
function()
|
||||||
makeFriend(fromPlayer,toPlayer)
|
makeFriend(fromPlayer,toPlayer)
|
||||||
|
|
@ -92,7 +92,7 @@ game.Players.FriendRequestEvent:connect(function(fromPlayer,toPlayer,event)
|
||||||
elseif event == Enum.FriendRequestEvent.Accept then
|
elseif event == Enum.FriendRequestEvent.Accept then
|
||||||
game:GetService("GuiService"):SendNotification("You are Friends",
|
game:GetService("GuiService"):SendNotification("You are Friends",
|
||||||
"With " .. fromPlayer.Name .. "!",
|
"With " .. fromPlayer.Name .. "!",
|
||||||
"http://www.roblox.com/thumbs/avatar.ashx?userId="..tostring(fromPlayer.userId).."&x=48&y=48",
|
"http://www.morblox.us/thumbs/avatar.ashx?userId="..tostring(fromPlayer.userId).."&x=48&y=48",
|
||||||
5,
|
5,
|
||||||
function()
|
function()
|
||||||
|
|
||||||
|
|
|
||||||
285
public/asset/9
285
public/asset/9
|
|
@ -418,64 +418,7 @@ local Chat = {
|
||||||
}
|
}
|
||||||
---------------------------------------------------
|
---------------------------------------------------
|
||||||
|
|
||||||
local function GetNameValue(pName)
|
|
||||||
local value = 0
|
|
||||||
for index = 1, #pName do
|
|
||||||
local cValue = string.byte(string.sub(pName, index, index))
|
|
||||||
local reverseIndex = #pName - index + 1
|
|
||||||
if #pName%2 == 1 then
|
|
||||||
reverseIndex = reverseIndex - 1
|
|
||||||
end
|
|
||||||
if reverseIndex%4 >= 2 then
|
|
||||||
cValue = -cValue
|
|
||||||
end
|
|
||||||
value = value + cValue
|
|
||||||
end
|
|
||||||
return value%8
|
|
||||||
end
|
|
||||||
|
|
||||||
function Chat:ComputeChatColor(pName)
|
|
||||||
return self.ChatColors[GetNameValue(pName) + 1].Color
|
|
||||||
end
|
|
||||||
|
|
||||||
-- This is context based scrolling
|
|
||||||
function Chat:EnableScrolling(toggle)
|
|
||||||
-- Genius idea gone to fail, if we switch the camera type we can effectively lock the
|
|
||||||
-- camera and do no click scrolling
|
|
||||||
self.MouseOnFrame = false
|
|
||||||
if self.RenderFrame then
|
|
||||||
self.RenderFrame.MouseEnter:connect(function()
|
|
||||||
local character = Player.Character
|
|
||||||
local torso = WaitForChild(character, 'Torso')
|
|
||||||
local humanoid = WaitForChild(character, 'Humanoid')
|
|
||||||
local head = WaitForChild(character, 'Head')
|
|
||||||
if toggle then
|
|
||||||
self.MouseOnFrame = true
|
|
||||||
Camera.CameraType = 'Scriptable'
|
|
||||||
-- Get relative position of camera and keep to it
|
|
||||||
Spawn(function()
|
|
||||||
local currentRelativePos = Camera.CoordinateFrame.p - torso.Position
|
|
||||||
while Chat.MouseOnFrame do
|
|
||||||
Camera.CoordinateFrame = CFrame.new(torso.Position + currentRelativePos, head.Position)
|
|
||||||
wait(0.015)
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
self.RenderFrame.MouseLeave:connect(function()
|
|
||||||
Camera.CameraType = 'Custom'
|
|
||||||
self.MouseOnFrame = false
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- TODO: Scrolling using Mouse wheel
|
|
||||||
function Chat:OnScroll(speed)
|
|
||||||
if self.MouseOnFrame then
|
|
||||||
--
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Check if we are running on a touch device
|
-- Check if we are running on a touch device
|
||||||
function Chat:IsTouchDevice()
|
function Chat:IsTouchDevice()
|
||||||
|
|
@ -503,85 +446,7 @@ function Chat:ScrollQueue(value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Handles the rendering of the text objects in their appropriate places
|
|
||||||
function Chat:UpdateQueue(field)
|
|
||||||
-- Have to do some sort of correction here
|
|
||||||
for i = #self.MessageQueue, 1, -1 do
|
|
||||||
if self.MessageQueue[i] then
|
|
||||||
for _, label in pairs(self.MessageQueue[i]) do
|
|
||||||
if label and type(label) ~= 'table' and type(label) ~= 'number' then
|
|
||||||
if label:IsA('TextLabel') or label:IsA('TextButton') then
|
|
||||||
if self.SlotPositions_List[i] and self.MessageQueue[i] ~= field then
|
|
||||||
label.Position = self.SlotPositions_List[i][1] - UDim2.new(0, 0, field['Message'].Size.Y.Scale, 0)
|
|
||||||
label.Position = UDim2.new(self.Configuration.XScale, 0, label.Position.Y.Scale, 0)
|
|
||||||
else
|
|
||||||
label.Position = UDim2.new(self.Configuration.XScale, 0, label.Position.Y.Scale - field['Message'].Size.Y.Scale , 0)
|
|
||||||
end
|
|
||||||
if field == self.MessageQueue[i] then
|
|
||||||
-- Just to show up popping effect for the latest message in chat
|
|
||||||
Spawn(function()
|
|
||||||
wait(0.15)
|
|
||||||
while label.TextTransparency > 0 do
|
|
||||||
label.TextTransparency = label.TextTransparency - 0.2
|
|
||||||
wait()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
if label.Position.Y.Scale < -0.05 or label.Position.Y.Scale > 1.0 then
|
|
||||||
label.TextTransparency = 1.0
|
|
||||||
else
|
|
||||||
label.TextTransparency = 0.0
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function Chat:InsertIntoQueue(field)
|
|
||||||
-- This is a ring buffer where insertions happen at the beginning
|
|
||||||
-- One optimization here would be to not copy the queue by reference
|
|
||||||
-- And reuse the same queue and do the insertion in place
|
|
||||||
-- But rendering code must be changed accordingly and this becomes rather hard to manage
|
|
||||||
-- plus the effects are minimal
|
|
||||||
-- TODO: Revist if this becomes a problem for optimization
|
|
||||||
local tmpQueue = self.MessageQueue
|
|
||||||
self.MessageQueue = {}
|
|
||||||
self.MessageQueue[1] = field
|
|
||||||
self.MessageQueue[1].Previous = tmpQueue[i]
|
|
||||||
self.MessageQueue[1].Next = nil
|
|
||||||
|
|
||||||
self.SlotPositions_List = {}
|
|
||||||
self.SlotPositions_List[1] = {field.Position, field.Size}
|
|
||||||
|
|
||||||
if tmpQueue[self.Configuration.HistoryLength] then
|
|
||||||
if tmpQueue[self.Configuration.HistoryLength]['Player'] then
|
|
||||||
tmpQueue[self.Configuration.HistoryLength]['Player']:Destroy()
|
|
||||||
end
|
|
||||||
if tmpQueue[self.Configuration.HistoryLength]['Message'] then
|
|
||||||
tmpQueue[self.Configuration.HistoryLength]['Message']:Destroy()
|
|
||||||
end
|
|
||||||
tmpQueue[self.Configuration.HistoryLength] = nil
|
|
||||||
end
|
|
||||||
|
|
||||||
for i = 1, self.Configuration.HistoryLength - 1 do
|
|
||||||
if tmpQueue[i] and tmpQueue[i]['Player'] and tmpQueue[i]['Player'].Parent then
|
|
||||||
table.insert(self.MessageQueue, tmpQueue[i])
|
|
||||||
self.MessageQueue[#self.MessageQueue].Previous = tmpQueue[i+1] or nil
|
|
||||||
self.MessageQueue[#self.MessageQueue].Next = tmpQueue[i-1] or nil
|
|
||||||
|
|
||||||
self.SlotPositions_List[#self.MessageQueue] = {tmpQueue[i]['Message'].Position, tmpQueue[i]['Message'].Size}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
-- Now, render the queue
|
|
||||||
Chat:UpdateQueue(field)
|
|
||||||
end
|
|
||||||
|
|
||||||
function Chat:CreateScrollBar()
|
|
||||||
-- Code for scrolling is in here, partially, but scroll bar drawing isn't drawn
|
|
||||||
-- TODO: Implement
|
|
||||||
end
|
|
||||||
|
|
||||||
function Chat:FocusOnChatBar()
|
function Chat:FocusOnChatBar()
|
||||||
if self.ClickToChatButton then
|
if self.ClickToChatButton then
|
||||||
|
|
@ -620,7 +485,7 @@ function Chat:CreateTouchButton()
|
||||||
Size = UDim2.new(1, 0, 1, 0);
|
Size = UDim2.new(1, 0, 1, 0);
|
||||||
Position = UDim2.new(0, 0, 0, 0);
|
Position = UDim2.new(0, 0, 0, 0);
|
||||||
BackgroundTransparency = 1.0;
|
BackgroundTransparency = 1.0;
|
||||||
Image = 'http://morblox.us/asset/?id=97078724'
|
Image = 'http://www.roblox.com/asset/?id=97078724'
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
self.TapToChatLabel = self.ChatTouchFrame.ChatLabel
|
self.TapToChatLabel = self.ChatTouchFrame.ChatLabel
|
||||||
|
|
@ -740,106 +605,7 @@ function Chat:ComputeSpaceString(pLabel)
|
||||||
return nString
|
return nString
|
||||||
end
|
end
|
||||||
|
|
||||||
-- When the playerChatted event fires
|
|
||||||
-- The message is what the player chatted
|
|
||||||
function Chat:UpdateChat(cPlayer, message)
|
|
||||||
local pName = cPlayer.Name
|
|
||||||
local pLabel
|
|
||||||
local mLabel
|
|
||||||
-- Our history stores upto 50 messages that is 100 textlabels
|
|
||||||
-- If we ever hit the mark, which would be in every popular game btw
|
|
||||||
-- we wrap around and reuse the labels
|
|
||||||
if #self.MessageQueue > self.Configuration.HistoryLength then
|
|
||||||
pLabel = self.MessageQueue[#self.MessageQueue]['Player']
|
|
||||||
mLabel = self.MessageQueue[#self.MessageQueue]['Message']
|
|
||||||
|
|
||||||
pLabel.Text = pName
|
|
||||||
pLabel.Name = pName
|
|
||||||
pLabel.TextColor3 = Chat:ComputeChatColor(pName)
|
|
||||||
|
|
||||||
local nString
|
|
||||||
|
|
||||||
if not self.CachedSpaceStrings_List[pName] then
|
|
||||||
nString = Chat:ComputeSpaceString(pLabel)
|
|
||||||
else
|
|
||||||
nString = self.CachedSpaceStrings_List[pName]
|
|
||||||
end
|
|
||||||
|
|
||||||
mLabel.Name = pName .. " - message"
|
|
||||||
mLabel.Text = nString .. message;
|
|
||||||
|
|
||||||
-- Reinserted at the beginning, ring buffer
|
|
||||||
self.MessageQueue[#self.MessageQueue] = nil
|
|
||||||
else
|
|
||||||
-- Haven't hit the mark yet, so keep creating
|
|
||||||
pLabel = Gui.Create'TextButton'
|
|
||||||
{
|
|
||||||
Name = pName;
|
|
||||||
Text = pName .. ":";
|
|
||||||
TextColor3 = Chat:ComputeChatColor(pName);
|
|
||||||
FontSize = Chat.Configuration.FontSize;
|
|
||||||
TextXAlignment = Enum.TextXAlignment.Left;
|
|
||||||
TextYAlignment = Enum.TextYAlignment.Top;
|
|
||||||
Parent = self.RenderFrame;
|
|
||||||
TextWrapped = false;
|
|
||||||
Size = UDim2.new(1, 0, 0.1, 0);
|
|
||||||
BackgroundTransparency = 1.0;
|
|
||||||
TextTransparency = 1.0;
|
|
||||||
Position = UDim2.new(0, 0, 1, 0);
|
|
||||||
BorderSizePixel = 0.0;
|
|
||||||
};
|
|
||||||
|
|
||||||
local nString
|
|
||||||
|
|
||||||
if not self.CachedSpaceStrings_List[pName] then
|
|
||||||
nString = Chat:ComputeSpaceString(pLabel)
|
|
||||||
else
|
|
||||||
nString = self.CachedSpaceStrings_List[pName]
|
|
||||||
end
|
|
||||||
|
|
||||||
mLabel = Gui.Create'TextButton'
|
|
||||||
{
|
|
||||||
Name = pName .. ' - message';
|
|
||||||
-- Max is 3 lines
|
|
||||||
Size = UDim2.new(1, 0, 0.5, 0);
|
|
||||||
Text = nString .. message;
|
|
||||||
TextColor3 = Chat.Configuration.MessageColor;
|
|
||||||
FontSize = Chat.Configuration.FontSize;
|
|
||||||
TextXAlignment = Enum.TextXAlignment.Left;
|
|
||||||
TextYAlignment = Enum.TextYAlignment.Top;
|
|
||||||
Parent = self.RenderFrame;
|
|
||||||
TextWrapped = true;
|
|
||||||
BackgroundTransparency = 1.0;
|
|
||||||
TextTransparency = 1.0;
|
|
||||||
Position = UDim2.new(0, 0, 1, 0);
|
|
||||||
BorderSizePixel = 0.0;
|
|
||||||
};
|
|
||||||
end
|
|
||||||
|
|
||||||
-- This is to find if we need to wrap the text around
|
|
||||||
-- Expensive, but works well and worthwhile
|
|
||||||
-- This will give beautiful multilines as well
|
|
||||||
local heightField = 0.1 * self.RenderFrame.AbsoluteSize.Y
|
|
||||||
|
|
||||||
while heightField < mLabel.TextBounds.Y do
|
|
||||||
heightField = heightField + 1
|
|
||||||
end
|
|
||||||
|
|
||||||
pLabel.Visible = true
|
|
||||||
mLabel.Visible = true
|
|
||||||
|
|
||||||
mLabel.Size = UDim2.new(1, 0, heightField/self.RenderFrame.AbsoluteSize.Y, 0)
|
|
||||||
pLabel.Size = mLabel.Size
|
|
||||||
local yPixels = self.RenderFrame.AbsoluteSize.Y
|
|
||||||
local yFieldSize = mLabel.TextBounds.Y
|
|
||||||
|
|
||||||
local queueField = {}
|
|
||||||
queueField['Player'] = pLabel
|
|
||||||
queueField['Message'] = mLabel
|
|
||||||
queueField['SpawnTime'] = tick() -- Used for identifying when to make the message invisible
|
|
||||||
|
|
||||||
Chat:InsertIntoQueue(queueField)
|
|
||||||
end
|
|
||||||
|
|
||||||
function Chat:ScreenSizeChanged()
|
function Chat:ScreenSizeChanged()
|
||||||
while self.Frame.AbsoluteSize.Y > 120 do
|
while self.Frame.AbsoluteSize.Y > 120 do
|
||||||
|
|
@ -864,7 +630,7 @@ function Chat:CreateGui()
|
||||||
Gui.Create'ImageLabel'
|
Gui.Create'ImageLabel'
|
||||||
{
|
{
|
||||||
Name = 'Background';
|
Name = 'Background';
|
||||||
Image = 'http://morblox.us/asset/?id=97120937'; --96551212';
|
Image = 'http://www.roblox.com/asset/?id=97120937'; --96551212';
|
||||||
Size = UDim2.new(1.3, 0, 1.64, 0);
|
Size = UDim2.new(1.3, 0, 1.64, 0);
|
||||||
Position = UDim2.new(0, 0, 0, 0);
|
Position = UDim2.new(0, 0, 0, 0);
|
||||||
BackgroundTransparency = 1.0;
|
BackgroundTransparency = 1.0;
|
||||||
|
|
@ -891,7 +657,7 @@ function Chat:CreateGui()
|
||||||
BackgroundTransparency = 1.0;
|
BackgroundTransparency = 1.0;
|
||||||
ClipsDescendants = true;
|
ClipsDescendants = true;
|
||||||
ZIndex = 0.0;
|
ZIndex = 0.0;
|
||||||
Visible = false;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1042,7 +808,7 @@ function Chat:CreateSafeChatGui()
|
||||||
Size = UDim2.new(0, 44, 0, 31);
|
Size = UDim2.new(0, 44, 0, 31);
|
||||||
Position = UDim2.new(0, 1, 0.35, 0);
|
Position = UDim2.new(0, 1, 0.35, 0);
|
||||||
BackgroundTransparency = 1.0;
|
BackgroundTransparency = 1.0;
|
||||||
Image = 'http://morblox.us/asset/?id=97080365';
|
Image = 'http://www.roblox.com/asset/?id=97080365';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1115,48 +881,9 @@ function Chat:FindMessageInSafeChat(message, list)
|
||||||
return foundMessage
|
return foundMessage
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Just a wrapper around our PlayerChatted event
|
|
||||||
function Chat:PlayerChatted(...)
|
|
||||||
local args = {...}
|
|
||||||
local argCount = select('#', ...)
|
|
||||||
local player
|
|
||||||
local message
|
|
||||||
-- This doesn't look very good, but what else to do?
|
|
||||||
if args[2] then
|
|
||||||
player = args[2]
|
|
||||||
end
|
|
||||||
if args[3] then
|
|
||||||
message = args[3]
|
|
||||||
end
|
|
||||||
if PlayersService.ClassicChat then
|
|
||||||
if Player.ChatMode == Enum.ChatMode.TextAndMenu then
|
|
||||||
Chat:UpdateChat(player, message)
|
|
||||||
elseif Player.ChatMode == Enum.ChatMode.Menu and string.sub(message, 3) == '/sc' then
|
|
||||||
Chat:UpdateChat(player, message)
|
|
||||||
else
|
|
||||||
if Chat:FindMessageInSafeChat(message, self.SafeChat_List) then
|
|
||||||
Chat:UpdateChat(player, message)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- After 5 minutes of existence, the labels become invisible
|
|
||||||
-- Runs only every 5 seconds and has to loop through 50 values
|
|
||||||
-- Shouldn't be too expensive
|
|
||||||
function Chat:CullThread()
|
|
||||||
while true do
|
|
||||||
if #self.MessageQueue > 0 then
|
|
||||||
for _, field in pairs(self.MessageQueue) do
|
|
||||||
if tick() - field['SpawnTime'] > self.Configuration.LifeTime and field['Player'] and field['Message'] then
|
|
||||||
field['Player'].Visible = false
|
|
||||||
field['Message'].Visible = false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
wait(5.0)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- RobloxLock everything so users can't delete them(?)
|
-- RobloxLock everything so users can't delete them(?)
|
||||||
function Chat:LockAllFields(gui)
|
function Chat:LockAllFields(gui)
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ ob_start();
|
||||||
function sign($data) {
|
function sign($data) {
|
||||||
$PrivKey = file_get_contents("./PrivKey.pem");
|
$PrivKey = file_get_contents("./PrivKey.pem");
|
||||||
openssl_sign($data, $signature, $PrivKey, OPENSSL_ALGO_SHA1);
|
openssl_sign($data, $signature, $PrivKey, OPENSSL_ALGO_SHA1);
|
||||||
echo "" . sprintf("%%%s%%%s", base64_encode($signature), $data);
|
echo sprintf("%%%s%%%s", base64_encode($signature), $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
$id = (int)($_GET["id"] ?? die(json_encode(["message" => "Error handling your request."])));
|
$id = (int)($_GET["id"] ?? die(json_encode(["message" => "Error handling your request."])));
|
||||||
|
|
@ -55,8 +55,6 @@ if (file_exists($_SERVER["DOCUMENT_ROOT"] . "/asset/" . $id)){
|
||||||
sign($file);
|
sign($file);
|
||||||
}else if($id == 20){
|
}else if($id == 20){
|
||||||
sign($file);
|
sign($file);
|
||||||
}else if($id == 52177590){
|
|
||||||
sign($file);
|
|
||||||
}else{
|
}else{
|
||||||
echo $file;
|
echo $file;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue