New test cores

This commit is contained in:
MuramasaM 2022-07-04 13:51:03 -07:00 committed by GitHub
parent 10badbdcbf
commit 0cd83ccac7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 5324 additions and 4217 deletions

View File

@ -39,7 +39,6 @@ pcall(function()
waitForProperty(game,"PlaceId")
if game.PlaceId == deepakTestingPlace then
scriptContext:AddCoreScript(52177626,screenGui,"RBXStatusBuffsGUIScript")
scriptContext:AddCoreScript(52177590,screenGui,"HealthScript v4.0")
end
end)

View File

@ -63,7 +63,7 @@ local hereText
-- user facing images
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 buyImageUrl = assetUrl .. "104651457" table.insert(assetUrls,buyImageUrl)
local buyImageDownUrl = assetUrl .. "104651515" table.insert(assetUrls, buyImageDownUrl)
@ -661,9 +661,9 @@ function startSpinner()
while pos < 8 do
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
spinnerIcons[pos+1].Image = "http://www.roblox.com/Asset?id=45880710"
spinnerIcons[pos+1].Image = "http://www.morblox.us/Asset?id=45880710"
end
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.BackgroundTransparency = 1
spinnerImage.ZIndex = 10
spinnerImage.Image = "http://www.roblox.com/Asset/?id=45880710"
spinnerImage.Image = "http://www.morblox.us/Asset/?id=45880710"
spinnerImage.Parent = spinnerFrame
spinnerIcons[spinnerNum] = spinnerImage

File diff suppressed because it is too large Load Diff

View File

@ -18,6 +18,19 @@ local function waitForProperty(instance, property)
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")
waitForProperty(game.Players,"LocalPlayer")
local player = game.Players.LocalPlayer
@ -25,12 +38,29 @@ local player = game.Players.LocalPlayer
-- First up is the current loadout
local CurrentLoadout = Instance.new("Frame")
CurrentLoadout.Name = "CurrentLoadout"
CurrentLoadout.Position = UDim2.new(0.5, -240, 1, -85)
CurrentLoadout.Size = UDim2.new(0, 480, 0, 48)
CurrentLoadout.Position = UDim2.new(0.5, -300, 1, -85)
CurrentLoadout.Size = UDim2.new(0, 600, 0, 54)
CurrentLoadout.BackgroundTransparency = 1
CurrentLoadout.RobloxLocked = true
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")
Debounce.Name = "Debounce"
Debounce.RobloxLocked = true
@ -41,36 +71,73 @@ BackpackButton.RobloxLocked = true
BackpackButton.Visible = false
BackpackButton.Name = "BackpackButton"
BackpackButton.BackgroundTransparency = 1
BackpackButton.Image = "rbxasset://textures/ui/backpackButton.png"
BackpackButton.Position = UDim2.new(0.5, -195, 1, -30)
BackpackButton.Size = UDim2.new(0,107,0,26)
BackpackButton.Image = "rbxasset://Textures/IPadInGameGUIToolbarBkpkTabTopV3.png"
BackpackButton.Position = UDim2.new(0.5, -60, 1, -108)
BackpackButton.Size = UDim2.new(0, 120, 0, 18)
waitForChild(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")
slotFrame.RobloxLocked = true
slotFrame.BackgroundColor3 = Color3.new(0,0,0)
slotFrame.BackgroundTransparency = 1
slotFrame.BorderColor3 = Color3.new(1,1,1)
slotFrame.BorderColor3 = Color3.new(1, 1, 1)
slotFrame.Name = "Slot" .. tostring(i)
slotFrame.ZIndex = 4.0
if i == 0 then
slotFrame.Position = UDim2.new(0.9,0,0,0)
slotFrame.Position = UDim2.new(0.9, 0, 0, 0)
else
slotFrame.Position = UDim2.new((i - 1) * 0.1,0,0,0)
end
slotFrame.Size = UDim2.new(0.1,0,1,0)
slotFrame.Parent = CurrentLoadout
slotFrame.Position = UDim2.new((i - 1) * 0.1, (i-1)* 6,0,0)
end
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
local TempSlot = Instance.new("ImageButton")
TempSlot.Name = "TempSlot"
TempSlot.Active = true
TempSlot.Size = UDim2.new(1,0,1,0)
TempSlot.Style = Enum.ButtonStyle.RobloxButton
TempSlot.BackgroundTransparency = 1.0
TempSlot.Style = 'Custom'
TempSlot.Visible = false
TempSlot.RobloxLocked = true
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
local GearReference = Instance.new("ObjectValue")
@ -78,6 +145,7 @@ TempSlot.Parent = CurrentLoadout
GearReference.RobloxLocked = true
GearReference.Parent = TempSlot
local ToolTipLabel = Instance.new("TextLabel")
ToolTipLabel.Name = "ToolTipLabel"
ToolTipLabel.RobloxLocked = true
@ -94,6 +162,7 @@ TempSlot.Parent = CurrentLoadout
ToolTipLabel.Size = UDim2.new(1,60,0,20)
ToolTipLabel.Position = UDim2.new(0,-30,0,-30)
ToolTipLabel.Parent = TempSlot
local Kill = Instance.new("BoolValue")
Kill.Name = "Kill"
@ -103,9 +172,9 @@ TempSlot.Parent = CurrentLoadout
local GearImage = Instance.new("ImageLabel")
GearImage.Name = "GearImage"
GearImage.BackgroundTransparency = 1
GearImage.Position = UDim2.new(0,-7,0,-7)
GearImage.Size = UDim2.new(1,14,1,14)
GearImage.ZIndex = 2
GearImage.Position = UDim2.new(0, 0, 0, 0)
GearImage.Size = UDim2.new(1, 0, 1, 0)
GearImage.ZIndex = 5.0
GearImage.RobloxLocked = true
GearImage.Parent = TempSlot
@ -115,26 +184,30 @@ TempSlot.Parent = CurrentLoadout
SlotNumber.BorderSizePixel = 0
SlotNumber.Font = Enum.Font.ArialBold
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.TextColor3 = Color3.new(1,1,1)
SlotNumber.TextTransparency = 0
SlotNumber.TextXAlignment = Enum.TextXAlignment.Left
SlotNumber.TextYAlignment = Enum.TextYAlignment.Bottom
SlotNumber.ZIndex = 4
SlotNumber.TextYAlignment = Enum.TextYAlignment.Bottom
SlotNumber.RobloxLocked = true
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.TextColor3 = Color3.new(0,0,0)
SlotNumberDownShadow.ZIndex = 3
SlotNumberDownShadow.Position = UDim2.new(0,-6,0,-6)
SlotNumberDownShadow.TextColor3 = Color3.new(0,0,0)
SlotNumberDownShadow.Position = UDim2.new(0, 1, 0, -1)
SlotNumberDownShadow.Parent = TempSlot
SlotNumberDownShadow.ZIndex = 2
local SlotNumberUpShadow = SlotNumberDownShadow:clone()
local SlotNumberUpShadow = SlotNumberDownShadow:Clone()
SlotNumberUpShadow.Name = "SlotNumberUpShadow"
SlotNumberUpShadow.Position = UDim2.new(0,-8,0,-8)
SlotNumberUpShadow.Position = UDim2.new(0, -1, 0, -1)
SlotNumberUpShadow.Parent = TempSlot
local GearText = Instance.new("TextLabel")
@ -143,13 +216,13 @@ TempSlot.Parent = CurrentLoadout
GearText.BackgroundTransparency = 1
GearText.Font = Enum.Font.Arial
GearText.FontSize = Enum.FontSize.Size14
GearText.Position = UDim2.new(0,-8,0,-8)
GearText.ZIndex = 2
GearText.Position = UDim2.new(0,-8,0,-8)
GearText.Size = UDim2.new(1,16,1,16)
GearText.Text = ""
GearText.TextColor3 = Color3.new(1,1,1)
GearText.TextWrap = true
GearText.Parent = TempSlot
GearText.ZIndex = 5.0
--- Great, now lets make the inventory!
@ -157,9 +230,9 @@ local Backpack = Instance.new("Frame")
Backpack.RobloxLocked = true
Backpack.Visible = false
Backpack.Name = "Backpack"
Backpack.Position = UDim2.new(0.5,0,0.5,0)
Backpack.BackgroundColor3 = Color3.new(0,0,0)
Backpack.BackgroundTransparency = 0.08
Backpack.Position = UDim2.new(0.5, 0, 0.5, 0)
Backpack.BackgroundColor3 = Color3.new(32/255, 32/255, 32/255)
Backpack.BackgroundTransparency = 0.0
Backpack.BorderSizePixel = 0
Backpack.Parent = gui
Backpack.Active = true
@ -183,7 +256,8 @@ Backpack.Active = true
local Tabs = Instance.new("Frame")
Tabs.Name = "Tabs"
Tabs.Visible = true
Tabs.Visible = false
Tabs.Active = false
Tabs.RobloxLocked = true
Tabs.BackgroundColor3 = Color3.new(0,0,0)
Tabs.BackgroundTransparency = 0.08
@ -256,8 +330,8 @@ Backpack.Active = true
local XImage = Instance.new("ImageLabel")
XImage.RobloxLocked = true
XImage.Name = "XImage"
game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=75547445")
XImage.Image = "http://www.roblox.com/asset/?id=75547445" --TODO: move to rbxasset
game:GetService("ContentProvider"):Preload("http://www.morblox.us/asset/?id=75547445")
XImage.Image = "http://www.morblox.us/asset/?id=75547445" --TODO: move to rbxasset
XImage.BackgroundTransparency = 1
XImage.Position = UDim2.new(-.25,-1,-.25,-1)
XImage.Size = UDim2.new(1.5,2,1.5,2)
@ -343,18 +417,27 @@ Backpack.Active = true
local GearGrid = Instance.new("Frame")
GearGrid.RobloxLocked = true
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.Parent = Gear
GearGrid.Parent = Gear
local GearButton = Instance.new("ImageButton")
GearButton.RobloxLocked = true
GearButton.Visible = false
GearButton.Name = "GearButton"
GearButton.Size = UDim2.new(0,64,0,64)
GearButton.Style = Enum.ButtonStyle.RobloxButton
GearButton.Size = UDim2.new(0, 54, 0, 54)
GearButton.Style = 'Custom'
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
local GearReference = Instance.new("ObjectValue")
@ -389,8 +472,8 @@ Backpack.Active = true
local GearGridScrollingArea = Instance.new("Frame")
GearGridScrollingArea.RobloxLocked = true
GearGridScrollingArea.Name = "GearGridScrollingArea"
GearGridScrollingArea.Position = UDim2.new(0.7,0,0,35)
GearGridScrollingArea.Size = UDim2.new(0,17,1,-45)
GearGridScrollingArea.Position = UDim2.new(1, -19, 0, 35)
GearGridScrollingArea.Size = UDim2.new(0, 17, 1, -45)
GearGridScrollingArea.BackgroundTransparency = 1
GearGridScrollingArea.Parent = Gear
@ -684,24 +767,24 @@ Backpack.Active = true
--CharacterPane Children
local FaceFrame = makeCharFrame("FacesFrame", CharacterPane)
game:GetService("ContentProvider"):Preload("http://www.roblox.com/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)
game:GetService("ContentProvider"):Preload("http://www.morblox.us/asset/?id=75460621")
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)
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)
local HatsFrame = makeCharFrame("HatsFrame", CharacterPane)
game:GetService("ContentProvider"):Preload("http://www.roblox.com/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)
game:GetService("ContentProvider"):Preload("http://www.morblox.us/asset/?id=75457888")
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("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)
local PantsFrame = makeCharFrame("PantsFrame", CharacterPane)
game:GetService("ContentProvider"):Preload("http://www.roblox.com/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)
game:GetService("ContentProvider"):Preload("http://www.morblox.us/asset/?id=75457920")
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")
pantFrame.RobloxLocked = true
@ -739,19 +822,19 @@ Backpack.Active = true
makeTextLabel("LeftArmLabel","Left Arm",UDim2.new(0.5,-16,0,-25),leftArmButton)
local TShirtFrame = makeCharFrame("T-ShirtsFrame",CharacterPane)
game:GetService("ContentProvider"):Preload("http://www.roblox.com/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)
game:GetService("ContentProvider"):Preload("http://www.morblox.us/asset/?id=75460642")
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)
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)
local ColorFrame = makeCharFrame("ColorFrame", CharacterPane)
game:GetService("ContentProvider"):Preload("http://www.roblox.com/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)
game:GetService("ContentProvider"):Preload("http://www.morblox.us/asset/?id=76049888")
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("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
@ -788,4 +871,5 @@ Backpack.Active = true
SaveButton.Parent = CharacterPane
-- no need for this to stick around
script:remove()
script:Destroy()

View File

@ -1,8 +1,6 @@
%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)
print("mamanger")
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
local function waitForChild(instance, name)
@ -56,6 +54,10 @@ local searchBox = waitForChild(backpack.SearchFrame.SearchBoxFrame,"SearchBox")
local searchButton = waitForChild(backpack.SearchFrame,"SearchButton")
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 readyForNextEvent = true
local backpackIsOpen = false
@ -63,12 +65,20 @@ local active = true
local humanoidDiedCon = nil
local backpackButtonPos
local guiTweenSpeed = 0.25 -- how quickly we open/close the backpack
local searchDefaultText = "Search..."
local tilde = "~"
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 ---------------------------
@ -120,6 +130,9 @@ function activateBackpack()
initHumanoidDiedConnections()
active = true
backpack.Visible = backpackIsOpen
if backpackIsOpen then
toggleBackpack()
end
end
function initHumanoidDiedConnections()
@ -139,7 +152,7 @@ local hideBackpack = function()
backpackCloseEvent:Fire(currentTab)
backpack.Tabs.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()
game.GuiService:RemoveCenterDialog(backpack)
backpack.Visible = false
@ -149,6 +162,7 @@ local hideBackpack = function()
game.GuiService:RemoveCenterDialog(backpack)
backpack.Visible = false
backpackButton.Selected = false
readyForNextEvent = true
canToggle = true
end)
end
@ -164,20 +178,22 @@ function showBackpack()
backpackButton.Selected = false
end)
backpack.Visible = 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)
backpackButton.Selected = 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()
backpack.Tabs.Visible = true
backpack.Tabs.Visible = false
searchFrame.Visible = true
backpackOpenEvent:Fire(currentTab)
canToggle = true
readyForNextEvent = true
backpackButton.Image = 'rbxasset://Textures/IPadInGameGUIToolbarBkpkTabTopV4.png'
backpackButton.Position = UDim2.new(0.5, -60, 1, -backpackSize.Y.Offset - 103)
end)
end
function toggleBackpack()
function toggleBackpack()
if not game.Players.LocalPlayer then return end
if not game.Players.LocalPlayer["Character"] then return end
if not canToggle then return end
if not readyForNextEvent then return end
readyForNextEvent = false
@ -185,11 +201,42 @@ function toggleBackpack()
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()
else
backpackButton.Selected = false
else
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()
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
@ -347,6 +394,7 @@ end)
if game.Players.LocalPlayer["Character"] then
activateBackpack()
end
game.Players.LocalPlayer.CharacterAdded:connect(activateBackpack)
-- search functions
@ -360,4 +408,9 @@ end)
searchButton.MouseButton1Click:connect(doSearch)
resetButton.MouseButton1Click:connect(resetSearch)
backpackButton.Visible = true
if searchFrame and robloxGui.AbsoluteSize.Y <= 320 then
searchFrame.RobloxLocked = false
searchFrame:Destroy()
end
--backpackButton.Visible = true

View File

@ -4,6 +4,7 @@ local function waitForChild(instance, name)
assert(instance)
assert(name)
while not instance:FindFirstChild(name) do
print('Waiting for ...', instance, name)
instance.ChildAdded:wait()
end
return instance:FindFirstChild(name)
@ -16,6 +17,13 @@ local function waitForProperty(instance, property)
end
end
local function IsTouchDevice()
local touchEnabled = false
pcall(function() touchEnabled = Game:GetService('UserInputService').TouchEnabled end)
return touchEnabled
end
waitForChild(game,"Players")
waitForProperty(game.Players,"LocalPlayer")
local player = game.Players.LocalPlayer
@ -67,7 +75,7 @@ local searchRequestedEvent = waitForChild(backpackManager,"SearchRequestedEvent"
local tellBackpackReadyFunc = waitForChild(backpackManager,"BackpackReady")
-- 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.Size = UDim2.new(1,0,1,-30)
@ -236,6 +244,7 @@ end
function previewGear(button)
if not browsingMenu then
gearPreview.Visible = false
gearPreview.GearImage.Image = button.Image
gearPreview.GearStats.GearName.Text = button.GearReference.Value.Name
end
@ -276,7 +285,7 @@ end
function resizeGrid()
for k,v in pairs(backpackItems) do
if not v:FindFirstChild("RobloxBuildTool") then
if not buttons[v] then
if not buttons[v] then
local buttonClone = gearButton:clone()
buttonClone.Parent = grid.ScrollingFrame
buttonClone.Visible = true
@ -289,18 +298,26 @@ function resizeGrid()
buttonClone.Draggable = true
buttons[v] = buttonClone
local unequipMenu = getGearContextMenu()
if not IsTouchDevice() then
local unequipMenu = getGearContextMenu()
unequipMenu.Visible = false
unequipMenu.Parent = buttonClone
unequipMenu.Visible = false
unequipMenu.Parent = buttonClone
end
local beginPos = nil
buttonClone.DragBegin:connect(function(value)
buttonClone.ZIndex = 9
waitForChild(buttonClone, 'Background')
buttonClone['Background'].ZIndex = 10
buttonClone.ZIndex = 10
beginPos = value
end)
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 not checkForSwap(buttonClone,x,y) then
buttonClone:TweenPosition(beginPos,Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.5, true)
@ -622,7 +639,7 @@ function nukeBackpack()
end
end
function getGearContextMenu()
function getGearContextMenu()
local gearContextMenu = Instance.new("Frame")
gearContextMenu.Active = true
gearContextMenu.Name = "UnequipContextMenu"
@ -671,27 +688,30 @@ function getGearContextMenu()
button.ZIndex = 9
button.Parent = gearContextMenuButton
button.MouseButton1Click:connect(function()
if button.Active and not gearContextMenu.Parent.Active then
local success, result = pcall(function() element.DoIt(element, gearContextMenu) end)
browsingMenu = false
gearContextMenu.Visible = false
clearHighlight(button)
clearPreview()
end
end)
button.MouseEnter:connect(function()
if button.Active and gearContextMenu.Parent.Active then
highlight(button)
end
end)
button.MouseLeave:connect(function()
if button.Active and gearContextMenu.Parent.Active then
clearHighlight(button)
end
end)
if not IsTouchDevice() then
button.MouseButton1Click:connect(function()
if button.Active and not gearContextMenu.Parent.Active then
local success, result = pcall(function() element.DoIt(element, gearContextMenu) end)
browsingMenu = false
gearContextMenu.Visible = false
clearHighlight(button)
clearPreview()
end
end)
button.MouseEnter:connect(function()
if button.Active and gearContextMenu.Parent.Active then
highlight(button)
end
end)
button.MouseLeave:connect(function()
if button.Active and gearContextMenu.Parent.Active then
clearHighlight(button)
end
end)
end
contextElement.Button = button
contextElement.Element = button
elseif element.Type == "Label" then

View File

@ -19,16 +19,47 @@ local StaticTabName = "gear"
local robloxGui = game:GetService("CoreGui"):FindFirstChild("RobloxGui")
assert(robloxGui)
local controlFrame = waitForChild(robloxGui, 'ControlFrame')
local backpackButton = waitForChild(controlFrame, 'BackpackButton')
local backpack = waitForChild(robloxGui, 'Backpack')
waitForChild(robloxGui,"CurrentLoadout")
waitForChild(robloxGui.CurrentLoadout,"TempSlot")
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
waitForChild(game,"Players")
waitForProperty(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")
game.LocalBackpack:SetOldSchoolBackpack(false)
@ -44,6 +75,10 @@ local resizeEvent = waitForChild(backpackManager,"ResizeEvent")
local inGearTab = true
local maxNumLoadoutItems = 10
if robloxGui.AbsoluteSize.Y <= 320 then
maxNumLoadoutItems = 4
end
local characterChildAddedCon = nil
local backpackChildCon = nil
@ -56,6 +91,8 @@ local buttonSizeNormal = UDim2.new(1,0,1,0)
local enlargeOverride = true
local guiTweenSpeed = 0.5
local firstInstanceOfLoadout = false
local inventory = {}
for i = 0, 9 do
@ -66,6 +103,8 @@ local gearSlots = {}
for i = 1, maxNumLoadoutItems do
gearSlots[i] = "empty"
end
local backpackWasOpened = false
--- End Locals
@ -74,6 +113,14 @@ end
-- Begin Functions
local function backpackIsOpen()
if guiBackpack then
return guiBackpack.Visible
end
return false
end
local function kill(prop,con,gear)
if con then con:disconnect() end
if prop == true and gear then
@ -118,15 +165,35 @@ function removeGear(gear)
gearSlots[emptySlot] = "empty"
local centerizeX = gear.Size.X.Scale/2
local centerizeY = gear.Size.Y.Scale/2
gear:TweenSizeAndPosition(UDim2.new(0,0,0,0),
local centerizeY = gear.Size.Y.Scale/2
--[[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),
Enum.EasingDirection.Out, Enum.EasingStyle.Quad,guiTweenSpeed/4,true)
delay(guiTweenSpeed/2,
Enum.EasingDirection.Out, Enum.EasingStyle.Quad,guiTweenSpeed/4,true)]]
delay(0,
function()
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
function insertGear(gear, addToSlot)
@ -320,8 +387,12 @@ enlargeButton = function(button)
return
end
if button:FindFirstChild('Highlight') then
button.Highlight.Visible = true
end
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 centerizeY = -(buttonSizeEnlarge.Y.Scale - button.Size.Y.Scale)/2
button:TweenSizeAndPosition(buttonSizeEnlarge,
@ -349,6 +420,10 @@ normalizeButton = function(button, speed)
local moveSpeed = speed
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
button.ZIndex = 1
local inverseEnlarge = 1/enlargeFactor
@ -463,7 +538,7 @@ function unequipAllItems(dontEquipThis)
end
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)
local xSize = button.ToolTipLabel.TextBounds.X + 6
button.ToolTipLabel.Size = UDim2.new(0,xSize,0,20)
@ -478,7 +553,7 @@ function hideToolTip(button, tip)
end
end
local addingPlayerChild = function(child, equipped, addToSlot, inventoryGearButton)
local addingPlayerChild = function(child, equipped, addToSlot, inventoryGearButton)
waitForDebounce()
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
debounce = false
return
end
end
end
end
local gearClone = currentLoadout.TempSlot:clone()
gearClone.Name = child.Name
gearClone.GearImage.Image = child.TextureId
@ -586,8 +660,8 @@ local addingPlayerChild = function(child, equipped, addToSlot, inventoryGearButt
end
end)
dragBegin = gearClone.DragBegin:connect(function(pos)
dragBeginPos = pos
gearClone.ZIndex = 7
dragBeginPos = pos
gearClone.ZIndex = 7
local children = gearClone:GetChildren()
for i = 1, #children do
if children[i]:IsA("TextLabel") then
@ -603,9 +677,9 @@ local addingPlayerChild = function(child, equipped, addToSlot, inventoryGearButt
end)
dragStop = gearClone.DragStopped:connect(function(x,y)
if gearClone.Selected then
gearClone.ZIndex = 2
gearClone.ZIndex = 4
else
gearClone.ZIndex = 1
gearClone.ZIndex = 3
end
local children = gearClone:GetChildren()
for i = 1, #children do
@ -665,6 +739,16 @@ local addingPlayerChild = function(child, equipped, addToSlot, inventoryGearButt
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
function addToInventory(child)
@ -700,16 +784,21 @@ local spreadOutGear = function()
if loadoutChildren[i]:IsA("Frame") then
loadoutChildren[i].BackgroundTransparency = 0.5
local slot = tonumber(string.sub(loadoutChildren[i].Name,5))
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 slot == 0 then slot = 10 end
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
local centerGear = function()
backpackWasOpened = true
loadoutChildren = currentLoadout:GetChildren()
local gearButtons = {}
local lastSlotAdd = nlii
local lastSlotAdd = nil
for i = 1, #loadoutChildren do
if loadoutChildren[i]:IsA("Frame") then
@ -726,12 +815,17 @@ local centerGear = function()
if lastSlotAdd then table.insert(gearButtons,lastSlotAdd) end
local startPos = ( 1 - (#gearButtons * 0.1) ) / 2
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)
for i = 1, #gearButtons do
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
function editLoadout()
function editLoadout()
if inGearTab then
spreadOutGear()
end
@ -743,12 +837,17 @@ function readonlyLoadout()
end
end
function setupBackpackListener()
function setupBackpackListener()
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)
addToInventory(child)
end)
end)
end
function playerCharacterChildAdded(child)
@ -772,24 +871,54 @@ function tabHandler(inFocus)
readonlyLoadout()
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
-- Begin Script
wait() -- let stuff initialize incase this is first heartbeat...
waitForChild(player,"Backpack")
waitForProperty(player,"Character")
local backpackChildren = player.Backpack:GetChildren()
local size = math.min(10,#backpackChildren)
for i = 1, size do
addingPlayerChild(backpackChildren[i],false)
end
setupBackpackListener()
-- 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
delay(1,function()
local backpackChildren = player.Backpack:GetChildren()
local size = math.min(10,#backpackChildren)
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")
for i,v in ipairs(player.Character:GetChildren()) do
@ -801,7 +930,7 @@ waitForChild(player.Character,"Humanoid")
humanoidDiedCon = player.Character.Humanoid.Died:connect(function()
if humanoidDiedCon then humanoidDiedCon:disconnect() humanoidDiedCon = nil end
deactivateLoadout()
if backpackChildCon then backpackChildCon:disconnect() backpackChildCon = nil end
if backpackChildCon then backpackChildCon:disconnect() backpackChildCon = nil end
end)
player.CharacterRemoving:connect(function()
@ -813,22 +942,25 @@ player.CharacterRemoving:connect(function()
end
end)
player.CharacterAdded:connect(function()
waitForProperty(game.Players,"LocalPlayer")
player.CharacterAdded:connect(function()
backpackWasOpened = false
waitForProperty(game.Players,"LocalPlayer")
player = game.Players.LocalPlayer -- make sure we are still looking at the correct character
waitForChild(player,"Backpack")
waitForChild(player,"Backpack")
delay(1,function()
local backpackChildren = player.Backpack:GetChildren()
local size = math.min(10,#backpackChildren)
for i = 1, size do
backpackButton.Visible = true
clBackground.Visible = true
addingPlayerChild(backpackChildren[i],false)
end
setupBackpackListener()
end)
activateLoadout()
activateLoadout()
if characterChildAddedCon then
characterChildAddedCon:disconnect()
@ -841,14 +973,23 @@ player.CharacterAdded:connect(function()
end)
waitForChild(player.Character,"Humanoid")
if backpack.Visible then
backpackOpenEvent:Fire()
end
humanoidDiedCon =
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 backpackChildCon then backpackChildCon:disconnect() backpackChildCon = nil end
end)
waitForChild(player, 'PlayerGui')
moveHealthBar(player.PlayerGui)
delay(0, handlePhoneLag)
end)
waitForChild(guiBackpack,"SwapSlot")

View File

@ -122,13 +122,13 @@ t.CreateStyledMessageDialog = function(title, message, style, buttons)
styleImage.Position = UDim2.new(0,5,0,15)
if style == "error" or style == "Error" then
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
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
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
return t.CreateMessageDialog(title,message,buttons)
end
@ -237,7 +237,7 @@ t.CreateDropDownMenu = function(items, onSelect, forRoblox)
local dropDownIcon = Instance.new("ImageLabel")
dropDownIcon.Name = "Icon"
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.Size = UDim2.new(0,11,0,6)
dropDownIcon.Position = UDim2.new(1,-11,0.5, -2)
@ -1330,7 +1330,7 @@ t.CreateScrollingFrame = function(orderList,scrollStyle)
local scrollStamp = 0
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.BackgroundTransparency = 1
scrollDrag.Name = "ScrollDrag"
@ -2603,7 +2603,7 @@ t.CreateSetPanel = function(userIdsForSets, objectSelected, dialogClosed, size,
local cancelImage = Instance.new("ImageLabel")
cancelImage.Name = "CancelImage"
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.Size = UDim2.new(0,16,0,16)
cancelImage.ZIndex = 6
@ -2805,7 +2805,7 @@ t.CreateSetPanel = function(userIdsForSets, objectSelected, dialogClosed, size,
local function createDropDownMenuButton(parent)
local dropDownButton = Instance.new("ImageButton")
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.Size = UDim2.new(0,16,0,16)
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
for i,v in pairs(materialNames) do
materialToImageMap[v] = {}
if v == "Grass" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=56563112"
elseif v == "Sand" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=62356652"
elseif v == "Brick" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=65961537"
elseif v == "Granite" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67532153"
elseif v == "Asphalt" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67532038"
elseif v == "Iron" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67532093"
elseif v == "Aluminum" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67531995"
elseif v == "Gold" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67532118"
elseif v == "Plastic (red)" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67531848"
elseif v == "Plastic (blue)" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67531924"
elseif v == "Plank" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67532015"
elseif v == "Log" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67532051"
elseif v == "Gravel" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67532206"
elseif v == "Cinder Block" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67532103"
elseif v == "Stone Wall" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67531804"
elseif v == "Concrete" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=67532059"
elseif v == "Water" then materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=81407474"
else materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=66887593" -- fill in the rest here!!
if v == "Grass" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=56563112"
elseif v == "Sand" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=62356652"
elseif v == "Brick" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=65961537"
elseif v == "Granite" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=67532153"
elseif v == "Asphalt" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=67532038"
elseif v == "Iron" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=67532093"
elseif v == "Aluminum" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=67531995"
elseif v == "Gold" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=67532118"
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.morblox.us/asset/?id=67531924"
elseif v == "Plank" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=67532015"
elseif v == "Log" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=67532051"
elseif v == "Gravel" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=67532206"
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.morblox.us/asset/?id=67531804"
elseif v == "Concrete" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=67532059"
elseif v == "Water" then materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=81407474"
else materialToImageMap[v].Regular = "http://www.morblox.us/asset/?id=66887593" -- fill in the rest here!!
end
end
@ -3355,7 +3355,7 @@ t.CreateTerrainMaterialSelector = function(size,position)
end
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")
loadingFrame.Name = "LoadingFrame"
@ -3376,7 +3376,7 @@ t.CreateLoadingFrame = function(name,size,position)
local loadingGreenBar = Instance.new("ImageLabel")
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.Size = UDim2.new(0,0,1,0)
loadingGreenBar.Visible = false

View File

@ -661,7 +661,7 @@ t.GetStampModel = function(assetId, terrainShape, useAssetVersionId)
if cellType == 3 then
local inverseCornerWedgeMesh = Instance.new("SpecialMesh")
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.Parent = newTerrainPiece
end

File diff suppressed because it is too large Load Diff

View File

@ -53,7 +53,7 @@ popupImage.Parent = popupFrame
local backing = Instance.new("ImageLabel")
backing.BackgroundTransparency = 1
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.ZIndex = 2
backing.Parent = popupImage

View File

@ -34,7 +34,7 @@ function makeFriend(fromPlayer,toPlayer)
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.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()
popup.Visible = true
@ -73,7 +73,7 @@ game.Players.FriendRequestEvent:connect(function(fromPlayer,toPlayer,event)
if event == Enum.FriendRequestEvent.Accept then
game:GetService("GuiService"):SendNotification("You are Friends",
"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,
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!
game:GetService("GuiService"):SendNotification("Friend Request",
"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,
function()
makeFriend(fromPlayer,toPlayer)
@ -92,7 +92,7 @@ game.Players.FriendRequestEvent:connect(function(fromPlayer,toPlayer,event)
elseif event == Enum.FriendRequestEvent.Accept then
game:GetService("GuiService"):SendNotification("You are Friends",
"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,
function()

View File

@ -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
function Chat:IsTouchDevice()
@ -503,85 +446,7 @@ function Chat:ScrollQueue(value)
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()
if self.ClickToChatButton then
@ -620,7 +485,7 @@ function Chat:CreateTouchButton()
Size = UDim2.new(1, 0, 1, 0);
Position = UDim2.new(0, 0, 0, 0);
BackgroundTransparency = 1.0;
Image = 'http://morblox.us/asset/?id=97078724'
Image = 'http://www.roblox.com/asset/?id=97078724'
};
}
self.TapToChatLabel = self.ChatTouchFrame.ChatLabel
@ -740,106 +605,7 @@ function Chat:ComputeSpaceString(pLabel)
return nString
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()
while self.Frame.AbsoluteSize.Y > 120 do
@ -864,7 +630,7 @@ function Chat:CreateGui()
Gui.Create'ImageLabel'
{
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);
Position = UDim2.new(0, 0, 0, 0);
BackgroundTransparency = 1.0;
@ -891,7 +657,7 @@ function Chat:CreateGui()
BackgroundTransparency = 1.0;
ClipsDescendants = true;
ZIndex = 0.0;
Visible = false;
};
};
@ -1042,7 +808,7 @@ function Chat:CreateSafeChatGui()
Size = UDim2.new(0, 44, 0, 31);
Position = UDim2.new(0, 1, 0.35, 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
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(?)
function Chat:LockAllFields(gui)

View File

@ -4,7 +4,7 @@ ob_start();
function sign($data) {
$PrivKey = file_get_contents("./PrivKey.pem");
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."])));
@ -55,8 +55,6 @@ if (file_exists($_SERVER["DOCUMENT_ROOT"] . "/asset/" . $id)){
sign($file);
}else if($id == 20){
sign($file);
}else if($id == 52177590){
sign($file);
}else{
echo $file;
}