Revert to compiled scripts for every corescript except for RbxGui

This commit is contained in:
Lewin Kelly 2023-04-22 14:03:31 +01:00
parent 9546433e44
commit 1cbc58e175
22 changed files with 19517 additions and 5002 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,52 +1,246 @@
local a,b,c,d,e,f,g,h,i,j=Game:GetService'ContextActionService',Game:GetService print("[Mercury]: Loaded corescript 152908679")
'UserInputService'.TouchEnabled,{},{},nil,nil, local New
'http://www.banland.xyz/asset/?id=97166756', New = function(className, name, props)
'http://www.banland.xyz/asset/?id=97166444',{},{[1]=UDim2.new(0,123,0,70),[2]= if not (props ~= nil) then
UDim2.new(0,30,0,60),[3]=UDim2.new(0,180,0,160),[4]=UDim2.new(0,85,0,-25),[5]= props = name
UDim2.new(0,185,0,-25),[6]=UDim2.new(0,185,0,260),[7]=UDim2.new(0,216,0,65)} name = nil
local k=#j Game:GetService'ContentProvider':Preload(g)Game:GetService end
'ContentProvider':Preload(h)while not Game.Players do wait()end while not Game. local obj = Instance.new(className)
Players.LocalPlayer do wait()end function createContextActionGui()if not e and b if name then
then e=Instance.new'ScreenGui'e.Name='ContextActionGui'f=Instance.new'Frame'f. obj.Name = name
BackgroundTransparency=1 f.Size=UDim2.new(0.3,0,0.5,0)f.Position=UDim2.new(0.7,0 end
,0.5,0)f.Name='ContextButtonFrame'f.Parent=e end end function contextButtonDown( local parent
l,m,n)if m.UserInputType==Enum.UserInputType.Touch then l.Image=g a: for k, v in pairs(props) do
CallFunction(n,Enum.UserInputState.Begin,m)end end function contextButtonMoved(l if type(k) == "string" then
,m,n)if m.UserInputType==Enum.UserInputType.Touch then l.Image=g a:CallFunction( if k == "Parent" then
n,Enum.UserInputState.Change,m)end end function contextButtonUp(l,m,n)l.Image=h parent = v
if m.UserInputType==Enum.UserInputType.Touch and m.UserInputState==Enum. else
UserInputState.End then a:CallFunction(n,Enum.UserInputState.End,m)end end obj[k] = v
function isSmallScreenDevice()return Game:GetService'GuiService': end
GetScreenResolution().y<=320 end function createNewButton(l,m)local n=Instance. elseif type(k) == "number" and type(v) == "userdata" then
new'ImageButton'n.Name='ContextActionButton'n.BackgroundTransparency=1 n.Size= v.Parent = obj
UDim2.new(0,90,0,90)n.Active=true if isSmallScreenDevice()then n.Size=UDim2.new( end
0,70,0,70)end n.Image=h n.Parent=f local o=nil Game:GetService'UserInputService' end
.InputEnded:connect(function(p)i[p]=nil end)n.InputBegan:connect(function(p)if i obj.Parent = parent
[p]then return end if p.UserInputState==Enum.UserInputState.Begin and o==nil return obj
then o=p contextButtonDown(n,p,l)end end)n.InputChanged:connect(function(p)if i[ end
p]then return end if o~=p then return end contextButtonMoved(n,p,l)end)n. local contextActionService = Game:GetService("ContextActionService")
InputEnded:connect(function(p)if i[p]then return end if o~=p then return end o= local isTouchDevice = Game:GetService("UserInputService").TouchEnabled
nil i[p]=true contextButtonUp(n,p,l)end)local p=Instance.new'ImageLabel'p.Name= local functionTable = { }
'ActionIcon'p.Position=UDim2.new(0.175,0,0.175,0)p.Size=UDim2.new(0.65,0,0.65,0) local buttonVector = { }
p.BackgroundTransparency=1 if m['image']and type(m['image'])=='string'then p. local buttonScreenGui
Image=m['image']end p.Parent=n local q=Instance.new'TextLabel'q.Name= local buttonFrame
'ActionTitle'q.Size=UDim2.new(1,0,1,0)q.BackgroundTransparency=1 q.Font=Enum. local ContextDownImage = "http://www.banland.xyz/asset/?id=97166756"
Font.SourceSansBold q.TextColor3=Color3.new(1,1,1)q.TextStrokeTransparency=0 q. local ContextUpImage = "http://www.banland.xyz/asset/?id=97166444"
FontSize=Enum.FontSize.Size18 q.TextWrapped=true q.Text=''if m['title']and type( local oldTouches = { }
m['title'])=='string'then q.Text=m['title']end q.Parent=n return n end function local buttonPositionTable = {
createButton(l,m)local n,o=createNewButton(l,m),nil for p=1,#d do if d[p]== UDim2.new(0, 123, 0, 70),
'empty'then o=p break end end if not o then o=#d+1 end if o>k then return end d[ UDim2.new(0, 30, 0, 60),
o]=n c[l]['button']=n n.Position=j[o]n.Parent=f if e and e.Parent==nil then e. UDim2.new(0, 180, 0, 160),
Parent=Game.Players.LocalPlayer.PlayerGui end end function removeAction(l)if not UDim2.new(0, 85, 0, -25),
c[l]then return end local m=c[l]['button']if m then m.Parent=nil for n=1,#d do UDim2.new(0, 185, 0, -25),
if d[n]==m then d[n]='empty'break end end m:Destroy()end c[l]=nil end function UDim2.new(0, 185, 0, 260),
addAction(l,m,n)if c[l]then removeAction(l)end c[l]={n}if m and b then UDim2.new(0, 216, 0, 65)
createContextActionGui()createButton(l,n)end end a.BoundActionChanged:connect( }
function(l,m,n)if c[l]and n then local o=c[l]['button']if o then if m=='image' local maxButtons = #buttonPositionTable
then o.ActionIcon.Image=n[m]elseif m=='title'then o.ActionTitle.Text=n[m]elseif do
m=='position'then o.Position=n[m]end end end end)a.BoundActionAdded:connect( local _with_0 = Game:GetService("ContentProvider")
function(l,m,n)addAction(l,m,n)end)a.BoundActionRemoved:connect(function(l,m) _with_0:Preload(ContextDownImage)
removeAction(l)end)a.GetActionButtonEvent:connect(function(l)if c[l]then a: _with_0:Preload(ContextUpImage)
FireActionButtonFoundSignal(l,c[l]['button'])end end)local l=a: end
GetAllBoundActionInfo()for m,n in pairs(l)do addAction(m,n['createTouchButton'], while not Game.Players do
n)end wait()
end
while not Game.Players.LocalPlayer do
wait()
end
local createContextActionGui
createContextActionGui = function()
if not buttonScreenGui and isTouchDevice then
buttonScreenGui = New("ScreenGui", "ContextActionGui", {
New("Frame", "ContextButtonFrame", {
BackgroundTransparency = 1,
Size = UDim2.new(0.3, 0, 0.5, 0),
Position = UDim2.new(0.7, 0, 0.5, 0)
})
})
end
end
local contextButtonDown
contextButtonDown = function(button, inputObject, actionName)
if inputObject.UserInputType == Enum.UserInputType.Touch then
button.Image = ContextDownImage
return contextActionService:CallFunction(actionName, Enum.UserInputState.Begin)
end
end
local contextButtonMoved
contextButtonMoved = function(button, inputObject, actionName)
if inputObject.UserInputType == Enum.UserInputType.Touch then
button.Image = ContextDownImage
return contextActionService:CallFunction(actionName, Enum.UserInputState.Change)
end
end
local contextButtonUp
contextButtonUp = function(button, inputObject, actionName)
button.Image = ContextUpImage
if inputObject.UserInputType == Enum.UserInputType.Touch and inputObject.UserInputState == Enum.UserInputState.End then
return contextActionService:CallFunction(actionName, Enum.UserInputState.End, inputObject)
end
end
local isSmallScreenDevice
isSmallScreenDevice = function()
return Game:GetService("GuiService"):GetScreenResolution().y <= 320
end
local createNewButton
createNewButton = function(actionName, functionInfoTable)
local contextButton = New("ImageButton", "ContextActionButton", {
BackgroundTransparency = 1,
Size = UDim2.new((function()
if isSmallScreenDevice() then
return 0, 90, 0, 90
else
return 0, 70, 0, 70
end
end)()),
Active = true,
Image = ContextUpImage,
Parent = buttonFrame
})
local currentButtonTouch
Game:GetService("UserInputService").InputEnded:connect(function(inputObject)
oldTouches[inputObject] = nil
end)
contextButton.InputBegan:connect(function(inputObject)
if oldTouches[inputObject] then
return
end
if inputObject.UserInputState == Enum.UserInputState.Begin and not (currentButtonTouch ~= nil) then
currentButtonTouch = inputObject
return contextButtonDown(contextButton, inputObject, actionName)
end
end)
contextButton.InputChanged:connect(function(inputObject)
if oldTouches[inputObject] or currentButtonTouch ~= inputObject then
return
end
return contextButtonMoved(contextButton, inputObject, actionName)
end)
contextButton.InputEnded:connect(function(inputObject)
if oldTouches[inputObject] or currentButtonTouch ~= inputObject then
return
end
currentButtonTouch = nil
oldTouches[inputObject] = true
return contextButtonUp(contextButton, inputObject, actionName)
end)
local actionIcon = New("ImageLabel", "ActionIcon", {
Position = UDim2.new(0.175, 0, 0.175, 0),
Size = UDim2.new(0.65, 0, 0.65, 0),
BackgroundTransparency = 1
})
if functionInfoTable["image"] and type(functionInfoTable["image"]) == "string" then
actionIcon.Image = functionInfoTable["image"]
end
actionIcon.Parent = contextButton
local actionTitle = New("TextLabel", "ActionTitle", {
Size = UDim2.new(1, 0, 1, 0),
BackgroundTransparency = 1,
Font = Enum.Font.SourceSansBold,
TextColor3 = Color3.new(1, 1, 1),
TextStrokeTransparency = 0,
FontSize = Enum.FontSize.Size18,
TextWrapped = true,
Text = ""
})
if functionInfoTable["title"] and type(functionInfoTable["title"]) == "string" then
actionTitle.Text = functionInfoTable["title"]
end
actionTitle.Parent = contextButton
return contextButton
end
local createButton
createButton = function(actionName, functionInfoTable)
local button = createNewButton(actionName, functionInfoTable)
local position
for i = 1, #buttonVector do
if buttonVector[i] == "empty" then
position = i
break
end
end
if not position then
position = #buttonVector + 1
end
if position > maxButtons then
return
end
buttonVector[position] = button
functionTable[actionName]["button"] = button
button.Position = buttonPositionTable[position]
button.Parent = buttonFrame
if buttonScreenGui and not (buttonScreenGui.Parent ~= nil) then
buttonScreenGui.Parent = Game.Players.LocalPlayer.PlayerGui
end
end
local removeAction
removeAction = function(actionName)
if not functionTable[actionName] then
return
end
local actionButton = functionTable[actionName]["button"]
if actionButton then
actionButton.Parent = nil
for i = 1, #buttonVector do
if buttonVector[i] == actionButton then
buttonVector[i] = "empty"
break
end
end
actionButton:Destroy()
end
functionTable[actionName] = nil
end
local addAction
addAction = function(actionName, createTouchButton, functionInfoTable)
if functionTable[actionName] then
removeAction(actionName)
end
functionTable[actionName] = {
functionInfoTable
}
if createTouchButton and isTouchDevice then
createContextActionGui()
return createButton(actionName, functionInfoTable)
end
end
contextActionService.BoundActionChanged:connect(function(actionName, changeName, changeTable)
if functionTable[actionName] and changeTable then
do
local button = functionTable[actionName]["button"]
if button then
if changeName == "image" then
button.ActionIcon.Image = changeTable[changeName]
elseif changeName == "title" then
button.ActionTitle.Text = changeTable[changeName]
elseif changeName == "position" then
button.Position = changeTable[changeName]
end
end
end
end
end)
contextActionService.BoundActionAdded:connect(function(actionName, createTouchButton, functionInfoTable)
return addAction(actionName, createTouchButton, functionInfoTable)
end)
contextActionService.BoundActionRemoved:connect(function(actionName, _)
return removeAction(actionName)
end)
contextActionService.GetActionButtonEvent:connect(function(actionName)
if functionTable[actionName] then
return contextActionService:FireActionButtonFoundSignal(actionName, functionTable[actionName]["button"])
end
end)
local boundActions = contextActionService:GetAllBoundActionInfo()
for actionName, actionData in pairs(boundActions) do
addAction(actionName, actionData["createTouchButton"], actionData)
end

View File

@ -1,112 +1,527 @@
while not Game do wait()end while not Game:FindFirstChild'Players'do wait()end print("[Mercury]: Loaded corescript 153556783")
while not Game.Players.LocalPlayer do wait()end while not Game:FindFirstChild local New
'CoreGui'do wait()end while not Game.CoreGui:FindFirstChild'RobloxGui'do wait() New = function(className, name, props)
end local a=Game:GetService'UserInputService'local b=pcall(function()a: if not (props ~= nil) then
IsLuaTouchControls()end)if not b then script:Destroy()end local c=Game: props = name
GetService'GuiService':GetScreenResolution()function isSmallScreenDevice()return name = nil
c.y<=320 end local d,e=Game.Players.LocalPlayer,120 if isSmallScreenDevice()then end
e=70 end local f,g,h,i,j='rbxasset://textures/ui/TouchControlsSheet.png',5,0.92, local obj = Instance.new(className)
{},90 if isSmallScreenDevice()then j=70 end local k,l,m={},nil,0.007 local n,o,p if name then
,q=m*16,0.03,0.2,nil Game:GetService'ContentProvider':Preload(f)function obj.Name = name
DistanceBetweenTwoPoints(r,s)local t,u=s.x-r.x,s.y-r.y return math.sqrt((t*t)+(u end
*u))end function transformFromCenterToTopLeft(r,s)return UDim2.new(0,r.x-s. local parent
AbsoluteSize.x/2,0,r.y-s.AbsoluteSize.y/2)end function rotatePointAboutLocation( for k, v in pairs(props) do
r,s,t)local u,v,w=math.sin(t),math.cos(t),r w=Vector2.new(w.x-s.x,w.y-s.y)local if type(k) == "string" then
x,y=w.x*v-w.y*u,w.x*u+w.y*v w=Vector2.new(x+s.x,y+s.y)return w end function if k == "Parent" then
dotProduct(r,s)return((r.x*s.x)+(r.y*s.y))end function parent = v
stationaryThumbstickTouchMove(r,s,t)local u=Vector2.new(s.Position.X.Offset+s. else
AbsoluteSize.x/2,s.Position.Y.Offset+s.AbsoluteSize.y/2)local v= obj[k] = v
DistanceBetweenTwoPoints(t,u)if v>(e/2)then local w=Vector2.new(t.x-u.x,t.y-u.y) end
local x=w.unit if x.x==math.nan or x.x==math.inf then x=Vector2.new(0,x.y)end if elseif type(k) == "number" and type(v) == "userdata" then
x.y==math.nan or x.y==math.inf then x=Vector2.new(x.x,0)end local y=u+(x*(e/2))r v.Parent = obj
.Position=transformFromCenterToTopLeft(y,r)else r.Position= end
transformFromCenterToTopLeft(t,r)end return Vector2.new(r.Position.X.Offset-s. end
Position.X.Offset,r.Position.Y.Offset-s.Position.Y.Offset)end function obj.Parent = parent
followThumbstickTouchMove(r,s,t)local u=Vector2.new(s.Position.X.Offset+s. return obj
AbsoluteSize.x/2,s.Position.Y.Offset+s.AbsoluteSize.y/2)if end
DistanceBetweenTwoPoints(t,u)>e/2 then local v=Vector2.new(r.Position.X.Offset+r while not Game do
.AbsoluteSize.x/2,r.Position.Y.Offset+r.AbsoluteSize.y/2)local w,x=Vector2.new(t wait()
.x-v.x,t.y-v.y).unit,Vector2.new(v.x-u.x,v.y-u.y)local y,z=x.unit,Vector2.new(t. end
x-v.x,t.y-v.y)local A=(y.x*w.y)-(y.y*w.x)local B=math.atan2(A,dotProduct(y,w)) while not Game:FindFirstChild("Players") do
local C=B*math.min(z.magnitude/x.magnitude,1)if math.abs(C)>0.00001 then local D wait()
=rotatePointAboutLocation(u,v,C)s.Position=transformFromCenterToTopLeft(Vector2. end
new(D.x,D.y),s)end s.Position=UDim2.new(0,s.Position.X.Offset+z.x,0,s.Position.Y while not Game.Players.LocalPlayer do
.Offset+z.y)end r.Position=transformFromCenterToTopLeft(t,r)local v,w=Vector2. wait()
new(r.Position.X.Offset,r.Position.Y.Offset),Vector2.new(s.Position.X.Offset,s. end
Position.Y.Offset)if DistanceBetweenTwoPoints(v,w)>e/2 then local x=(w-v).unit*e while not Game:FindFirstChild("CoreGui") do
/2 s.Position=UDim2.new(0,v.x+x.x,0,v.y+x.y)end return Vector2.new(r.Position.X. wait()
Offset-s.Position.X.Offset,r.Position.Y.Offset-s.Position.Y.Offset)end function end
movementOutsideDeadZone(r)return((math.abs(r.x)>g)or(math.abs(r.y)>g))end while not Game.CoreGui:FindFirstChild("RobloxGui") do
function constructThumbstick(r,s,t)local u=Instance.new'Frame'u.Name= wait()
'ThumbstickFrame'u.Active=true u.Size=UDim2.new(0,e,0,e)u.Position=r u. end
BackgroundTransparency=1 local v=Instance.new'ImageLabel'v.Name= local userInputService = Game:GetService("UserInputService")
'OuterThumbstick'v.Image=f v.ImageRectOffset=Vector2.new(0,0)v.ImageRectSize= local success = pcall(function()
Vector2.new(220,220)v.BackgroundTransparency=1 v.Size=UDim2.new(0,e,0,e)v. return userInputService:IsLuaTouchControls()
Position=r v.Parent=Game.CoreGui.RobloxGui local w=Instance.new'ImageLabel'w. end)
Name='InnerThumbstick'w.Image=f w.ImageRectOffset=Vector2.new(220,0)w. if not success then
ImageRectSize=Vector2.new(111,111)w.BackgroundTransparency=1 w.Size=UDim2.new(0, script:Destroy()
e/2,0,e/2)w.Position=UDim2.new(0,u.Size.X.Offset/2-e/4,0,u.Size.Y.Offset/2-e/4)w end
.Parent=u w.ZIndex=2 local x,y,z=nil,nil,nil local A=function(A)if x then return local screenResolution = Game:GetService("GuiService"):GetScreenResolution()
end if A==q then return end if A==l then return end if A.UserInputType~=Enum. local isSmallScreenDevice
UserInputType.Touch then return end x=A table.insert(i,x)u.Position= isSmallScreenDevice = function()
transformFromCenterToTopLeft(x.Position,u)v.Position=u.Position y=a.TouchMoved: return screenResolution.y <= 320
connect(function(B)if B==x then local C=nil if t then C= end
stationaryThumbstickTouchMove(u,v,Vector2.new(B.Position.x,B.Position.y))else C= local localPlayer = Game.Players.LocalPlayer
followThumbstickTouchMove(u,v,Vector2.new(B.Position.x,B.Position.y))end if s local thumbstickSize = 120
then s(C,v.Size.X.Offset/2)end end end)z=a.TouchEnded:connect(function(B)if B==x if isSmallScreenDevice() then
then if s then s(Vector2.new(0,0),1)end z:disconnect()y:disconnect()u.Position=r thumbstickSize = 70
v.Position=r for C,D in pairs(i)do if D==x then table.remove(i,C)break end end x end
=nil end end)end a.Changed:connect(function(B)if B=='ModalEnabled'then u.Visible local touchControlsSheet = "rbxasset://textures/ui/TouchControlsSheet.png"
=not a.ModalEnabled v.Visible=not a.ModalEnabled end end)u.InputBegan:connect(A) local ThumbstickDeadZone = 5
return u end function setupCharacterMovement(r)local s,t=nil local u=d. local ThumbstickMaxPercentGive = 0.92
MoveCharacter local v,w=function(v,w)if d then if movementOutsideDeadZone(v)then local thumbstickTouches = { }
s=v t=w if v.magnitude/w>h then w=v.magnitude-1 end u(d,v,w)else s=Vector2.new(0 local jumpButtonSize = 90
,0)t=1 u(d,s,t)end end end,UDim2.new(0,e/2,1,-e*1.75)if isSmallScreenDevice() if isSmallScreenDevice() then
then w=UDim2.new(0,(e/2)-10,1,-e-20)end local x=constructThumbstick(w,v,false)x. jumpButtonSize = 70
Name='CharacterThumbstick'x.Parent=r local y=function()if d and u and s and t end
then u(d,s,t)end end return y end function setupJumpButton(r)local s=Instance. local oldJumpTouches = { }
new'ImageButton's.Name='JumpButton's.BackgroundTransparency=1 s.Image=f s. local currentJumpTouch
ImageRectOffset=Vector2.new(176,222)s.ImageRectSize=Vector2.new(174,174)s.Size= local CameraRotateSensitivity = 0.007
UDim2.new(0,j,0,j)if isSmallScreenDevice()then s.Position=UDim2.new(1,-(j*2.25), local CameraRotateDeadZone = CameraRotateSensitivity * 16
1,-j-20)else s.Position=UDim2.new(1,-(j*2.75),1,-j-120)end local t=d. local CameraZoomSensitivity = 0.03
JumpCharacter local u=function()while l do if d then t(d)end wait( local PinchZoomDelay = 0.2
1.6666666666666665E-2)end end s.InputBegan:connect(function(v)if v.UserInputType local cameraTouch
~=Enum.UserInputType.Touch then return end if l then return end if v==q then Game:GetService("ContentProvider"):Preload(touchControlsSheet)
return end for w,x in pairs(k)do if x==v then return end end l=v s. local DistanceBetweenTwoPoints
ImageRectOffset=Vector2.new(0,222)s.ImageRectSize=Vector2.new(174,174)u()end)s. DistanceBetweenTwoPoints = function(point1, point2)
InputEnded:connect(function(v)if v.UserInputType~=Enum.UserInputType.Touch then local dx = point2.x - point1.x
return end s.ImageRectOffset=Vector2.new(176,222)s.ImageRectSize=Vector2.new(174 local dy = point2.y - point1.y
,174)if v==l then table.insert(k,l)l=nil end end)a.InputEnded:connect(function(v return math.sqrt(dx * dx + dy * dy)
)for w,x in pairs(k)do if x==v then table.remove(k,w)break end end end)a.Changed end
:connect(function(v)if v=='ModalEnabled'then s.Visible=not a.ModalEnabled end local transformFromCenterToTopLeft
end)s.Parent=r end function isTouchUsedByJumpButton(r)if r==l then return true transformFromCenterToTopLeft = function(pointToTranslate, guiObject)
end for s,t in pairs(k)do if r==t then return true end end return false end return UDim2.new(0, pointToTranslate.x - guiObject.AbsoluteSize.x / 2, 0, pointToTranslate.y - guiObject.AbsoluteSize.y / 2)
function isTouchUsedByThumbstick(r)for s,t in pairs(i)do if r==t then return end
true end end return false end function setupCameraControl(r,s)local t,u,v,w,x,y, local rotatePointAboutLocation
z,A,B=nil,false,a.RotateCamera,-1,false,nil,a.ZoomCamera,{},nil local C,D= rotatePointAboutLocation = function(pointToRotate, pointToRotateAbout, radians)
function()q=nil u=false t=nil end,function()A={}y=nil x=false B:Destroy()B=nil local sinAnglePercent = math.sin(radians)
end local E=function(E,F)if B then B:Destroy()end B=Instance.new'Frame'B.Name= local cosAnglePercent = math.cos(radians)
'PinchFrame'B.BackgroundTransparency=1 B.Parent=r B.Size=UDim2.new(1,0,1,0)B. local transformedPoint = pointToRotate
InputChanged:connect(function(G)if not x then D()return end C()if y==nil then if transformedPoint = Vector2.new(transformedPoint.x - pointToRotateAbout.x, transformedPoint.y - pointToRotateAbout.y)
G==E then y=(G.Position-F.Position).magnitude E=G elseif G==F then y=(G.Position local xNew = transformedPoint.x * cosAnglePercent - transformedPoint.y * sinAnglePercent
-E.Position).magnitude F=G end else local H=0 if G==E then H=(G.Position-F. local yNew = transformedPoint.x * sinAnglePercent + transformedPoint.y * cosAnglePercent
Position).magnitude E=G elseif G==F then H=(G.Position-E.Position).magnitude F=G transformedPoint = Vector2.new(xNew + pointToRotateAbout.x, yNew + pointToRotateAbout.y)
end if H~=0 then local I=H-y if I~=0 then z(a,(I*o))end y=H end end end)B. return transformedPoint
InputEnded:connect(function(G)if G==E or G==F then D()end end)end local F= end
function(F)if#A<1 then table.insert(A,F)w=tick()x=false elseif#A==1 then x=(( local dotProduct
tick()-w)<=p)if x then table.insert(A,F)E(A[1],A[2])else A={}end end end r. dotProduct = function(v1, v2)
InputBegan:connect(function(G)if G.UserInputType~=Enum.UserInputType.Touch then return v1.x * v2.x + v1.y * v2.y
return end if isTouchUsedByJumpButton(G)then return end local H= end
isTouchUsedByThumbstick(G)if not H then F(G)end if q==nil and not H then q=G t= local stationaryThumbstickTouchMove
Vector2.new(q.Position.x,q.Position.y)end end)a.InputChanged:connect(function(G) stationaryThumbstickTouchMove = function(thumbstickFrame, thumbstickOuter, touchLocation)
if G.UserInputType~=Enum.UserInputType.Touch then return end if q~=G then return local thumbstickOuterCenterPosition = Vector2.new(thumbstickOuter.Position.X.Offset + thumbstickOuter.AbsoluteSize.x / 2, thumbstickOuter.Position.Y.Offset + thumbstickOuter.AbsoluteSize.y / 2)
end local H=Vector2.new(q.Position.x,q.Position.y)local I=(t-H)*m if not u and(I local centerDiff = DistanceBetweenTwoPoints(touchLocation, thumbstickOuterCenterPosition)
.magnitude>n)then u=true t=H end if u and(t~=H)then v(a,I)s()t=H end end)a. if centerDiff > (thumbstickSize / 2) then
InputEnded:connect(function(G)if q==G or q==nil then C()end for H,I in pairs(A) local thumbVector = Vector2.new(touchLocation.x - thumbstickOuterCenterPosition.x, touchLocation.y - thumbstickOuterCenterPosition.y)
do if I==G then table.remove(A,H)end end end)end function setupTouchControls() local normal = thumbVector.unit
local r=Instance.new'Frame'r.Name='TouchControlFrame'r.Size=UDim2.new(1,0,1,0)r. if normal.x == math.nan or normal.x == math.inf then
BackgroundTransparency=1 r.Parent=Game.CoreGui.RobloxGui local s= normal = Vector2.new(0, normal.y)
setupCharacterMovement(r)setupJumpButton(r)setupCameraControl(r,s)a. end
ProcessedEvent:connect(function(t,u)if not u then return end if t==q and t. if normal.y == math.nan or normal.y == math.inf then
UserInputState==Enum.UserInputState.Begin then q=nil end end)end do normal = Vector2.new(normal.x, 0)
setupTouchControls()end end
local newThumbstickInnerPosition = thumbstickOuterCenterPosition + (normal * (thumbstickSize / 2))
thumbstickFrame.Position = transformFromCenterToTopLeft(newThumbstickInnerPosition, thumbstickFrame)
else
thumbstickFrame.Position = transformFromCenterToTopLeft(touchLocation, thumbstickFrame)
end
return Vector2.new(thumbstickFrame.Position.X.Offset - thumbstickOuter.Position.X.Offset, thumbstickFrame.Position.Y.Offset - thumbstickOuter.Position.Y.Offset)
end
local followThumbstickTouchMove
followThumbstickTouchMove = function(thumbstickFrame, thumbstickOuter, touchLocation)
local thumbstickOuterCenter = Vector2.new(thumbstickOuter.Position.X.Offset + thumbstickOuter.AbsoluteSize.x / 2, thumbstickOuter.Position.Y.Offset + thumbstickOuter.AbsoluteSize.y / 2)
if DistanceBetweenTwoPoints(touchLocation, thumbstickOuterCenter) > thumbstickSize / 2 then
local thumbstickInnerCenter = Vector2.new(thumbstickFrame.Position.X.Offset + thumbstickFrame.AbsoluteSize.x / 2, thumbstickFrame.Position.Y.Offset + thumbstickFrame.AbsoluteSize.y / 2)
local movementVectorUnit = Vector2.new(touchLocation.x - thumbstickInnerCenter.x, touchLocation.y - thumbstickInnerCenter.y).unit
local outerToInnerVectorCurrent = Vector2.new(thumbstickInnerCenter.x - thumbstickOuterCenter.x, thumbstickInnerCenter.y - thumbstickOuterCenter.y)
local outerToInnerVectorCurrentUnit = outerToInnerVectorCurrent.unit
local movementVector = Vector2.new(touchLocation.x - thumbstickInnerCenter.x, touchLocation.y - thumbstickInnerCenter.y)
local crossOuterToInnerWithMovement = (outerToInnerVectorCurrentUnit.x * movementVectorUnit.y) - (outerToInnerVectorCurrentUnit.y * movementVectorUnit.x)
local angle = math.atan2(crossOuterToInnerWithMovement, dotProduct(outerToInnerVectorCurrentUnit, movementVectorUnit))
local anglePercent = angle * math.min(movementVector.magnitude / outerToInnerVectorCurrent.magnitude, 1.0)
if math.abs(anglePercent) > 0.00001 then
local outerThumbCenter = rotatePointAboutLocation(thumbstickOuterCenter, thumbstickInnerCenter, anglePercent)
thumbstickOuter.Position = transformFromCenterToTopLeft(Vector2.new(outerThumbCenter.x, outerThumbCenter.y), thumbstickOuter)
end
thumbstickOuter.Position = UDim2.new(0, thumbstickOuter.Position.X.Offset + movementVector.x, 0, thumbstickOuter.Position.Y.Offset + movementVector.y)
end
thumbstickFrame.Position = transformFromCenterToTopLeft(touchLocation, thumbstickFrame)
local thumbstickFramePosition = Vector2.new(thumbstickFrame.Position.X.Offset, thumbstickFrame.Position.Y.Offset)
local thumbstickOuterPosition = Vector2.new(thumbstickOuter.Position.X.Offset, thumbstickOuter.Position.Y.Offset)
if DistanceBetweenTwoPoints(thumbstickFramePosition, thumbstickOuterPosition) > thumbstickSize / 2 then
local vectorWithLength = (thumbstickOuterPosition - thumbstickFramePosition).unit * thumbstickSize / 2
thumbstickOuter.Position = UDim2.new(0, thumbstickFramePosition.x + vectorWithLength.x, 0, thumbstickFramePosition.y + vectorWithLength.y)
end
return Vector2.new(thumbstickFrame.Position.X.Offset - thumbstickOuter.Position.X.Offset, thumbstickFrame.Position.Y.Offset - thumbstickOuter.Position.Y.Offset)
end
local movementOutsideDeadZone
movementOutsideDeadZone = function(movementVector)
return (math.abs(movementVector.x) > ThumbstickDeadZone) or (math.abs(movementVector.y) > ThumbstickDeadZone)
end
local constructThumbstick
constructThumbstick = function(defaultThumbstickPos, updateFunction, stationaryThumbstick)
local thumbstickFrame = New("Frame", "ThumbstickFrame", {
Active = true,
Size = UDim2.new(0, thumbstickSize, 0, thumbstickSize),
Position = defaultThumbstickPos,
BackgroundTransparency = 1
})
New("ImageLabel", "InnerThumbstick", {
Image = touchControlsSheet,
ImageRectOffset = Vector2.new(220, 0),
ImageRectSize = Vector2.new(111, 111),
BackgroundTransparency = 1,
Size = UDim2.new(0, thumbstickSize / 2, 0, thumbstickSize / 2),
Position = UDim2.new(0, thumbstickFrame.Size.X.Offset / 2 - thumbstickSize / 4, 0, thumbstickFrame.Size.Y.Offset / 2 - thumbstickSize / 4),
ZIndex = 2,
Parent = thumbstickFrame
})
local outerThumbstick = New("ImageLabel", "OuterThumbstick", {
Image = touchControlsSheet,
ImageRectOffset = Vector2.new(0, 0),
ImageRectSize = Vector2.new(220, 220),
BackgroundTransparency = 1,
Size = UDim2.new(0, thumbstickSize, 0, thumbstickSize),
Position = defaultThumbstickPos,
Parent = Game.CoreGui.RobloxGui
})
local thumbstickTouch
local userInputServiceTouchMovedCon
local userInputSeviceTouchEndedCon
local startInputTracking
startInputTracking = function(inputObject)
if thumbstickTouch then
return
end
if inputObject == cameraTouch then
return
end
if inputObject == currentJumpTouch then
return
end
if inputObject.UserInputType ~= Enum.UserInputType.Touch then
return
end
thumbstickTouch = inputObject
table.insert(thumbstickTouches, thumbstickTouch)
thumbstickFrame.Position = transformFromCenterToTopLeft(thumbstickTouch.Position, thumbstickFrame)
outerThumbstick.Position = thumbstickFrame.Position
userInputServiceTouchMovedCon = userInputService.TouchMoved:connect(function(movedInput)
if movedInput == thumbstickTouch then
local movementVector
if stationaryThumbstick then
movementVector = stationaryThumbstickTouchMove(thumbstickFrame, outerThumbstick, Vector2.new(movedInput.Position.x, movedInput.Position.y))
else
movementVector = followThumbstickTouchMove(thumbstickFrame, outerThumbstick, Vector2.new(movedInput.Position.x, movedInput.Position.y))
end
if updateFunction then
return updateFunction(movementVector, outerThumbstick.Size.X.Offset / 2)
end
end
end)
userInputSeviceTouchEndedCon = userInputService.TouchEnded:connect(function(endedInput)
if endedInput == thumbstickTouch then
if updateFunction then
updateFunction(Vector2.new(0, 0), 1)
end
userInputSeviceTouchEndedCon:disconnect()
userInputServiceTouchMovedCon:disconnect()
thumbstickFrame.Position = defaultThumbstickPos
outerThumbstick.Position = defaultThumbstickPos
for i, object in pairs(thumbstickTouches) do
if object == thumbstickTouch then
table.remove(thumbstickTouches, i)
break
end
end
thumbstickTouch = nil
end
end)
end
userInputService.Changed:connect(function(prop)
if prop == "ModalEnabled" then
do
local _tmp_0 = not userInputService.ModalEnabled
thumbstickFrame.Visible = _tmp_0
outerThumbstick.Visible = _tmp_0
end
end
end)
thumbstickFrame.InputBegan:connect(startInputTracking)
return thumbstickFrame
end
local setupCharacterMovement
setupCharacterMovement = function(parentFrame)
local lastMovementVector, lastMaxMovement
local moveCharacterFunc = localPlayer.MoveCharacter
local moveCharacterFunction
moveCharacterFunction = function(movementVector, maxMovement)
if localPlayer then
if movementOutsideDeadZone(movementVector) then
lastMovementVector = movementVector
lastMaxMovement = maxMovement
if movementVector.magnitude / maxMovement > ThumbstickMaxPercentGive then
maxMovement = movementVector.magnitude - 1
end
return moveCharacterFunc(localPlayer, movementVector, maxMovement)
else
lastMovementVector = Vector2.new(0, 0)
lastMaxMovement = 1
return moveCharacterFunc(localPlayer, lastMovementVector, lastMaxMovement)
end
end
end
local thumbstickPos = UDim2.new(0, thumbstickSize / 2, 1, -thumbstickSize * 1.75)
if isSmallScreenDevice() then
thumbstickPos = UDim2.new(0, (thumbstickSize / 2) - 10, 1, -thumbstickSize - 20)
end
local characterThumbstick = constructThumbstick(thumbstickPos, moveCharacterFunction, false)
characterThumbstick.Name = "CharacterThumbstick"
characterThumbstick.Parent = parentFrame
local refreshCharacterMovement
refreshCharacterMovement = function()
if localPlayer and moveCharacterFunc and lastMovementVector and lastMaxMovement then
return moveCharacterFunc(localPlayer, lastMovementVector, lastMaxMovement)
end
end
return refreshCharacterMovement
end
local setupJumpButton
setupJumpButton = function(parentFrame)
local jumpButton = New("ImageButton", "JumpButton", {
BackgroundTransparency = 1,
Image = touchControlsSheet,
ImageRectOffset = Vector2.new(176, 222),
ImageRectSize = Vector2.new(174, 174),
Size = UDim2.new(0, jumpButtonSize, 0, jumpButtonSize),
Position = UDim2.new(1, (function()
if isSmallScreenDevice() then
return -(jumpButtonSize * 2.25), 1, -jumpButtonSize - 20
else
return -(jumpButtonSize * 2.75), 1, -jumpButtonSize - 120
end
end)())
})
local playerJumpFunc = localPlayer.JumpCharacter
local doJumpLoop
doJumpLoop = function()
while currentJumpTouch do
if localPlayer then
playerJumpFunc(localPlayer)
end
wait(1 / 60)
end
end
jumpButton.InputBegan:connect(function(inputObject)
if inputObject.UserInputType ~= Enum.UserInputType.Touch then
return
end
if currentJumpTouch then
return
end
if inputObject == cameraTouch then
return
end
for _, touch in pairs(oldJumpTouches) do
if touch == inputObject then
return
end
end
currentJumpTouch = inputObject
jumpButton.ImageRectOffset = Vector2.new(0, 222)
jumpButton.ImageRectSize = Vector2.new(174, 174)
return doJumpLoop()
end)
jumpButton.InputEnded:connect(function(inputObject)
if inputObject.UserInputType ~= Enum.UserInputType.Touch then
return
end
jumpButton.ImageRectOffset = Vector2.new(176, 222)
jumpButton.ImageRectSize = Vector2.new(174, 174)
if inputObject == currentJumpTouch then
table.insert(oldJumpTouches, currentJumpTouch)
currentJumpTouch = nil
end
end)
userInputService.InputEnded:connect(function(globalInputObject)
for i, touch in pairs(oldJumpTouches) do
if touch == globalInputObject then
table.remove(oldJumpTouches, i)
break
end
end
end)
userInputService.Changed:connect(function(prop)
if prop == "ModalEnabled" then
jumpButton.Visible = not userInputService.ModalEnabled
end
end)
jumpButton.Parent = parentFrame
end
local isTouchUsedByJumpButton
isTouchUsedByJumpButton = function(touch)
if touch == currentJumpTouch then
return true
end
for _, touchToCompare in pairs(oldJumpTouches) do
if touch == touchToCompare then
return true
end
end
return false
end
local isTouchUsedByThumbstick
isTouchUsedByThumbstick = function(touch)
for _, touchToCompare in pairs(thumbstickTouches) do
if touch == touchToCompare then
return true
end
end
return false
end
local setupCameraControl
setupCameraControl = function(parentFrame, refreshCharacterMoveFunc)
local lastPos
local hasRotatedCamera = false
local rotateCameraFunc = userInputService.RotateCamera
local pinchTime = -1
local shouldPinch = false
local lastPinchScale
local zoomCameraFunc = userInputService.ZoomCamera
local pinchTouches = { }
local pinchFrame
local resetCameraRotateState
resetCameraRotateState = function()
cameraTouch = nil
hasRotatedCamera = false
lastPos = nil
end
local resetPinchState
resetPinchState = function()
pinchTouches = { }
lastPinchScale = nil
shouldPinch = false
pinchFrame:Destroy()
pinchFrame = nil
end
local startPinch
startPinch = function(firstTouch, secondTouch)
if pinchFrame ~= nil then
pinchFrame:Destroy()
end
pinchFrame = New("Frame", {
Name = "PinchFrame",
BackgroundTransparency = 1,
Size = UDim2.new(1, 0, 1, 0),
Parent = parentFrame
})
pinchFrame.InputChanged:connect(function(inputObject)
if not shouldPinch then
resetPinchState()
return
end
resetCameraRotateState()
if not (lastPinchScale ~= nil) then
if inputObject == firstTouch then
lastPinchScale = (inputObject.Position - secondTouch.Position).magnitude
firstTouch = inputObject
elseif inputObject == secondTouch then
lastPinchScale = (inputObject.Position - firstTouch.Position).magnitude
secondTouch = inputObject
end
else
local newPinchDistance = 0
if inputObject == firstTouch then
newPinchDistance = (inputObject.Position - secondTouch.Position).magnitude
firstTouch = inputObject
elseif inputObject == secondTouch then
newPinchDistance = (inputObject.Position - firstTouch.Position).magnitude
secondTouch = inputObject
end
if newPinchDistance ~= 0 then
local pinchDiff = newPinchDistance - lastPinchScale
if pinchDiff ~= 0 then
zoomCameraFunc(userInputService, (pinchDiff * CameraZoomSensitivity))
end
lastPinchScale = newPinchDistance
end
end
end)
return pinchFrame.InputEnded:connect(function(inputObject)
if inputObject == firstTouch or inputObject == secondTouch then
return resetPinchState()
end
end)
end
local pinchGestureReceivedTouch
pinchGestureReceivedTouch = function(inputObject)
if #pinchTouches < 1 then
table.insert(pinchTouches, inputObject)
pinchTime = tick()
shouldPinch = false
elseif #pinchTouches == 1 then
shouldPinch = ((tick() - pinchTime) <= PinchZoomDelay)
if shouldPinch then
table.insert(pinchTouches, inputObject)
return startPinch(pinchTouches[1], pinchTouches[2])
else
pinchTouches = { }
end
end
end
parentFrame.InputBegan:connect(function(inputObject)
if inputObject.UserInputType ~= Enum.UserInputType.Touch then
return
end
if isTouchUsedByJumpButton(inputObject) then
return
end
local usedByThumbstick = isTouchUsedByThumbstick(inputObject)
if not usedByThumbstick then
pinchGestureReceivedTouch(inputObject)
end
if not (cameraTouch ~= nil) and not usedByThumbstick then
cameraTouch = inputObject
lastPos = Vector2.new(cameraTouch.Position.x, cameraTouch.Position.y)
end
end)
userInputService.InputChanged:connect(function(inputObject)
if inputObject.UserInputType ~= Enum.UserInputType.Touch then
return
end
if cameraTouch ~= inputObject then
return
end
local newPos = Vector2.new(cameraTouch.Position.x, cameraTouch.Position.y)
local touchDiff = (lastPos - newPos) * CameraRotateSensitivity
if not hasRotatedCamera and (touchDiff.magnitude > CameraRotateDeadZone) then
hasRotatedCamera = true
lastPos = newPos
end
if hasRotatedCamera and (lastPos ~= newPos) then
rotateCameraFunc(userInputService, touchDiff)
refreshCharacterMoveFunc()
lastPos = newPos
end
end)
return userInputService.InputEnded:connect(function(inputObject)
if cameraTouch == inputObject or not (cameraTouch ~= nil) then
resetCameraRotateState()
end
for i, touch in pairs(pinchTouches) do
if touch == inputObject then
table.remove(pinchTouches, i)
end
end
end)
end
local setupTouchControls
setupTouchControls = function()
local touchControlFrame = New("Frame", "TouchControlFrame", {
Size = UDim2.new(1, 0, 1, 0),
BackgroundTransparency = 1,
Parent = Game.CoreGui.RobloxGui
})
local refreshCharacterMoveFunc = setupCharacterMovement(touchControlFrame)
setupJumpButton(touchControlFrame)
setupCameraControl(touchControlFrame, refreshCharacterMoveFunc)
return userInputService.ProcessedEvent:connect(function(inputObject, processed)
if not processed then
return
end
if inputObject == cameraTouch and inputObject.UserInputState == Enum.UserInputState.Begin then
cameraTouch = nil
end
end)
end
return setupTouchControls()

File diff suppressed because it is too large Load Diff

View File

@ -1,25 +1,127 @@
local a=script.Parent:FindFirstChild'ControlFrame'if not a then return end local print("[Mercury]: Loaded corescript 36868950")
b,c,d=a:FindFirstChild'BottomLeftControl',a:FindFirstChild'BottomRightControl', local controlFrame = script.Parent:FindFirstChild("ControlFrame")
Instance.new'TextLabel'd.Name='ToolTip'd.Text=''d.Font=Enum.Font.ArialBold d. if not controlFrame then
FontSize=Enum.FontSize.Size12 d.TextColor3=Color3.new(1,1,1)d.BorderSizePixel=0 return
d.ZIndex=10 d.Size=UDim2.new(2,0,1,0)d.Position=UDim2.new(1,0,0,0)d. end
BackgroundColor3=Color3.new(0,0,0)d.BackgroundTransparency=1 d.TextTransparency= local New
1 d.TextWrap=true local e=Instance.new'BoolValue'e.Name='inside'e.Value=false e. New = function(className, name, props)
Parent=d function setUpListeners(f)local g=0.1 f.Parent.MouseEnter:connect( if not (props ~= nil) then
function()if f:FindFirstChild'inside'then f.inside.Value=true wait(1.2)if f. props = name
inside.Value then while f.inside.Value and f.BackgroundTransparency>0 do f. name = nil
BackgroundTransparency=f.BackgroundTransparency-g f.TextTransparency=f. end
TextTransparency-g wait()end end end end)function killTip(h)h.inside.Value=false local obj = Instance.new(className)
h.BackgroundTransparency=1 h.TextTransparency=1 end f.Parent.MouseLeave:connect( if name then
function()killTip(f)end)f.Parent.MouseButton1Click:connect(function()killTip(f) obj.Name = name
end)end function createSettingsButtonTip(f)if f==nil then f=b:FindFirstChild end
'SettingsButton'end local g=d:clone()g.RobloxLocked=true g.Text= local parent
'Settings/Leave Game'g.Position=UDim2.new(0,0,0,-18)g.Size=UDim2.new(0,120,0,20) for k, v in pairs(props) do
g.Parent=f setUpListeners(g)end wait(5)local f=b:GetChildren()for g=1,#f do if f if type(k) == "string" then
[g].Name=='Exit'then local h=d:clone()h.RobloxLocked=true h.Text='Leave Place'h. if k == "Parent" then
Position=UDim2.new(0,0,-1,0)h.Size=UDim2.new(1,0,1,0)h.Parent=f[g] parent = v
setUpListeners(h)elseif f[g].Name=='SettingsButton'then createSettingsButtonTip( else
f[g])end end local g=c:GetChildren()for h=1,#g do if g[h].Name:find'Camera'~=nil obj[k] = v
then local i=d:clone()i.RobloxLocked=true i.Text='Camera View'if g[h].Name:find end
'Zoom'then i.Position=UDim2.new(-1,0,-1.5)else i.Position=UDim2.new(0,0,-1.5,0) elseif type(k) == "number" and type(v) == "userdata" then
end i.Size=UDim2.new(2,0,1.25,0)i.Parent=g[h]setUpListeners(i)end end v.Parent = obj
end
end
obj.Parent = parent
return obj
end
local bottomLeftControl = controlFrame:FindFirstChild("BottomLeftControl")
local bottomRightControl = controlFrame:FindFirstChild("BottomRightControl")
local frameTip = New("TextLabel", "ToolTip", {
Text = "",
Font = Enum.Font.ArialBold,
FontSize = Enum.FontSize.Size12,
TextColor3 = Color3.new(1, 1, 1),
BorderSizePixel = 0,
ZIndex = 10,
Size = UDim2.new(2, 0, 1, 0),
Position = UDim2.new(1, 0, 0, 0),
BackgroundColor3 = Color3.new(0, 0, 0),
BackgroundTransparency = 1,
TextTransparency = 1,
TextWrap = true,
New("BoolValue", "inside", {
Value = false
})
})
local setUpListeners
setUpListeners = function(frameToListen)
local fadeSpeed = 0.1
frameToListen.Parent.MouseEnter:connect(function()
if frameToListen:FindFirstChild("inside") then
frameToListen.inside.Value = true
wait(1.2)
if frameToListen.inside.Value then
while frameToListen.inside.Value and frameToListen.BackgroundTransparency > 0 do
frameToListen.BackgroundTransparency = frameToListen.BackgroundTransparency - fadeSpeed
frameToListen.TextTransparency = frameToListen.TextTransparency - fadeSpeed
wait()
end
end
end
end)
local killTip
killTip = function(killFrame)
killFrame.inside.Value = false
killFrame.BackgroundTransparency = 1
killFrame.TextTransparency = 1
end
frameToListen.Parent.MouseLeave:connect(function()
return killTip(frameToListen)
end)
return frameToListen.Parent.MouseButton1Click:connect(function()
return killTip(frameToListen)
end)
end
local createSettingsButtonTip
createSettingsButtonTip = function(parent)
if not (parent ~= nil) then
parent = bottomLeftControl:FindFirstChild("SettingsButton")
end
local toolTip = frameTip:clone()
toolTip.RobloxLocked = true
toolTip.Text = "Settings/Leave Game"
toolTip.Position = UDim2.new(0, 0, 0, -18)
toolTip.Size = UDim2.new(0, 120, 0, 20)
toolTip.Parent = parent
setUpListeners(toolTip)
return toolTip
end
wait(5)
local bottomLeftChildren = bottomLeftControl:GetChildren()
for i = 1, #bottomLeftChildren do
if bottomLeftChildren[i].Name == "Exit" then
do
local exitTip = frameTip:clone()
exitTip.RobloxLocked = true
exitTip.Text = "Leave Place"
exitTip.Position = UDim2.new(0, 0, -1, 0)
exitTip.Size = UDim2.new(1, 0, 1, 0)
exitTip.Parent = bottomLeftChildren[i]
setUpListeners(exitTip)
end
elseif bottomLeftChildren[i].Name == "SettingsButton" then
createSettingsButtonTip(bottomLeftChildren[i])
end
end
local bottomRightChildren = bottomRightControl:GetChildren()
for i = 1, #bottomRightChildren do
if (bottomRightChildren[i].Name:find("Camera") ~= nil) then
do
local cameraTip = frameTip:clone()
cameraTip.RobloxLocked = true
cameraTip.Text = "Camera View"
if bottomRightChildren[i].Name:find("Zoom") then
cameraTip.Position = UDim2.new(-1, 0, -1.5)
else
cameraTip.Position = UDim2.new(0, 0, -1.5, 0)
end
cameraTip.Size = UDim2.new(2, 0, 1.25, 0)
cameraTip.Parent = bottomRightChildren[i]
setUpListeners(cameraTip)
end
end
end

View File

@ -1,35 +1,69 @@
local a,b=game:GetService'ScriptContext',false pcall(function()b=game:GetService print("[Mercury]: Loaded corescript 37801172")
'UserInputService'.TouchEnabled end)a:AddCoreScript(60595695,a, local scriptContext = game:GetService("ScriptContext")
'/Libraries/LibraryRegistration/LibraryRegistration')local function waitForChild local touchEnabled = false
(c,d)while not c:FindFirstChild(d)do c.ChildAdded:wait()end end local c=game: pcall(function()
GetService'ScriptContext'c:AddCoreScript(59002209,c,'CoreScripts/Sections') touchEnabled = game:GetService("UserInputService").TouchEnabled
waitForChild(game:GetService'CoreGui','RobloxGui')local d=game:GetService end)
'CoreGui':FindFirstChild'RobloxGui'if not b then c:AddCoreScript(36868950,d, scriptContext:AddCoreScript(60595695, scriptContext, "/Libraries/LibraryRegistration/LibraryRegistration")
'CoreScripts/ToolTip')c:AddCoreScript(46295863,d,'CoreScripts/Settings')else c: local waitForChild
AddCoreScript(153556783,d,'CoreScripts/TouchControls')end c:AddCoreScript( waitForChild = function(instance, name)
39250920,d,'CoreScripts/MainBotChatScript')c:AddCoreScript(48488451,d, while not instance:FindFirstChild(name) do
'CoreScripts/PopupScript')c:AddCoreScript(48488398,d, instance.ChildAdded:wait()
'CoreScripts/NotificationScript')c:AddCoreScript(97188756,d, end
'CoreScripts/ChatScript')c:AddCoreScript(107893730,d, end
'CoreScripts/PurchasePromptScript')if not b or d.AbsoluteSize.Y>600 then c: scriptContext = game:GetService("ScriptContext")
AddCoreScript(48488235,d,'CoreScripts/PlayerListScript')else delay(5,function() scriptContext:AddCoreScript(59002209, scriptContext, "CoreScripts/Sections")
if d.AbsoluteSize.Y>=600 then c:AddCoreScript(48488235,d, waitForChild(game:GetService("CoreGui"), "RobloxGui")
'CoreScripts/PlayerListScript')end end)end if game.CoreGui.Version>=3 and game. local screenGui = game:GetService("CoreGui"):FindFirstChild("RobloxGui")
PlaceId~=130815926 then c:AddCoreScript(53878047,d, if not touchEnabled then
'CoreScripts/BackpackScripts/BackpackBuilder')waitForChild(d,'CurrentLoadout') scriptContext:AddCoreScript(36868950, screenGui, "CoreScripts/ToolTip")
waitForChild(d,'Backpack')local e=d.Backpack if game.CoreGui.Version>=7 then c: scriptContext:AddCoreScript(46295863, screenGui, "CoreScripts/Settings")
AddCoreScript(89449093,e,'CoreScripts/BackpackScripts/BackpackManager')end game: else
GetService'ScriptContext':AddCoreScript(89449008,e, scriptContext:AddCoreScript(153556783, screenGui, "CoreScripts/TouchControls")
'CoreScripts/BackpackScripts/BackpackGear')c:AddCoreScript(53878057,d. end
CurrentLoadout,'CoreScripts/BackpackScripts/LoadoutScript')if game.CoreGui. scriptContext:AddCoreScript(39250920, screenGui, "CoreScripts/MainBotChatScript")
Version>=8 then c:AddCoreScript(-1,e, scriptContext:AddCoreScript(48488451, screenGui, "CoreScripts/PopupScript")
'CoreScripts/BackpackScripts/BackpackWardrobe')end end local e=not not game. scriptContext:AddCoreScript(48488398, screenGui, "CoreScripts/NotificationScript")
Workspace:FindFirstChild'PSVariable'if e then game:GetService'ScriptContext': scriptContext:AddCoreScript(97188756, screenGui, "CoreScripts/ChatScript")
AddCoreScript(64164692,game.Players.LocalPlayer,'BuildToolManager')end game. scriptContext:AddCoreScript(107893730, screenGui, "CoreScripts/PurchasePromptScript")
Workspace.ChildAdded:connect(function(f)if f.Name=='PSVariable'and f:IsA if not touchEnabled or screenGui.AbsoluteSize.Y > 600 then
'BoolValue'then e=true game:GetService'ScriptContext':AddCoreScript(64164692, scriptContext:AddCoreScript(48488235, screenGui, "CoreScripts/PlayerListScript")
game.Players.LocalPlayer,'BuildToolManager')end end)if b then c:AddCoreScript( else
152908679,d,'CoreScripts/ContextActionTouch')waitForChild(d,'ControlFrame') delay(5, function()
waitForChild(d.ControlFrame,'BottomLeftControl')d.ControlFrame.BottomLeftControl if screenGui.AbsoluteSize.Y >= 600 then
.Visible=false waitForChild(d.ControlFrame,'TopLeftControl')d.ControlFrame. return scriptContext:AddCoreScript(48488235, screenGui, "CoreScripts/PlayerListScript")
TopLeftControl.Visible=false end end
end)
end
if game.CoreGui.Version >= 3 and game.PlaceId ~= 130815926 then
scriptContext:AddCoreScript(53878047, screenGui, "CoreScripts/BackpackScripts/BackpackBuilder")
waitForChild(screenGui, "CurrentLoadout")
waitForChild(screenGui, "Backpack")
local Backpack = screenGui.Backpack
if game.CoreGui.Version >= 7 then
scriptContext:AddCoreScript(89449093, Backpack, "CoreScripts/BackpackScripts/BackpackManager")
end
scriptContext:AddCoreScript(89449008, Backpack, "CoreScripts/BackpackScripts/BackpackGear")
scriptContext:AddCoreScript(53878057, screenGui.CurrentLoadout, "CoreScripts/BackpackScripts/LoadoutScript")
if game.CoreGui.Version >= 8 then
scriptContext:AddCoreScript(-1, Backpack, "CoreScripts/BackpackScripts/BackpackWardrobe")
end
end
local IsPersonalServer = not not game.Workspace:FindFirstChild("PSVariable")
if IsPersonalServer then
scriptContext:AddCoreScript(64164692, game.Players.LocalPlayer, "BuildToolManager")
end
game.Workspace.ChildAdded:connect(function(nchild)
if nchild.Name == "PSVariable" and nchild:IsA("BoolValue") then
IsPersonalServer = true
return scriptContext:AddCoreScript(64164692, game.Players.LocalPlayer, "BuildToolManager")
end
end)
if touchEnabled then
scriptContext:AddCoreScript(152908679, screenGui, "CoreScripts/ContextActionTouch")
waitForChild(screenGui, "ControlFrame")
waitForChild(screenGui.ControlFrame, "BottomLeftControl")
screenGui.ControlFrame.BottomLeftControl.Visible = false
waitForChild(screenGui.ControlFrame, "TopLeftControl")
screenGui.ControlFrame.TopLeftControl.Visible = false
end

View File

@ -1,48 +1,231 @@
local a,b=5,5 function waitForChild(c,d)local e=c:findFirstChild(d)if e then print("[Mercury]: Loaded corescript 38037565")
return e end while true do e=c.ChildAdded:wait()if e.Name==d then return e end local New
end end local c=script.Parent local d,e,f,g=waitForChild(c,'Humanoid'), New = function(className, name, props)
waitForChild(c,'Torso'),c:FindFirstChild'PlayerStats',Instance.new'BoolValue'g. if not (props ~= nil) then
Name='InCharTag'local h=Instance.new'BoolValue'h.Name='RobloxBuildTool'local i,j props = name
if f==nil then f=Instance.new'Configuration'f.Parent=c f.Name='PlayerStats'end name = nil
local k=f:FindFirstChild'MaxHealth'if k==nil then k=Instance.new'NumberValue'k. end
Parent=f k.Value=100 k.Name='MaxHealth'end d.MaxHealth=k.Value d.Health=k.Value local obj = Instance.new(className)
function onMaxHealthChange()d.MaxHealth=k.Value d.Health=k.Value end k.Changed: if name then
connect(onMaxHealthChange)local l=game.Players:GetPlayerFromCharacter(script. obj.Name = name
Parent)local m=l.PlayerGui:FindFirstChild'DamageOverTimeGui'if m==nil then m= end
Instance.new'BillboardGui'm.Name='DamageOverTimeGui'm.Parent=l.PlayerGui m. local parent
Adornee=script.Parent:FindFirstChild'Head'm.Active=true m.size=UDim2.new(a,0,b,0 for k, v in pairs(props) do
)m.StudsOffset=Vector3.new(0,2,0)end print'newHealth declarations finished' if type(k) == "string" then
function billboardHealthChange(n)local o=Instance.new'TextLabel'if n>0 then o. if k == "Parent" then
Text=tostring(n)o.TextColor3=Color3.new(0,1,0)else o.Text=tostring(n)o. parent = v
TextColor3=Color3.new(1,0,1)end o.size=UDim2.new(1,0,1,0)o.Active=true o. else
FontSize=6 o.BackgroundTransparency=1 o.Parent=m for p=1,10 do wait(0.1)o. obj[k] = v
TextTransparency=p/10 o.Position=UDim2.new(0,0,0,-p*5)o.FontSize=6-p*0.6 end o: end
remove()end function setMaxHealth()if k.Value>=0 then d.MaxHealth=k.Value print( elseif type(k) == "number" and type(v) == "userdata" then
d.MaxHealth)if d.Health>d.MaxHealth then d.Health=d.MaxHealth end end end k. v.Parent = obj
Changed:connect(setMaxHealth)local n=Instance.new'Fire'n.Heat=0.1 n.Size=3 n. end
Name='FireEffect'n.Enabled=false while true do local o,p=wait(1),d.Health if p>0 end
then local q=0 if f then local r,s,t,u,v=f:FindFirstChild'Regen',f: obj.Parent = parent
FindFirstChild'Poison',f:FindFirstChild'Ice',f:FindFirstChild'Fire',f: return obj
FindFirstChild'Stun'if r then q=q+r.Value.X if r.Value.Y>=0 then r.Value=Vector3 end
.new(r.Value.X+r.Value.Z,r.Value.Y-o,r.Value.Z)elseif r.Value.Y==-1 then r.Value local damageGuiWidth = 5.0
=Vector3.new(r.Value.X+r.Value.Z,-1,r.Value.Z)else r:remove()end end if s then q local damageGuiHeight = 5.0
=q-s.Value.X if s.Value.Y>=0 then s.Value=Vector3.new(s.Value.X+s.Value.Z,s. local waitForChild
Value.Y-o,s.Value.Z)elseif s.Value.Y==-1 then s.Value=Vector3.new(s.Value.X+s. waitForChild = function(parent, childName)
Value.Z,-1,s.Value.Z)else s:remove()end end if t then q=q-t.Value.X if t.Value.Y local child = parent:findFirstChild(childName)
>=0 then t.Value=Vector3.new(t.Value.X,t.Value.Y-o,t.Value.Z)else t:remove()end if child then
end if u then n.Enabled=true n.Parent=c.Torso q=q-u.Value.X if u.Value.Y>=0 then return child
u.Value=Vector3.new(u.Value.X,u.Value.Y-o,u.Value.Z)else u:remove()n.Enabled= end
false n.Parent=nil end end if v then if v.Value>0 then e.Anchored=true i=script. while true do
Parent:GetChildren()j=game.Players:GetPlayerFromCharacter(script.Parent). child = parent.ChildAdded:wait()
Backpack:GetChildren()for w=1,#i do if i[w].className=='Tool'then g:Clone(). if child.Name == childName then
Parent=i[w]print(j)table.insert(j,i[w])end end for w=1,#j do if j[w]: return child
FindFirstChild'RobloxBuildTool'==nil then h:Clone().Parent=j[w]j[w].Parent=game. end
Lighting end end wait(0.2)for w=1,#j do j[w].Parent=game.Players: end
GetPlayerFromCharacter(script.Parent).Backpack end v.Value=v.Value-o else e. end
Anchored=false for w=1,#j do local x=j[w]:FindFirstChild'RobloxBuildTool'if x local Figure = script.Parent
then x:Remove()end j[w].Parent=game.Lighting end wait(0.2)for w=1,#j do local x= local Humanoid = waitForChild(Figure, "Humanoid")
j[w]:FindFirstChild'InCharTag'if x then x:Remove()j[w].Parent=script.Parent else local Torso = waitForChild(Figure, "Torso")
j[w].Parent=game.Players:GetPlayerFromCharacter(script.Parent).Backpack end end local config = Figure:FindFirstChild("PlayerStats")
v:Remove()end end if q~=0 then coroutine.resume(coroutine.create( local inCharTag = Instance.new("BoolValue")
billboardHealthChange),q)end end p=d.Health+q*o if p*1.01<d.MaxHealth then d. inCharTag.Name = "InCharTag"
Health=p elseif q>0 then d.Health=d.MaxHealth end end end local hider = Instance.new("BoolValue")
hider.Name = "RobloxBuildTool"
if not (config ~= nil) then
config = New("Configuration", "PlayerStats", {
Parent = Figure
})
end
local myHealth = config:FindFirstChild("MaxHealth")
if not (myHealth ~= nil) then
myHealth = New("NumberValue", "MaxHealth", {
Value = 100,
Parent = config
})
end
Humanoid.MaxHealth = myHealth.Value
Humanoid.Health = myHealth.Value
local onMaxHealthChange
onMaxHealthChange = function()
Humanoid.MaxHealth = myHealth.Value
Humanoid.Health = myHealth.Value
end
myHealth.Changed:connect(onMaxHealthChange)
local vPlayer = game.Players:GetPlayerFromCharacter(script.Parent)
local dotGui = vPlayer.PlayerGui:FindFirstChild("DamageOverTimeGui")
if not (dotGui ~= nil) then
dotGui = New("BillboardGui", "DamageOverTimeGui", {
Parent = vPlayer.PlayerGui,
Adornee = script.Parent:FindFirstChild("Head"),
Active = true,
size = UDim2.new(damageGuiWidth, 0, damageGuiHeight, 0.0),
StudsOffset = Vector3.new(0, 2.0, 0.0)
})
end
print("newHealth declarations finished")
local billboardHealthChange
billboardHealthChange = function(dmg)
local textLabel = New("TextLabel", {
Text = tostring(dmg),
TextColor3 = (function()
if dmg > 0 then
return Color3.new(0, 1, 0)
else
return Color3.new(1, 0, 1)
end
end)(),
size = UDim2.new(1, 0, 1, 0.0),
Active = true,
FontSize = 6,
BackgroundTransparency = 1,
Parent = dotGui
})
for t = 1, 10 do
wait(0.1)
textLabel.TextTransparency = t / 10
textLabel.Position = UDim2.new(0, 0, 0, -t * 5)
textLabel.FontSize = 6 - t * 0.6
end
return textLabel:remove()
end
local setMaxHealth
setMaxHealth = function()
if myHealth.Value >= 0 then
Humanoid.MaxHealth = myHealth.Value
print(Humanoid.MaxHealth)
if Humanoid.Health > Humanoid.MaxHealth then
Humanoid.Health = Humanoid.MaxHealth
end
end
end
myHealth.Changed:connect(setMaxHealth)
local fireEffect = New("Fire", "FireEffect", {
Heat = 0.1,
Size = 3.0,
Enabled = false
})
while true do
local s = wait(1)
local health = Humanoid.Health
if health > 0 then
local delta = 0
if config then
local regen = config:FindFirstChild("Regen")
local poison = config:FindFirstChild("Poison")
local ice = config:FindFirstChild("Ice")
local fire = config:FindFirstChild("Fire")
local stun = config:FindFirstChild("Stun")
if regen then
delta = delta + regen.Value.X
if regen.Value.Y >= 0 then
regen.Value = Vector3.new(regen.Value.X + regen.Value.Z, regen.Value.Y - s, regen.Value.Z)
elseif regen.Value.Y == -1 then
regen.Value = Vector3.new(regen.Value.X + regen.Value.Z, -1, regen.Value.Z)
else
regen:remove()
end
end
if poison then
delta = delta - poison.Value.X
if poison.Value.Y >= 0 then
poison.Value = Vector3.new(poison.Value.X + poison.Value.Z, poison.Value.Y - s, poison.Value.Z)
elseif poison.Value.Y == -1 then
poison.Value = Vector3.new(poison.Value.X + poison.Value.Z, -1, poison.Value.Z)
else
poison:remove()
end
end
if ice then
delta = delta - ice.Value.X
if ice.Value.Y >= 0 then
ice.Value = Vector3.new(ice.Value.X, ice.Value.Y - s, ice.Value.Z)
else
ice:remove()
end
end
if fire then
fireEffect.Enabled = true
fireEffect.Parent = Figure.Torso
delta = delta - fire.Value.X
if fire.Value.Y >= 0 then
fire.Value = Vector3.new(fire.Value.X, fire.Value.Y - s, fire.Value.Z)
else
fire:remove()
fireEffect.Enabled = false
fireEffect.Parent = nil
end
end
if stun then
local backpackTools
if stun.Value > 0 then
Torso.Anchored = true
local currentChildren = script.Parent:GetChildren()
backpackTools = game.Players:GetPlayerFromCharacter(script.Parent).Backpack:GetChildren()
for i = 1, #currentChildren do
if currentChildren[i].className == "Tool" then
inCharTag:Clone().Parent = currentChildren[i]
print(backpackTools)
table.insert(backpackTools, currentChildren[i])
end
end
for i = 1, #backpackTools do
if not (backpackTools[i]:FindFirstChild("RobloxBuildTool") ~= nil) then
hider:Clone().Parent = backpackTools[i]
backpackTools[i].Parent = game.Lighting
end
end
wait(0.2)
for i = 1, #backpackTools do
backpackTools[i].Parent = game.Players:GetPlayerFromCharacter(script.Parent).Backpack
end
stun.Value = stun.Value - s
else
Torso.Anchored = false
for i = 1, #backpackTools do
local rbTool = backpackTools[i]:FindFirstChild("RobloxBuildTool")
if rbTool then
rbTool:Remove()
end
backpackTools[i].Parent = game.Lighting
end
wait(0.2)
for i = 1, #backpackTools do
local wasInChar = backpackTools[i]:FindFirstChild("InCharTag")
if wasInChar then
wasInChar:Remove()
backpackTools[i].Parent = script.Parent
else
backpackTools[i].Parent = game.Players:GetPlayerFromCharacter(script.Parent).Backpack
end
end
stun:Remove()
end
end
if delta ~= 0 then
coroutine.resume(coroutine.create(billboardHealthChange), delta)
end
end
health = Humanoid.Health + delta * s
if health * 1.01 < Humanoid.MaxHealth then
Humanoid.Health = health
elseif delta > 0 then
Humanoid.Health = Humanoid.MaxHealth
end
end
end

View File

@ -1,142 +1,542 @@
function waitForProperty(a,b)while not a[b]do a.Changed:wait()end end function print("[Mercury]: Loaded corescript 39250920")
waitForChild(a,b)while not a:FindFirstChild(b)do a.ChildAdded:wait()end end local New
local a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u=nil,{},nil,{},nil,nil,nil, New = function(className, name, props)
'You are too far away to chat!',300,'Chat ended because you walked away',350, if not (props ~= nil) then
"Chat ended because you didn't reply",350,nil,nil,nil,nil,nil,{},{},nil props = name
waitForChild(game,'CoreGui')waitForChild(game.CoreGui,'RobloxGui')if game. name = nil
CoreGui.RobloxGui:FindFirstChild'ControlFrame'then u=game.CoreGui.RobloxGui. end
ControlFrame else u=game.CoreGui.RobloxGui end function currentTone()if e then local obj = Instance.new(className)
return e.Tone else return Enum.DialogTone.Neutral end end function if name then
createChatNotificationGui()o=Instance.new'BillboardGui'o.Name= obj.Name = name
'ChatNotificationGui'o.ExtentsOffset=Vector3.new(0,1,0)o.Size=UDim2.new(4,0, end
5.42857122,0)o.SizeOffset=Vector2.new(0,0)o.StudsOffset=Vector3.new(0.4,4.3,0)o. local parent
Enabled=true o.RobloxLocked=true o.Active=true local v=Instance.new'ImageLabel'v for k, v in pairs(props) do
.Name='Image'v.Active=false v.BackgroundTransparency=1 v.Position=UDim2.new(0,0, if type(k) == "string" then
0,0)v.Size=UDim2.new(1,0,1,0)v.Image=''v.RobloxLocked=true v.Parent=o local w= if k == "Parent" then
Instance.new'ImageButton'w.Name='Button'w.AutoButtonColor=false w.Position=UDim2 parent = v
.new(0.0879999995,0,0.0529999994,0)w.Size=UDim2.new(0.829999983,0,0.460000008,0) else
w.Image=''w.BackgroundTransparency=1 w.RobloxLocked=true w.Parent=v end function obj[k] = v
getChatColor(v)if v==Enum.DialogTone.Neutral then return Enum.ChatColor.Blue end
elseif v==Enum.DialogTone.Friendly then return Enum.ChatColor.Green elseif v== elseif type(k) == "number" and type(v) == "userdata" then
Enum.DialogTone.Enemy then return Enum.ChatColor.Red end end function v.Parent = obj
styleChoices(v)for w,x in pairs(b)do resetColor(x,v)end resetColor(c,v)end end
function styleMainFrame(v)if v==Enum.DialogTone.Neutral then a.Style=Enum. end
FrameStyle.ChatBlue a.Tail.Image= obj.Parent = parent
'rbxasset://textures/chatBubble_botBlue_tailRight.png'elseif v==Enum.DialogTone. return obj
Friendly then a.Style=Enum.FrameStyle.ChatGreen a.Tail.Image= end
'rbxasset://textures/chatBubble_botGreen_tailRight.png'elseif v==Enum.DialogTone local waitForProperty
.Enemy then a.Style=Enum.FrameStyle.ChatRed a.Tail.Image= waitForProperty = function(instance, name)
'rbxasset://textures/chatBubble_botRed_tailRight.png'end styleChoices(v)end while not instance[name] do
function setChatNotificationTone(v,w,x)if x==Enum.DialogTone.Neutral then v. instance.Changed:wait()
Image.Image='rbxasset://textures/chatBubble_botBlue_notify_bkg.png'elseif x== end
Enum.DialogTone.Friendly then v.Image.Image= end
'rbxasset://textures/chatBubble_botGreen_notify_bkg.png'elseif x==Enum. local waitForChild
DialogTone.Enemy then v.Image.Image= waitForChild = function(instance, name)
'rbxasset://textures/chatBubble_botRed_notify_bkg.png'end if w==Enum. while not instance:FindFirstChild(name) do
DialogPurpose.Quest then v.Image.Button.Image= instance.ChildAdded:wait()
'rbxasset://textures/chatBubble_bot_notify_bang.png'elseif w==Enum.DialogPurpose end
.Help then v.Image.Button.Image= end
'rbxasset://textures/chatBubble_bot_notify_question.png'elseif w==Enum. local mainFrame
DialogPurpose.Shop then v.Image.Button.Image= local choices = { }
'rbxasset://textures/chatBubble_bot_notify_money.png'end end function local lastChoice
createMessageDialog()p=Instance.new'Frame'p.Name='DialogScriptMessage'p.Style= local choiceMap = { }
Enum.FrameStyle.RobloxRound p.Visible=false local v=Instance.new'TextLabel'v. local currentConversationDialog
Name='Text'v.Position=UDim2.new(0,0,0,-1)v.Size=UDim2.new(1,0,1,0)v.FontSize= local currentConversationPartner
Enum.FontSize.Size14 v.BackgroundTransparency=1 v.TextColor3=Color3.new(1,1,1)v. local currentAbortDialogScript
RobloxLocked=true v.Parent=p end function showMessage(v,w)p.Text.Text=v p.Size= local tooFarAwayMessage = "You are too far away to chat!"
UDim2.new(0,w,0,40)p.Position=UDim2.new(0.5,-w/2,0.5,-40)p.Visible=true wait(2)p local tooFarAwaySize = 300
.Visible=false end function variableDelay(v)local w=math.min(string.len(v),100) local characterWanderedOffMessage = "Chat ended because you walked away"
wait(0.75+((w/75)*1.5))end function resetColor(v,w)if w==Enum.DialogTone.Neutral local characterWanderedOffSize = 350
then v.BackgroundColor3=Color3.new(0,0,0.7019607843137254)v.Number.TextColor3= local conversationTimedOut = "Chat ended because you didn't reply"
Color3.new(0.17647058823529413,0.5568627450980392,0.9607843137254902)elseif w== local conversationTimedOutSize = 350
Enum.DialogTone.Friendly then v.BackgroundColor3=Color3.new(0, local player
0.30196078431372547,0)v.Number.TextColor3=Color3.new(0,0.7450980392156863,0) local chatNotificationGui
elseif w==Enum.DialogTone.Enemy then v.BackgroundColor3=Color3.new( local messageDialog
0.5490196078431373,0,0)v.Number.TextColor3=Color3.new(1,0.34509803921568627, local timeoutScript
0.30980392156862746)end end function highlightColor(v,w)if w==Enum.DialogTone. local reenableDialogScript
Neutral then v.BackgroundColor3=Color3.new(7.8431372549019605E-3, local dialogMap = { }
0.4235294117647059,1)v.Number.TextColor3=Color3.new(1,1,1)elseif w==Enum. local dialogConnections = { }
DialogTone.Friendly then v.BackgroundColor3=Color3.new(0,0.5019607843137255,0)v. local gui
Number.TextColor3=Color3.new(1,1,1)elseif w==Enum.DialogTone.Enemy then v. waitForChild(game, "CoreGui")
BackgroundColor3=Color3.new(0.8,0,0)v.Number.TextColor3=Color3.new(1,1,1)end end waitForChild(game.CoreGui, "RobloxGui")
function endDialog()if g then g:Remove()g=nil end local v=e e=nil if v and v. if game.CoreGui.RobloxGui:FindFirstChild("ControlFrame") then
InUse then local w=r:Clone()w.archivable=false w.Disabled=false w.Parent=v end gui = game.CoreGui.RobloxGui.ControlFrame
for w,x in pairs(s)do if w and x then x.Enabled=not w.InUse end end f=nil end else
function wanderDialog()print'Wander'a.Visible=false endDialog()showMessage(j,k) gui = game.CoreGui.RobloxGui
end function timeoutDialog()print'Timeout'a.Visible=false endDialog() end
showMessage(l,m)end function normalEndDialog()print'Done'endDialog()end function local currentTone
sanitizeMessage(w)if string.len(w)==0 then return'...'else return w end end currentTone = function()
function selectChoice(w)renewKillswitch(e)a.Visible=false if w==c then game.Chat if currentConversationDialog then
:Chat(game.Players.LocalPlayer.Character,'Goodbye!',getChatColor(currentTone())) return currentConversationDialog.Tone
normalEndDialog()else local x=d[w]game.Chat:Chat(game.Players.LocalPlayer. else
Character,sanitizeMessage(x.UserDialog),getChatColor(currentTone()))wait(1)e: return Enum.DialogTone.Neutral
SignalDialogChoiceSelected(n,x)game.Chat:Chat(f,sanitizeMessage(x.ResponseDialog end
),getChatColor(currentTone()))variableDelay(x.ResponseDialog) end
presentDialogChoices(f,x:GetChildren())end end function newChoice(w)local x= local createChatNotificationGui
Instance.new'TextButton'x.BackgroundColor3=Color3.new(0,0,0.7019607843137254)x. createChatNotificationGui = function()
AutoButtonColor=false x.BorderSizePixel=0 x.Text=''x.MouseEnter:connect(function chatNotificationGui = New("BillboardGui", "ChatNotificationGui", {
()highlightColor(x,currentTone())end)x.MouseLeave:connect(function()resetColor(x ExtentsOffset = Vector3.new(0, 1, 0),
,currentTone())end)x.MouseButton1Click:connect(function()selectChoice(x)end)x. Size = UDim2.new(4, 0, 5.42857122, 0),
RobloxLocked=true local y=Instance.new'TextLabel'y.Name='Number'y.TextColor3= SizeOffset = Vector2.new(0, 0),
Color3.new(0.4980392156862745,0.8313725490196079,1)y.Text=w y.FontSize=Enum. StudsOffset = Vector3.new(0.4, 4.3, 0),
FontSize.Size14 y.BackgroundTransparency=1 y.Position=UDim2.new(0,4,0,2)y.Size= Enabled = true,
UDim2.new(0,20,0,24)y.TextXAlignment=Enum.TextXAlignment.Left y.TextYAlignment= RobloxLocked = true,
Enum.TextYAlignment.Top y.RobloxLocked=true y.Parent=x local z=Instance.new Active = true,
'TextLabel'z.Name='UserPrompt'z.BackgroundTransparency=1 z.TextColor3=Color3. New("ImageLabel", "Image", {
new(1,1,1)z.FontSize=Enum.FontSize.Size14 z.Position=UDim2.new(0,28,0,2)z.Size= Active = false,
UDim2.new(1,-32,1,-4)z.TextXAlignment=Enum.TextXAlignment.Left z.TextYAlignment= BackgroundTransparency = 1,
Enum.TextYAlignment.Top z.TextWrap=true z.RobloxLocked=true z.Parent=x return x Position = UDim2.new(0, 0, 0, 0),
end function initialize(w)b[1]=newChoice'1)'b[2]=newChoice'2)'b[3]=newChoice'3)' Size = UDim2.new(1, 0, 1, 0),
b[4]=newChoice'4)'c=newChoice'5)'c.UserPrompt.Text='Goodbye!'c.Size=UDim2.new(1, Image = "",
0,0,28)a=Instance.new'Frame'a.Name='UserDialogArea'a.Size=UDim2.new(0,350,0,200) RobloxLocked = true,
a.Style=Enum.FrameStyle.ChatBlue a.Visible=false local x=Instance.new New("ImageButton", "Button", {
'ImageLabel'x.Name='Tail'x.Size=UDim2.new(0,62,0,53)x.Position=UDim2.new(1,8, AutoButtonColor = false,
0.25)x.Image='rbxasset://textures/chatBubble_botBlue_tailRight.png'x. Position = UDim2.new(0.088, 0, 0.053, 0),
BackgroundTransparency=1 x.RobloxLocked=true x.Parent=a for y,z in pairs(b)do z. Size = UDim2.new(0.83, 0, 0.46, 0),
RobloxLocked=true z.Parent=a end c.RobloxLocked=true c.Parent=a a.RobloxLocked= Image = "",
true a.Parent=w end function presentDialogChoices(w,x)if not e then return end f BackgroundTransparency = 1,
=w local y={}for z,A in pairs(x)do if A:IsA'DialogChoice'then table.insert(y,A) RobloxLocked = true
end end table.sort(y,function(B,C)return B.Name<C.Name end)if#y==0 then })
normalEndDialog()return end local B,C=1,0 d={}for D,E in pairs(b)do E.Visible= })
false end for F,G in pairs(y)do if B<=#b then b[B].Size=UDim2.new(1,0,0,72)b[B]. })
UserPrompt.Text=G.UserDialog local H=math.ceil(b[B].UserPrompt.TextBounds.Y/24)* end
24 b[B].Position=UDim2.new(0,0,0,C)b[B].Size=UDim2.new(1,0,0,H)b[B].Visible=true local getChatColor
d[b[B]]=G C=C+H B=B+1 end end c.Position=UDim2.new(0,0,0,C)c.Number.Text=B..')'a getChatColor = function(tone)
.Size=UDim2.new(0,350,0,C+24+32)a.Position=UDim2.new(0,20,0,-a.Size.Y.Offset-20) if tone == Enum.DialogTone.Neutral then
styleMainFrame(currentTone())a.Visible=true end function doDialog(w)while not return Enum.ChatColor.Blue
Instance.Lock(w,n)do wait()end if w.InUse then Instance.Unlock(w)return else w. elseif tone == Enum.DialogTone.Friendly then
InUse=true Instance.Unlock(w)end e=w game.Chat:Chat(w.Parent,w.InitialPrompt, return Enum.ChatColor.Green
getChatColor(w.Tone))variableDelay(w.InitialPrompt)presentDialogChoices(w.Parent elseif tone == Enum.DialogTone.Enemy then
,w:GetChildren())end function renewKillswitch(w)if g then g:Remove()g=nil end g= return Enum.ChatColor.Red
q:Clone()g.archivable=false g.Disabled=false g.Parent=w end function end
checkForLeaveArea()while e do if e.Parent and(n:DistanceFromCharacter(e.Parent. end
Position)>=e.ConversationDistance)then wanderDialog()end wait(1)end end function local resetColor
startDialog(w)if w.Parent and w.Parent:IsA'BasePart'then if n: resetColor = function(frame, tone)
DistanceFromCharacter(w.Parent.Position)>=w.ConversationDistance then if tone == Enum.DialogTone.Neutral then
showMessage(h,i)return end for x,y in pairs(s)do if x and y then y.Enabled=false frame.BackgroundColor3 = Color3.new(0, 0, 179 / 255)
end end renewKillswitch(x)delay(1,checkForLeaveArea)doDialog(x)end end function frame.Number.TextColor3 = Color3.new(45 / 255, 142 / 255, 245 / 255)
removeDialog(w)if s[w]then s[w]:Remove()s[w]=nil end if t[w]then t[w]: elseif tone == Enum.DialogTone.Friendly then
disconnect()t[w]=nil end end function addDialog(w)if w.Parent then if w.Parent: frame.BackgroundColor3 = Color3.new(0, 77 / 255, 0)
IsA'BasePart'then local x=o:clone()x.Enabled=not w.InUse x.Adornee=w.Parent x. frame.Number.TextColor3 = Color3.new(0, 190 / 255, 0)
RobloxLocked=true x.Parent=game.CoreGui x.Image.Button.MouseButton1Click: elseif tone == Enum.DialogTone.Enemy then
connect(function()startDialog(w)end)setChatNotificationTone(x,w.Purpose,w.Tone)s frame.BackgroundColor3 = Color3.new(140 / 255, 0, 0)
[w]=x t[w]=w.Changed:connect(function(y)if y=='Parent'and w.Parent then frame.Number.TextColor3 = Color3.new(255 / 255, 88 / 255, 79 / 255)
removeDialog(w)addDialog(w)elseif y=='InUse'then x.Enabled=not e and not w.InUse end
if w==e then timeoutDialog()end elseif y=='Tone'or y=='Purpose'then end
setChatNotificationTone(x,w.Purpose,w.Tone)end end)else t[w]=w.Changed:connect( local styleChoices
function(x)if x=='Parent'and w.Parent then removeDialog(w)addDialog(w)end end) styleChoices = function(tone)
end end end function fetchScripts()local w=game:GetService'InsertService': for _, obj in pairs(choices) do
LoadAsset(39226062)if type(w)=='string'then wait(0.1)w=game:GetService resetColor(obj, tone)
'InsertService':LoadAsset(39226062)end if type(w)=='string'then return end end
waitForChild(w,'TimeoutScript')q=w.TimeoutScript waitForChild(w, return resetColor(lastChoice, tone)
'ReenableDialogScript')r=w.ReenableDialogScript end function onLoad() end
waitForProperty(game.Players,'LocalPlayer')n=game.Players.LocalPlayer local styleMainFrame
waitForProperty(n,'Character')fetchScripts()createChatNotificationGui() styleMainFrame = function(tone)
createMessageDialog()p.RobloxLocked=true p.Parent=u waitForChild(u, if tone == Enum.DialogTone.Neutral then
'BottomLeftControl')local w=Instance.new'Frame'w.Name='DialogFrame'w.Position= mainFrame.Style = Enum.FrameStyle.ChatBlue
UDim2.new(0,0,0,0)w.Size=UDim2.new(0,0,0,0)w.BackgroundTransparency=1 w. mainFrame.Tail.Image = "rbxasset://textures/chatBubble_botBlue_tailRight.png"
RobloxLocked=true w.Parent=u.BottomLeftControl initialize(w)game. elseif tone == Enum.DialogTone.Friendly then
CollectionService.ItemAdded:connect(function(x)if x:IsA'Dialog'then addDialog(x) mainFrame.Style = Enum.FrameStyle.ChatGreen
end end)game.CollectionService.ItemRemoved:connect(function(x)if x:IsA'Dialog' mainFrame.Tail.Image = "rbxasset://textures/chatBubble_botGreen_tailRight.png"
then removeDialog(x)end end)for x,y in pairs(game.CollectionService: elseif tone == Enum.DialogTone.Enemy then
GetCollection'Dialog')do if y:IsA'Dialog'then addDialog(y)end end end onLoad() mainFrame.Style = Enum.FrameStyle.ChatRed
mainFrame.Tail.Image = "rbxasset://textures/chatBubble_botRed_tailRight.png"
end
return styleChoices(tone)
end
local setChatNotificationTone
setChatNotificationTone = function(gui, purpose, tone)
if tone == Enum.DialogTone.Neutral then
gui.Image.Image = "rbxasset://textures/chatBubble_botBlue_notify_bkg.png"
elseif tone == Enum.DialogTone.Friendly then
gui.Image.Image = "rbxasset://textures/chatBubble_botGreen_notify_bkg.png"
elseif tone == Enum.DialogTone.Enemy then
gui.Image.Image = "rbxasset://textures/chatBubble_botRed_notify_bkg.png"
end
if purpose == Enum.DialogPurpose.Quest then
gui.Image.Button.Image = "rbxasset://textures/chatBubble_bot_notify_bang.png"
elseif purpose == Enum.DialogPurpose.Help then
gui.Image.Button.Image = "rbxasset://textures/chatBubble_bot_notify_question.png"
elseif purpose == Enum.DialogPurpose.Shop then
gui.Image.Button.Image = "rbxasset://textures/chatBubble_bot_notify_money.png"
end
end
local createMessageDialog
createMessageDialog = function()
messageDialog = New("Frame", "DialogScriptMessage", {
Style = Enum.FrameStyle.RobloxRound,
Visible = false,
New("TextLabel", "Text", {
Position = UDim2.new(0, 0, 0, -1),
Size = UDim2.new(1, 0, 1, 0),
FontSize = Enum.FontSize.Size14,
BackgroundTransparency = 1,
TextColor3 = Color3.new(1, 1, 1),
RobloxLocked = true
})
})
end
local showMessage
showMessage = function(msg, size)
messageDialog.Text.Text = msg
messageDialog.Size = UDim2.new(0, size, 0, 40)
messageDialog.Position = UDim2.new(0.5, -size / 2, 0.5, -40)
messageDialog.Visible = true
wait(2)
messageDialog.Visible = false
return messageDialog
end
local variableDelay
variableDelay = function(str)
local length = math.min(string.len(str), 100)
return wait(0.75 + (length / 75) * 1.5)
end
local highlightColor
highlightColor = function(frame, tone)
if tone == Enum.DialogTone.Neutral then
frame.BackgroundColor3 = Color3.new(2 / 255, 108 / 255, 255 / 255)
frame.Number.TextColor3 = Color3.new(1, 1, 1)
elseif tone == Enum.DialogTone.Friendly then
frame.BackgroundColor3 = Color3.new(0, 128 / 255, 0)
frame.Number.TextColor3 = Color3.new(1, 1, 1)
elseif tone == Enum.DialogTone.Enemy then
frame.BackgroundColor3 = Color3.new(204 / 255, 0, 0)
frame.Number.TextColor3 = Color3.new(1, 1, 1)
end
end
local endDialog
endDialog = function()
if currentAbortDialogScript then
currentAbortDialogScript:Remove()
currentAbortDialogScript = nil
end
local dialog = currentConversationDialog
currentConversationDialog = nil
if dialog and dialog.InUse then
local reenableScript = reenableDialogScript:Clone()
reenableScript.archivable = false
reenableScript.Disabled = false
reenableScript.Parent = dialog
end
for dialog, gui in pairs(dialogMap) do
if dialog and gui then
gui.Enabled = not dialog.InUse
end
end
currentConversationPartner = nil
end
local wanderDialog
wanderDialog = function()
print("Wander")
mainFrame.Visible = false
endDialog()
return showMessage(characterWanderedOffMessage, characterWanderedOffSize)
end
local timeoutDialog
timeoutDialog = function()
print("Timeout")
mainFrame.Visible = false
endDialog()
return showMessage(conversationTimedOut, conversationTimedOutSize)
end
local normalEndDialog
normalEndDialog = function()
print("Done")
return endDialog()
end
local sanitizeMessage
sanitizeMessage = function(msg)
if string.len(msg) == 0 then
return "..."
else
return msg
end
end
local renewKillswitch
renewKillswitch = function(dialog)
if currentAbortDialogScript then
currentAbortDialogScript:Remove()
currentAbortDialogScript = nil
end
currentAbortDialogScript = timeoutScript:Clone()
currentAbortDialogScript.archivable = false
currentAbortDialogScript.Disabled = false
currentAbortDialogScript.Parent = dialog
return currentAbortDialogScript
end
local presentDialogChoices
presentDialogChoices = function(talkingPart, dialogChoices)
if not currentConversationDialog then
return
end
currentConversationPartner = talkingPart
local sortedDialogChoices = { }
for _, obj in pairs(dialogChoices) do
if obj:IsA("DialogChoice") then
table.insert(sortedDialogChoices, obj)
end
end
table.sort(sortedDialogChoices, function(a, b)
return a.Name < b.Name
end)
if #sortedDialogChoices == 0 then
normalEndDialog()
return
end
local pos = 1
local yPosition = 0
choiceMap = { }
for _, obj in pairs(choices) do
obj.Visible = false
end
for _, obj in pairs(sortedDialogChoices) do
if pos <= #choices then
choices[pos].Size = UDim2.new(1, 0, 0, 24 * 3)
choices[pos].UserPrompt.Text = obj.UserDialog
local height = math.ceil(choices[pos].UserPrompt.TextBounds.Y / 24) * 24
choices[pos].Position = UDim2.new(0, 0, 0, yPosition)
choices[pos].Size = UDim2.new(1, 0, 0, height)
choices[pos].Visible = true
choiceMap[choices[pos]] = obj
yPosition = yPosition + height
pos = pos + 1
end
end
lastChoice.Position = UDim2.new(0, 0, 0, yPosition)
lastChoice.Number.Text = pos .. ")"
mainFrame.Size = UDim2.new(0, 350, 0, yPosition + 24 + 32)
mainFrame.Position = UDim2.new(0, 20, 0, -mainFrame.Size.Y.Offset - 20)
styleMainFrame(currentTone())
mainFrame.Visible = true
end
local selectChoice
selectChoice = function(choice)
renewKillswitch(currentConversationDialog)
mainFrame.Visible = false
if choice == lastChoice then
game.Chat:Chat(game.Players.LocalPlayer.Character, "Goodbye!", getChatColor(currentTone()))
return normalEndDialog()
else
local dialogChoice = choiceMap[choice]
game.Chat:Chat(game.Players.LocalPlayer.Character, sanitizeMessage(dialogChoice.UserDialog), getChatColor(currentTone()))
wait(1)
currentConversationDialog:SignalDialogChoiceSelected(player, dialogChoice)
game.Chat:Chat(currentConversationPartner, sanitizeMessage(dialogChoice.ResponseDialog), getChatColor(currentTone()))
variableDelay(dialogChoice.ResponseDialog)
return presentDialogChoices(currentConversationPartner, dialogChoice:GetChildren())
end
end
local newChoice
newChoice = function(numberText)
local frame = New("TextButton", {
BackgroundColor3 = Color3.new(0, 0, 179 / 255),
AutoButtonColor = false,
BorderSizePixel = 0,
Text = "",
RobloxLocked = true,
New("TextLabel", "Number", {
TextColor3 = Color3.new(127 / 255, 212 / 255, 255 / 255),
Text = numberText,
FontSize = Enum.FontSize.Size14,
BackgroundTransparency = 1,
Position = UDim2.new(0, 4, 0, 2),
Size = UDim2.new(0, 20, 0, 24),
TextXAlignment = Enum.TextXAlignment.Left,
TextYAlignment = Enum.TextYAlignment.Top,
RobloxLocked = true
}),
New("TextLabel", "UserPrompt", {
BackgroundTransparency = 1,
TextColor3 = Color3.new(1, 1, 1),
FontSize = Enum.FontSize.Size14,
Position = UDim2.new(0, 28, 0, 2),
Size = UDim2.new(1, -32, 1, -4),
TextXAlignment = Enum.TextXAlignment.Left,
TextYAlignment = Enum.TextYAlignment.Top,
TextWrap = true,
RobloxLocked = true
})
})
frame.MouseEnter:connect(function()
return highlightColor(frame, currentTone())
end)
frame.MouseLeave:connect(function()
return resetColor(frame, currentTone())
end)
frame.MouseButton1Click:connect(function()
return selectChoice(frame)
end)
return frame
end
local initialize
initialize = function(parent)
choices[1] = newChoice("1)")
choices[2] = newChoice("2)")
choices[3] = newChoice("3)")
choices[4] = newChoice("4)")
lastChoice = newChoice("5)")
lastChoice.UserPrompt.Text = "Goodbye!"
lastChoice.Size = UDim2.new(1, 0, 0, 28)
mainFrame = New("Frame", "UserDialogArea", {
Size = UDim2.new(0, 350, 0, 200),
Style = Enum.FrameStyle.ChatBlue,
Visible = false,
New("ImageLabel", "Tail", {
Size = UDim2.new(0, 62, 0, 53),
Position = UDim2.new(1, 8, 0.25),
Image = "rbxasset://textures/chatBubble_botBlue_tailRight.png",
BackgroundTransparency = 1,
RobloxLocked = true
})
})
for _, obj in pairs(choices) do
obj.RobloxLocked = true
obj.Parent = mainFrame
lastChoice.RobloxLocked = true
end
lastChoice.Parent = mainFrame
mainFrame.RobloxLocked = true
mainFrame.Parent = parent
end
local doDialog
doDialog = function(dialog)
while not Instance.Lock(dialog, player) do
wait()
end
if dialog.InUse then
Instance.Unlock(dialog)
return
else
dialog.InUse = true
Instance.Unlock(dialog)
end
currentConversationDialog = dialog
game.Chat:Chat(dialog.Parent, dialog.InitialPrompt, getChatColor(dialog.Tone))
variableDelay(dialog.InitialPrompt)
return presentDialogChoices(dialog.Parent, dialog:GetChildren())
end
local checkForLeaveArea
checkForLeaveArea = function()
while currentConversationDialog do
if currentConversationDialog.Parent and (player:DistanceFromCharacter(currentConversationDialog.Parent.Position >= currentConversationDialog.ConversationDistance)) then
wanderDialog()
end
wait(1)
end
end
local startDialog
startDialog = function(dialog)
if dialog.Parent and dialog.Parent:IsA("BasePart") then
if player:DistanceFromCharacter(dialog.Parent.Position) >= dialog.ConversationDistance then
showMessage(tooFarAwayMessage, tooFarAwaySize)
return
end
for dialog, gui in pairs(dialogMap) do
if dialog and gui then
gui.Enabled = false
end
end
renewKillswitch(dialog)
delay(1, checkForLeaveArea)
return doDialog(dialog)
end
end
local removeDialog
removeDialog = function(dialog)
if dialogMap[dialog] then
dialogMap[dialog]:Remove()
dialogMap[dialog] = nil
end
if dialogConnections[dialog] then
dialogConnections[dialog]:disconnect()
dialogConnections[dialog] = nil
end
end
local addDialog
addDialog = function(dialog)
if dialog.Parent then
if dialog.Parent:IsA("BasePart") then
local chatGui = chatNotificationGui:clone()
chatGui.Enabled = not dialog.InUse
chatGui.Adornee = dialog.Parent
chatGui.RobloxLocked = true
chatGui.Parent = game.CoreGui
chatGui.Image.Button.MouseButton1Click:connect(function()
return startDialog(dialog)
end)
setChatNotificationTone(chatGui, dialog.Purpose, dialog.Tone)
dialogMap[dialog] = chatGui
dialogConnections[dialog] = dialog.Changed:connect(function(prop)
if prop == "Parent" and dialog.Parent then
removeDialog(dialog)
return addDialog(dialog)
elseif prop == "InUse" then
chatGui.Enabled = not currentConversationDialog and not dialog.InUse
if dialog == currentConversationDialog then
return timeoutDialog()
end
elseif prop == "Tone" or prop == "Purpose" then
return setChatNotificationTone(chatGui, dialog.Purpose, dialog.Tone)
end
end)
else
dialogConnections[dialog] = dialog.Changed:connect(function(prop)
if prop == "Parent" and dialog.Parent then
removeDialog(dialog)
return addDialog(dialog)
end
end)
end
end
end
local fetchScripts
fetchScripts = function()
local model = game:GetService("InsertService"):LoadAsset(39226062)
if type(model) == "string" then
wait(0.1)
model = game:GetService("InsertService"):LoadAsset(39226062)
end
if type(model) == "string" then
return
end
waitForChild(model, "TimeoutScript")
timeoutScript = model.TimeoutScript
waitForChild(model, "ReenableDialogScript")
reenableDialogScript = model.ReenableDialogScript
end
local onLoad
onLoad = function()
waitForProperty(game.Players, "LocalPlayer")
player = game.Players.LocalPlayer
waitForProperty(player, "Character")
fetchScripts()
createChatNotificationGui()
createMessageDialog()
messageDialog.RobloxLocked = true
messageDialog.Parent = gui
waitForChild(gui, "BottomLeftControl")
local frame = New("Frame", "DialogFrame", {
Position = UDim2.new(0, 0, 0, 0),
Size = UDim2.new(0, 0, 0, 0),
BackgroundTransparency = 1,
RobloxLocked = true,
Parent = gui.BottomLeftControl
})
initialize(frame)
game.CollectionService.ItemAdded:connect(function(obj)
if obj:IsA("Dialog") then
return addDialog(obj)
end
end)
game.CollectionService.ItemRemoved:connect(function(obj)
if obj:IsA("Dialog") then
return removeDialog(obj)
end
end)
for _, obj in pairs(game.CollectionService:GetCollection("Dialog")) do
if obj:IsA("Dialog") then
addDialog(obj)
end
end
end
return onLoad()

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,16 @@
local a={}a.Foo=function()print'foo'end a.Bar=function()print'bar'end a.Help= print("[Mercury]: Loaded corescript 45374389")
function(b)if b=='Foo'or b==a.Foo then return local t = { }
'Function Foo. Arguments: None. Side effect: prints foo'elseif b=='Bar'or b==a t.Foo = function()
.Bar then return'Function Bar. Arguments: None. Side effect: prints bar'end return print("foo")
end return a end
t.Bar = function()
return print("bar")
end
t.Help = function(funcNameOrFunc)
if "Foo" == funcNameOrFunc or t.Foo == funcNameOrFunc then
return "Function Foo. Arguments: None. Side effect: prints foo"
elseif "Bar" == funcNameOrFunc or t.Bar == funcNameOrFunc then
return "Function Bar. Arguments: None. Side effect: prints bar"
end
end
return t

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,84 +1,235 @@
function waitForProperty(a,b)while not a[b]do a.Changed:wait()end end function print("[Mercury]: Loaded corescript 48488398")
waitForChild(a,b)while not a:FindFirstChild(b)do a.ChildAdded:wait()end end local waitForProperty
waitForProperty(game.Players,'LocalPlayer')waitForChild(script.Parent,'Popup') waitForProperty = function(instance, property)
waitForChild(script.Parent.Popup,'AcceptButton')script.Parent.Popup.AcceptButton while not instance[property] do
.Modal=true local a,b,c,d,e=game.Players.LocalPlayer,nil,{},true,function()if instance.Changed:wait()
script.Parent.Popup then script.Parent.Popup.Visible=false end end function end
makeFriend(f,g)local h=script.Parent:FindFirstChild'Popup'if h==nil then return end
end if h.Visible then return end if c[f]then return end h.PopupText.Text= local waitForChild
'Accept Friend Request from '..tostring(f.Name)..'?'h.PopupImage.Image= waitForChild = function(instance, name)
'http://www.roblox.com/thumbs/avatar.ashx?userId='..tostring(f.userId).. while not instance:FindFirstChild(name) do
'&x=352&y=352'showTwoButtons()h.Visible=true h.AcceptButton.Text='Accept'h. instance.ChildAdded:wait()
DeclineButton.Text='Decline'h:TweenSize(UDim2.new(0,330,0,350),Enum. end
EasingDirection.Out,Enum.EasingStyle.Quart,1,true)local i,j i=h.AcceptButton. end
MouseButton1Click:connect(function()h.Visible=false g:RequestFriendship(f)if i waitForProperty(game.Players, "LocalPlayer")
then i:disconnect()end if j then j:disconnect()end h:TweenSize(UDim2.new(0,0,0,0 waitForChild(script.Parent, "Popup")
),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true,e())end)j=h. waitForChild(script.Parent.Popup, "AcceptButton")
DeclineButton.MouseButton1Click:connect(function()h.Visible=false g: script.Parent.Popup.AcceptButton.Modal = true
RevokeFriendship(f)c[f]=true print'pop up blacklist'if i then i:disconnect()end local localPlayer = game.Players.LocalPlayer
if j then j:disconnect()end h:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection. local teleportUI
Out,Enum.EasingStyle.Quart,1,true,e())end)end game.Players.FriendRequestEvent: local friendRequestBlacklist = { }
connect(function(f,g,h)if f~=a and g~=a then return end if f==a then if h==Enum. local teleportEnabled = true
FriendRequestEvent.Accept then game:GetService'GuiService':SendNotification( local showOneButton
'You are Friends','With '..g.Name..'!', showOneButton = function()
'http://www.roblox.com/thumbs/avatar.ashx?userId='..tostring(g.userId).. local popup = script.Parent:FindFirstChild("Popup")
'&x=48&y=48',5,function()end)end elseif g==a then if h==Enum.FriendRequestEvent. if popup then
Issue then if c[f]then return end game:GetService'GuiService':SendNotification( popup.OKButton.Visible = true
'Friend Request','From '..f.Name, popup.DeclineButton.Visible = false
'http://www.roblox.com/thumbs/avatar.ashx?userId='..tostring(f.userId).. popup.AcceptButton.Visible = false
'&x=48&y=48',8,function()makeFriend(f,g)end)elseif h==Enum.FriendRequestEvent. end
Accept then game:GetService'GuiService':SendNotification('You are Friends', return popup
'With '..f.Name..'!','http://www.roblox.com/thumbs/avatar.ashx?userId='.. end
tostring(f.userId)..'&x=48&y=48',5,function()end)end end end)function local showTwoButtons
showOneButton()local f=script.Parent:FindFirstChild'Popup'if f then f.OKButton. showTwoButtons = function()
Visible=true f.DeclineButton.Visible=false f.AcceptButton.Visible=false end end local popup = script.Parent:FindFirstChild("Popup")
function showTwoButtons()local f=script.Parent:FindFirstChild'Popup'if f then f. if popup then
OKButton.Visible=false f.DeclineButton.Visible=true f.AcceptButton.Visible=true popup.OKButton.Visible = false
end end function showTeleportUI(f,g)if b~=nil then b:Remove()end waitForChild(a, popup.DeclineButton.Visible = true
'PlayerGui')b=Instance.new'Message'b.Text=f b.Parent=a.PlayerGui if g>0 then popup.AcceptButton.Visible = true
wait(g)b:Remove()end end function onTeleport(f,g,h)if game:GetService end
'TeleportService'.CustomizedTeleportUI==false then if f==Enum.TeleportState. return popup
Started then showTeleportUI('Teleport started...',0)elseif f==Enum.TeleportState end
.WaitingForServer then showTeleportUI('Requesting server...',0)elseif f==Enum. local makePopupInvisible
TeleportState.InProgress then showTeleportUI('Teleporting...',0)elseif f==Enum. makePopupInvisible = function()
TeleportState.Failed then showTeleportUI( if script.Parent.Popup then
[[Teleport failed. Insufficient privileges or target place does not exist.]],3) script.Parent.Popup.Visible = false
end end end if d then a.OnTeleport:connect(onTeleport)game:GetService end
'TeleportService'.ErrorCallback=function(f)local h=script.Parent:FindFirstChild end
'Popup'showOneButton()h.PopupText.Text=f local i i=h.OKButton.MouseButton1Click: local makeFriend
connect(function()game:GetService'TeleportService':TeleportCancel()if i then i: makeFriend = function(fromPlayer, toPlayer)
disconnect()end game.GuiService:RemoveCenterDialog(script.Parent:FindFirstChild local popup = script.Parent:FindFirstChild("Popup")
'Popup')h:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle if not (popup ~= nil) then
.Quart,1,true,e())end)game.GuiService:AddCenterDialog(script.Parent: return
FindFirstChild'Popup',Enum.CenterDialogType.QuitDialog,function()showOneButton() end
script.Parent:FindFirstChild'Popup'.Visible=true h:TweenSize(UDim2.new(0,330,0, if popup.Visible then
350),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true)end,function()h: return
TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1, end
true,e())end)end game:GetService'TeleportService'.ConfirmationCallback=function( if friendRequestBlacklist[fromPlayer] then
f,h,i)local j=script.Parent:FindFirstChild'Popup'j.PopupText.Text=f j.PopupImage return
.Image=''local k,l local function killCons()if k then k:disconnect()end if l end
then l:disconnect()end game.GuiService:RemoveCenterDialog(script.Parent: popup.PopupText.Text = "Accept Friend Request from " .. tostring(fromPlayer.Name) .. "?"
FindFirstChild'Popup')j:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out, popup.PopupImage.Image = "http://www.roblox.com/thumbs/avatar.ashx?userId=" .. tostring(fromPlayer.userId) .. "&x=352&y=352"
Enum.EasingStyle.Quart,1,true,e())end k=j.AcceptButton.MouseButton1Click: showTwoButtons()
connect(function()killCons()local m,n=pcall(function()game:GetService popup.Visible = true
'TeleportService':TeleportImpl(h,i)end)if not m then showOneButton()j.PopupText. popup.AcceptButton.Text = "Accept"
Text=n local o o=j.OKButton.MouseButton1Click:connect(function()if o then o: popup.DeclineButton.Text = "Decline"
disconnect()end game.GuiService:RemoveCenterDialog(script.Parent:FindFirstChild popup:TweenSize(UDim2.new(0, 330, 0, 350), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true)
'Popup')j:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle local yesCon, noCon
.Quart,1,true,e())end)game.GuiService:AddCenterDialog(script.Parent: yesCon = popup.AcceptButton.MouseButton1Click:connect(function()
FindFirstChild'Popup',Enum.CenterDialogType.QuitDialog,function()showOneButton() popup.Visible = false
script.Parent:FindFirstChild'Popup'.Visible=true j:TweenSize(UDim2.new(0,330,0, toPlayer:RequestFriendship(fromPlayer)
350),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true)end,function()j: if yesCon ~= nil then
TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1, yesCon:disconnect()
true,e())end)end end)l=j.DeclineButton.MouseButton1Click:connect(function() end
killCons()pcall(function()game:GetService'TeleportService':TeleportCancel()end) if noCon ~= nil then
end)local m=pcall(function()game.GuiService:AddCenterDialog(script.Parent: noCon:disconnect()
FindFirstChild'Popup',Enum.CenterDialogType.QuitDialog,function()showTwoButtons( end
)j.AcceptButton.Text='Leave'j.DeclineButton.Text='Stay'script.Parent: return popup:TweenSize(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true, makePopupInvisible())
FindFirstChild'Popup'.Visible=true j:TweenSize(UDim2.new(0,330,0,350),Enum. end)
EasingDirection.Out,Enum.EasingStyle.Quart,1,true)end,function()j:TweenSize( noCon = popup.DeclineButton.MouseButton1Click:connect(function()
UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true,e()) popup.Visible = false
end)end)if m==false then script.Parent:FindFirstChild'Popup'.Visible=true j. toPlayer:RevokeFriendship(fromPlayer)
AcceptButton.Text='Leave'j.DeclineButton.Text='Stay'j:TweenSize(UDim2.new(0,330, friendRequestBlacklist[fromPlayer] = true
0,350),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true)end return true print("pop up blacklist")
end end if yesCon ~= nil then
yesCon:disconnect()
end
if noCon ~= nil then
noCon:disconnect()
end
return popup:TweenSize(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true, makePopupInvisible())
end)
end
game.Players.FriendRequestEvent:connect(function(fromPlayer, toPlayer, event)
if fromPlayer ~= localPlayer and toPlayer ~= localPlayer then
return
end
if fromPlayer == localPlayer then
if event == Enum.FriendRequestEvent.Accept then
return game:GetService("GuiService"):SendNotification("You are Friends", "With " .. tostring(toPlayer.Name) .. "!", "http://www.roblox.com/thumbs/avatar.ashx?userId=" .. tostring(toPlayer.userId) .. "&x=48&y=48", 5, function() end)
end
elseif toPlayer == localPlayer then
if event == Enum.FriendRequestEvent.Issue then
if friendRequestBlacklist[fromPlayer] then
return
end
return game:GetService("GuiService"):SendNotification("Friend Request", "From " .. tostring(fromPlayer.Name), "http://www.roblox.com/thumbs/avatar.ashx?userId=" .. tostring(fromPlayer.userId) .. "&x=48&y=48", 8, function()
return makeFriend(fromPlayer, toPlayer)
end)
elseif event == Enum.FriendRequestEvent.Accept then
return game:GetService("GuiService"):SendNotification("You are Friends", "With " .. tostring(fromPlayer.Name) .. "!", "http://www.roblox.com/thumbs/avatar.ashx?userId=" .. tostring(fromPlayer.userId) .. "&x=48&y=48", 5, function() end)
end
end
end)
local showTeleportUI
showTeleportUI = function(message, timer)
if teleportUI ~= nil then
teleportUI:Remove()
end
waitForChild(localPlayer, "PlayerGui")
local _with_0 = Instance.new("Message")
_with_0.Text = message
_with_0.Parent = localPlayer.PlayerGui
if timer > 0 then
wait(timer)
_with_0:Remove()
end
return _with_0
end
local onTeleport
onTeleport = function(teleportState, _, _)
if game:GetService("TeleportService").CustomizedTeleportUI == false then
return showTeleportUI((function()
if Enum.TeleportState.Started == teleportState then
return "Teleport started...", 0
elseif Enum.TeleportState.WaitingForServer == teleportState then
return "Requesting server...", 0
elseif Enum.TeleportState.InProgress == teleportState then
return "Teleporting...", 0
elseif Enum.TeleportState.Failed == teleportState then
return "Teleport failed. Insufficient privileges or target place does not exist.", 3
end
end)())
end
end
if teleportEnabled then
localPlayer.OnTeleport:connect(onTeleport)
game:GetService("TeleportService").ErrorCallback = function(message)
local popup = script.Parent:FindFirstChild("Popup")
showOneButton()
popup.PopupText.Text = message
local clickCon
clickCon = popup.OKButton.MouseButton1Click:connect(function()
game:GetService("TeleportService"):TeleportCancel()
if clickCon then
clickCon:disconnect()
end
game.GuiService:RemoveCenterDialog(script.Parent:FindFirstChild("Popup"))
return popup:TweenSize(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true, makePopupInvisible())
end)
return game.GuiService:AddCenterDialog(script.Parent:FindFirstChild("Popup", Enum.CenterDialogType.QuitDialog), function()
showOneButton()
script.Parent:FindFirstChild("Popup").Visible = true
return popup:TweenSize(UDim2.new(0, 330, 0, 350), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true)
end, function()
return popup:TweenSize(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true, makePopupInvisible())
end)
end
game:GetService("TeleportService").ConfirmationCallback = function(message, placeId, spawnName)
local popup = script.Parent:FindFirstChild("Popup")
popup.PopupText.Text = message
popup.PopupImage.Image = ""
local yesCon, noCon
local killCons
killCons = function()
if yesCon ~= nil then
yesCon:disconnect()
end
if noCon ~= nil then
noCon:disconnect()
end
game.GuiService:RemoveCenterDialog(script.Parent:FindFirstChild("Popup"))
return popup:TweenSize(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true, makePopupInvisible())
end
yesCon = popup.AcceptButton.MouseButton1Click:connect(function()
killCons()
local success, err
success, err = pcall(function()
return game:GetService("TeleportService"):TeleportImpl(placeId, spawnName)
end)
if not success then
showOneButton()
popup.PopupText.Text = err
local clickCon
clickCon = popup.OKButton.MouseButton1Click:connect(function()
if clickCon ~= nil then
clickCon:disconnect()
end
game.GuiService:RemoveCenterDialog(script.Parent:FindFirstChild("Popup"))
return popup:TweenSize(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true, makePopupInvisible())
end)
return game.GuiService:AddCenterDialog(script.Parent:FindFirstChild("Popup", Enum.CenterDialogType.QuitDialog), function()
showOneButton()
script.Parent:FindFirstChild("Popup").Visible = true
return popup:TweenSize(UDim2.new(0, 330, 0, 350), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true)
end, function()
return popup:TweenSize(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true, makePopupInvisible())
end)
end
end)
noCon = popup.DeclineButton.MouseButton1Click:connect(function()
killCons()
return pcall(function()
return game:GetService("TeleportService"):TeleportCancel()
end)
end)
local centerDialogSuccess = pcall(function()
return game.GuiService:AddCenterDialog(script.Parent:FindFirstChild("Popup", Enum.CenterDialogType.QuitDialog), function()
showTwoButtons()
popup.AcceptButton.Text = "Leave"
popup.DeclineButton.Text = "Stay"
script.Parent:FindFirstChild("Popup").Visible = true
return popup:TweenSize(UDim2.new(0, 330, 0, 350), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true)
end, function()
return popup:TweenSize(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true, makePopupInvisible())
end)
end)
if centerDialogSuccess == false then
script.Parent:FindFirstChild("Popup").Visible = true
popup.AcceptButton.Text = "Leave"
popup.DeclineButton.Text = "Stay"
popup:TweenSize(UDim2.new(0, 330, 0, 350), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true)
end
return true
end
end

View File

@ -1,20 +1,91 @@
local a=Instance.new'Frame'a.Position=UDim2.new(0.5,-165,0.5,-175)a.Size=UDim2. print("[Mercury]: Loaded corescript 48488451")
new(0,330,0,350)a.Style=Enum.FrameStyle.RobloxRound a.ZIndex=4 a.Name='Popup'a. local New
Visible=false a.Parent=script.Parent local b=a:clone()b.Size=UDim2.new(1,16,1,16 New = function(className, name, props)
)b.Position=UDim2.new(0,-8,0,-8)b.Name='Darken'b.ZIndex=1 b.Parent=a local c= if not (props ~= nil) then
Instance.new'TextButton'c.Position=UDim2.new(0,20,0,270)c.Size=UDim2.new(0,100,0 props = name
,50)c.Font=Enum.Font.ArialBold c.FontSize=Enum.FontSize.Size24 c.Style=Enum. name = nil
ButtonStyle.RobloxButton c.TextColor3=Color3.new(0.9725490196078431, end
0.9725490196078431,0.9725490196078431)c.Text='Yes'c.ZIndex=5 c.Name= local obj = Instance.new(className)
'AcceptButton'c.Parent=a local d=c:clone()d.Position=UDim2.new(1,-120,0,270)d. if name then
Text='No'd.Name='DeclineButton'd.Parent=a local e=c:clone()e.Name='OKButton'e. obj.Name = name
Text='OK'e.Position=UDim2.new(0.5,-50,0,270)e.Visible=false e.Parent=a local f= end
Instance.new'ImageLabel'f.BackgroundTransparency=1 f.Position=UDim2.new(0.5,-140 local parent
,0,0)f.Size=UDim2.new(0,280,0,280)f.ZIndex=3 f.Name='PopupImage'f.Parent=a local for k, v in pairs(props) do
g=Instance.new'ImageLabel'g.BackgroundTransparency=1 g.Size=UDim2.new(1,0,1,0)g. if type(k) == "string" then
Image='http://www.roblox.com/asset/?id=47574181'g.Name='Backing'g.ZIndex=2 g. if k == "Parent" then
Parent=f local h=Instance.new'TextLabel'h.Name='PopupText'h.Size=UDim2.new(1,0, parent = v
0.8,0)h.Font=Enum.Font.ArialBold h.FontSize=Enum.FontSize.Size36 h. else
BackgroundTransparency=1 h.Text="Hello I'm a popup"h.TextColor3=Color3.new( obj[k] = v
0.9725490196078431,0.9725490196078431,0.9725490196078431)h.TextWrap=true h. end
ZIndex=5 h.Parent=a script:remove() elseif type(k) == "number" and type(v) == "userdata" then
v.Parent = obj
end
end
obj.Parent = parent
return obj
end
local popupFrame = New("Frame", "Popup", {
Position = UDim2.new(0.5, -165, 0.5, -175),
Size = UDim2.new(0, 330, 0, 350),
Style = Enum.FrameStyle.RobloxRound,
ZIndex = 4,
Visible = false,
Parent = script.Parent,
New("TextLabel", "PopupText", {
Size = UDim2.new(1, 0, 0.8, 0),
Font = Enum.Font.ArialBold,
FontSize = Enum.FontSize.Size36,
BackgroundTransparency = 1,
Text = "Hello I'm a popup",
TextColor3 = Color3.new(248 / 255, 248 / 255, 248 / 255),
TextWrap = true,
ZIndex = 5
}),
New("TextButton", "AcceptButton", {
Position = UDim2.new(0, 20, 0, 270),
Size = UDim2.new(0, 100, 0, 50),
Font = Enum.Font.ArialBold,
FontSize = Enum.FontSize.Size24,
Style = Enum.ButtonStyle.RobloxButton,
TextColor3 = Color3.new(248 / 255, 248 / 255, 248 / 255),
Text = "Yes",
ZIndex = 5
}),
New("ImageLabel", "PopupImage", {
BackgroundTransparency = 1,
Position = UDim2.new(0.5, -140, 0, 0),
Size = UDim2.new(0, 280, 0, 280),
ZIndex = 3,
New("ImageLabel", "Backing", {
BackgroundTransparency = 1,
Size = UDim2.new(1, 0, 1, 0),
Image = "http://www.roblox.com/asset/?id=47574181",
ZIndex = 2
})
})
})
local AcceptButton = popupFrame.AcceptButton
do
local _with_0 = popupFrame:clone()
_with_0.Name = "Darken"
_with_0.Size = UDim2.new(1, 16, 1, 16)
_with_0.Position = UDim2.new(0, -8, 0, -8)
_with_0.ZIndex = 1
_with_0.Parent = popupFrame
end
do
local _with_0 = AcceptButton:clone()
_with_0.Name = "DeclineButton"
_with_0.Position = UDim2.new(1, -120, 0, 270)
_with_0.Text = "No"
_with_0.Parent = popupFrame
end
do
local _with_0 = AcceptButton:clone()
_with_0.Name = "OKButton"
_with_0.Text = "OK"
_with_0.Position = UDim2.new(0.5, -50, 0, 270)
_with_0.Visible = false
_with_0.Parent = popupFrame
end
return script:remove()

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,163 +1,731 @@
local a,b,c={},assert,{buffer={}}function c:New()local d={}setmetatable(d,self) print("[Mercury]: Loaded corescript 60595411")
self.__index=self d.buffer={}return d end function c:Append(d)self.buffer[#self. local t = { }
buffer+1]=d end function c:ToString()return table.concat(self.buffer)end local d local New
={backslashes={['\b']='\\b',['\t']='\\t',['\n']='\\n',['\f']='\\f',['\r']='\\r', New = function(className, name, props)
['"']='\\"',['\\']='\\\\',['/']='\\/'}}function d:New()local e={}e.writer=c:New( if not (props ~= nil) then
)setmetatable(e,self)self.__index=self return e end function d:Append(e)self. props = name
writer:Append(e)end function d:ToString()return self.writer:ToString()end name = nil
function d:Write(e)local f=type(e)if f=='nil'then self:WriteNil()elseif f== end
'boolean'or f=='number'then self:WriteString(e)elseif f=='string'then self: local obj = Instance.new(className)
ParseString(e)elseif f=='table'then self:WriteTable(e)elseif f=='function'then if name then
self:WriteFunction(e)elseif f=='thread'or f=='userdata'then self:WriteError(e) obj.Name = name
end end function d:WriteNil()self:Append'null'end function d:WriteString(e)self: end
Append(tostring(e))end function d:ParseString(e)self:Append'"'self:Append(string local parent
.gsub(e,'[%z%c\\"/]',function(f)local g=self.backslashes[f]if g then return g for k, v in pairs(props) do
end return string.format('\\u%.4X',string.byte(f))end))self:Append'"'end if type(k) == "string" then
function d:IsArray(e)local f,g=0,function(f)if type(f)=='number'and f>0 then if if k == "Parent" then
math.floor(f)==f then return true end end return false end for h,i in pairs(e)do parent = v
if not g(h)then return false,'{','}'else f=math.max(f,h)end end return true,'[', else
']',f end function d:WriteTable(e)local f,g,h,i=self:IsArray(e)self:Append(g)if obj[k] = v
f then for j=1,i do self:Write(e[j])if j<i then self:Append','end end else local end
j=true for k,l in pairs(e)do if not j then self:Append','end j=false self: elseif type(k) == "number" and type(v) == "userdata" then
ParseString(k)self:Append':'self:Write(l)end end self:Append(h)end function d: v.Parent = obj
WriteError(e)error(string.format('Encoding of %s unsupported',tostring(e)))end end
function d:WriteFunction(e)if e==Null then self:WriteNil()else self:WriteError(e end
)end end local e={s='',i=0}function e:New(f)local g={}setmetatable(g,self)self. obj.Parent = parent
__index=self g.s=f or g.s return g end function e:Peek()local f=self.i+1 if f<=# return obj
self.s then return string.sub(self.s,f,f)end return nil end function e:Next() end
self.i=self.i+1 if self.i<=#self.s then return string.sub(self.s,self.i,self.i) local assert = assert
end return nil end function e:All()return self.s end local f={escapes={['t']= local Null
'\t',['n']='\n',['f']='\f',['r']='\r',['b']='\b'}}function f:New(g)local h={}h. Null = function()
reader=e:New(g)setmetatable(h,self)self.__index=self return h end function f: return Null
Read()self:SkipWhiteSpace()local g=self:Peek()if g==nil then error(string. end
format("Nil string: '%s'",self:All()))elseif g=='{'then return self:ReadObject() local StringBuilder = {
elseif g=='['then return self:ReadArray()elseif g=='"'then return self: buffer = { }
ReadString()elseif string.find(g,'[%+%-%d]')then return self:ReadNumber()elseif }
g=='t'then return self:ReadTrue()elseif g=='f'then return self:ReadFalse()elseif StringBuilder.New = function(self)
g=='n'then return self:ReadNull()elseif g=='/'then self:ReadComment()return self local o = setmetatable({ }, self)
:Read()else return nil end end function f:ReadTrue()self:TestReservedWord{'t', self.__index = self
'r','u','e'}return true end function f:ReadFalse()self:TestReservedWord{'f','a', o.buffer = { }
'l','s','e'}return false end function f:ReadNull()self:TestReservedWord{'n','u', return o
'l','l'}return nil end function f:TestReservedWord(g)for h,i in ipairs(g)do if end
self:Next()~=i then error(string.format("Error reading '%s': %s",table.concat(g) StringBuilder.Append = function(self, s)
,self:All()))end end end function f:ReadNumber()local g,h=self:Next(),self:Peek( do
)while h~=nil and string.find(h,'[%+%-%d%.eE]')do g=g..self:Next()h=self:Peek() local _obj_0 = self.buffer
end g=tonumber(g)if g==nil then error(string.format("Invalid number: '%s'",g)) _obj_0[#_obj_0 + 1] = s
else return g end end function f:ReadString()local g=''b(self:Next()=='"')while end
self:Peek()~='"'do local h=self:Next()if h=='\\'then h=self:Next()if self. end
escapes[h]then h=self.escapes[h]end end g=g..h end b(self:Next()=='"')local h= StringBuilder.ToString = function(self)
function(h)return string.char(tonumber(h,16))end return string.gsub(g, return table.concat(self.buffer)
'u%x%x(%x%x)',h)end function f:ReadComment()b(self:Next()=='/')local g=self: end
Next()if g=='/'then self:ReadSingleLineComment()elseif g=='*'then self: local JsonWriter = {
ReadBlockComment()else error(string.format('Invalid comment: %s',self:All()))end backslashes = {
end function f:ReadBlockComment()local g=false while not g do local h=self:Next( ["\b"] = "\\b",
)if h=='*'and self:Peek()=='/'then g=true end if not g and h=='/'and self:Peek() ["\t"] = "\\t",
=='*'then error(string.format("Invalid comment: %s, '/*' illegal.",self:All())) ["\n"] = "\\n",
end end self:Next()end function f:ReadSingleLineComment()local g=self:Next() ["\f"] = "\\f",
while g~='\r'and g~='\n'do g=self:Next()end end function f:ReadArray()local g={} ["\r"] = "\\r",
b(self:Next()=='[')local h=false if self:Peek()==']'then h=true end while not h ['"'] = '\\"',
do local i=self:Read()g[#g+1]=i self:SkipWhiteSpace()if self:Peek()==']'then h= ["\\"] = "\\\\",
true end if not h then local j=self:Next()if j~=','then error(string.format( ["/"] = "\\/"
"Invalid array: '%s' due to: '%s'",self:All(),j))end end end b(']'==self:Next()) }
return g end function f:ReadObject()local g={}b(self:Next()=='{')local h=false }
if self:Peek()=='}'then h=true end while not h do local i=self:Read()if type(i) JsonWriter.New = function(self)
~='string'then error(string.format('Invalid non-string object key: %s',i))end local o = setmetatable({ }, self)
self:SkipWhiteSpace()local j=self:Next()if j~=':'then error(string.format( o.writer = StringBuilder:New()
"Invalid object: '%s' due to: '%s'",self:All(),j))end self:SkipWhiteSpace()local self.__index = self
k=self:Read()g[i]=k self:SkipWhiteSpace()if self:Peek()=='}'then h=true end if return o
not h then j=self:Next()if j~=','then error(string.format( end
"Invalid array: '%s' near: '%s'",self:All(),j))end end end b(self:Next()=='}') JsonWriter.Append = function(self, s)
return g end function f:SkipWhiteSpace()local g=self:Peek()while g~=nil and return self.writer:Append(s)
string.find(g,'[%s/]')do if g=='/'then self:ReadComment()else self:Next()end g= end
self:Peek()end end function f:Peek()return self.reader:Peek()end function f:Next JsonWriter.ToString = function(self)
()return self.reader:Next()end function f:All()return self.reader:All()end return self.writer:ToString()
function Encode(g)local h=d:New()h:Write(g)return h:ToString()end function end
Decode(g)local h=f:New(g)return h:Read()end function Null()return Null end a. JsonWriter.Write = function(self, o)
DecodeJSON=function(g)pcall(function()warn local _exp_0 = type(o)
[[RbxUtility.DecodeJSON is deprecated, please use Game:GetService('HttpService'):JSONDecode() instead.]] if "nil" == _exp_0 then
end)if type(g)=='string'then return Decode(g)end print return self:WriteNil()
'RbxUtil.DecodeJSON expects string argument!'return nil end a.EncodeJSON= elseif "boolean" == _exp_0 or "number" == _exp_0 then
function(g)pcall(function()warn return self:WriteString(o)
[[RbxUtility.EncodeJSON is deprecated, please use Game:GetService('HttpService'):JSONEncode() instead.]] elseif "string" == _exp_0 then
end)return Encode(g)end a.MakeWedge=function(g,h,i,j)return game:GetService return self:ParseString(o)
'Terrain':AutoWedgeCell(g,h,i)end a.SelectTerrainRegion=function(g,h,i,j)local k elseif "table" == _exp_0 then
=game.Workspace:FindFirstChild'Terrain'if not k then return end b(g)b(h)if not return self:WriteTable(o)
type(g)=='Region3'then error( elseif "function" == _exp_0 then
[[regionToSelect (first arg), should be of type Region3, but is type]],type(g)) return self:WriteFunction(o)
end if not type(h)=='BrickColor'then error( elseif "thread" == _exp_0 or "userdata" == _exp_0 then
[[color (second arg), should be of type BrickColor, but is type]],type(h))end return self:WriteError(o)
local l,m,n,o,p=k.GetCell,k.WorldToCellPreferSolid,k.CellCenterToWorld,Enum. end
CellMaterial.Empty,Instance.new'Model'p.Name='SelectionContainer'p.Archivable= end
false if j then p.Parent=j else p.Parent=game.Workspace end local q,r,s,t,u,v,w= JsonWriter.WriteNil = function(self)
nil,nil,0,nil,{},{},Instance.new'Part'w.Name='SelectionPart'w.Transparency=1 w. return self:Append("null")
Anchored=true w.Locked=true w.CanCollide=false w.Size=Vector3.new(4.2,4.2,4.2) end
local x=Instance.new'SelectionBox'function createAdornment(y)local z,A=nil,nil JsonWriter.WriteString = function(self, o)
if#v>0 then z=v[1]['part']A=v[1]['box']table.remove(v,1)A.Visible=true else z=w: return self:Append(tostring(o))
Clone()z.Archivable=false A=x:Clone()A.Archivable=false A.Adornee=z A.Parent=p A end
.Adornee=z A.Parent=p end if y then A.Color=y end return z,A end function JsonWriter.ParseString = function(self, s)
cleanUpAdornments()for y,z in pairs(u)do if z.KeepAlive~=r then z.SelectionBox. self:Append('"')
Visible=false table.insert(v,{part=z.SelectionPart,box=z.SelectionBox})u[y]=nil self:Append(string.gsub(s, '[%z%c\\"/]', function(n)
end end end function incrementAliveCounter()s=s+1 if s>1000000 then s=0 end local c = self.backslashes[n]
return s end function adornFullCellsInRegion(y,z)local A,B=y.CFrame.p-(y.Size/2) if c then
+Vector3.new(2,2,2),y.CFrame.p+(y.Size/2)-Vector3.new(2,2,2)local C,D=m(k,A),m(k return c
,B)r=incrementAliveCounter()for E=C.y,D.y do for F=C.z,D.z do for G=C.x,D.x do end
local H=l(k,G,E,F)if H~=o then local I,J,K=n(k,G,E,F),Vector3int16.new(G,E,F), return string.format("\\u%.4X", string.byte(n))
false for L,M in pairs(u)do if L==J then M.KeepAlive=r if z then M.SelectionBox. end))
Color=z end K=true break end end if not K then local N,O=createAdornment(z)N. return self:Append('"')
Size=Vector3.new(4,4,4)N.CFrame=CFrame.new(I)local P={SelectionPart=N, end
SelectionBox=O,KeepAlive=r}u[J]=P end end end end end cleanUpAdornments()end t=g JsonWriter.IsArray = function(self, t)
if i then local y,z=createAdornment(h)y.Size=g.Size y.CFrame=g.CFrame u. local count = 0
SelectionPart=y u.SelectionBox=z q=function(A,B)if A and A~=t then t=A y.Size=A. local isindex
Size y.CFrame=A.CFrame end if B then z.Color=B end end else isindex = function(k)
adornFullCellsInRegion(g,h)q=function(y,z)if y and y~=t then t=y if type(k) == "number" and k > 0 and math.floor(k) == k then
adornFullCellsInRegion(y,z)end end end local y=function()q=nil if p then p: return true
Destroy()end u=nil end return q,y end function a.CreateSignal()local g,h,i={}, end
Instance.new'BindableEvent',{}function g:connect(j)if self~=g then error( return false
'connect must be called with `:`, not `.`',2)end if type(j)~='function'then end
error('Argument #1 of connect must be a function, got a '..type(j),2)end local k for k, _ in pairs(t) do
=h.Event:connect(j)i[k]=true local l={}function l:disconnect()k:disconnect()i[k] if not isindex(k) then
=nil end l.Disconnect=l.disconnect return l end function g:disconnect()if self~= return false, "{", "}"
g then error('disconnect must be called with `:`, not `.`',2)end for j,k in else
pairs(i)do j:disconnect()i[j]=nil end end function g:wait()if self~=g then count = math.max(count, k)
error('wait must be called with `:`, not `.`',2)end return h.Event:wait()end end
function g:fire(...)if self~=g then error( end
'fire must be called with `:`, not `.`',2)end h:Fire(...)end g.Connect=g.connect return true, "[", "]", count
g.Disconnect=g.disconnect g.Wait=g.wait g.Fire=g.fire return g end end
local function Create_PrivImpl(g)if type(g)~='string'then error( JsonWriter.WriteTable = function(self, t)
'Argument of Create must be a string',2)end return function(h)h=h or{}local i,j, local ba, st, et, n = self:IsArray(t)
k=Instance.new(g),nil,nil for l,m in pairs(h)do if type(l)=='string'then if l== self:Append(st)
'Parent'then j=m else i[l]=m end elseif type(l)=='number'then if type(m)~= if ba then
'userdata'then error( for i = 1, n do
[[Bad entry in Create body: Numeric keys must be paired with children, got a: ]] self:Write(t[i])
..type(m),2)end m.Parent=i elseif type(l)=='table'and l.__eventname then if if i < n then
type(m)~='function'then error("Bad entry in Create body: Key `[Create.E'"..l. self:Append(",")
__eventname.."']` must have a function value, got: "..tostring(m),2)end i[l. end
__eventname]:connect(m)elseif l==a.Create then if type(m)~='function'then error( end
[[Bad entry in Create body: Key `[Create]` should be paired with a constructor function, got: ]] else
..tostring(m),2)elseif k then error( local first = true
[[Bad entry in Create body: Only one constructor function is allowed]],2)end k=m for k, v in pairs(t) do
else error('Bad entry ('..tostring(l)..' => '..tostring(m)..') in Create body',2 if not first then
)end end if k then k(i)end if j then i.Parent=j end return i end end a.Create= self:Append(",")
setmetatable({},{__call=function(g,...)return Create_PrivImpl(...)end})a.Create. end
E=function(g)return{__eventname=g}end a.Help=function(g)if g=='DecodeJSON'or g== first = false
a.DecodeJSON then return self:ParseString(k)
[[Function DecodeJSON. Arguments: (string). Side effect: returns a table with all parsed JSON values]] self:Append(":")
end if g=='EncodeJSON'or g==a.EncodeJSON then return self:Write(v)
[[Function EncodeJSON. Arguments: (table). Side effect: returns a string composed of argument table in JSON data format]] end
end if g=='MakeWedge'or g==a.MakeWedge then return end
[[Function MakeWedge. Arguments: (x, y, z, [default material]). Description: Makes a wedge at location x, y, z. Sets cell x, y, z to default material if parameter is provided, if not sets cell x, y, z to be whatever material it previously was. Returns true if made a wedge, false if the cell remains a block ]] return self:Append(et)
end if g=='SelectTerrainRegion'or g==a.SelectTerrainRegion then return end
[[Function SelectTerrainRegion. Arguments: (regionToSelect, color, selectEmptyCells, selectionParent). Description: Selects all terrain via a series of selection boxes within the regionToSelect (this should be a region3 value). The selection box color is detemined by the color argument (should be a brickcolor value). SelectionParent is the parent that the selection model gets placed to (optional).SelectEmptyCells is bool, when true will select all cells in the region, otherwise we only select non-empty cells. Returns a function that can update the selection,arguments to said function are a new region3 to select, and the adornment color (color arg is optional). Also returns a second function that takes no arguments and destroys the selection]] JsonWriter.WriteError = function(self, o)
end if g=='CreateSignal'or g==a.CreateSignal then return return error(string.format("Encoding of %s unsupported", tostring(o)))
[[Function CreateSignal. Arguments: None. Returns: The newly created Signal object. This object is identical to the RBXScriptSignal class used for events in Objects, but is a Lua-side object so it can be used to create custom events inLua code. Methods of the Signal object: :connect, :wait, :fire, :disconnect. For more info you can pass the method name to the Help function, or view the wiki page for this library. EG: Help('Signal:connect').]] end
end if g=='Signal:connect'then return JsonWriter.WriteFunction = function(self, o)
[[Method Signal:connect. Arguments: (function handler). Return: A connection object which can be used to disconnect the connection to this handler. Description: Connectes a handler function to this Signal, so that when |fire| is called the handler function will be called with the arguments passed to |fire|.]] if o == Null then
end if g=='Signal:wait'then return return self:WriteNil()
[[Method Signal:wait. Arguments: None. Returns: The arguments passed to the next call to |fire|. Description: This call does not return until the next call to |fire| is made, at which point it will return the values which were passed as arguments to that |fire| call.]] else
end if g=='Signal:fire'then return return self:WriteError(o)
[[Method Signal:fire. Arguments: Any number of arguments of any type. Returns: None. Description: This call will invoke any connected handler functions, and notify any waiting code attached to this Signal to continue, with the arguments passed to this function. Note: The calls to handlers are made asynchronously, so this call will return immediately regardless of how long it takes the connected handler functions to complete.]] end
end if g=='Signal:disconnect'then return end
[[Method Signal:disconnect. Arguments: None. Returns: None. Description: This call disconnects all handlers attacched to this function, note however, it does NOT make waiting code continue, as is the behavior of normal Roblox events. This method can also be called on the connection object which is returned from Signal:connect to only disconnect a single handler, as opposed to this method, which will disconnect all handlers.]] local StringReader = {
end if g=='Create'then return s = "",
[[Function Create. Arguments: A table containing information about how to construct a collection of objects. Returns: The constructed objects. Descrition: Create is a very powerfull function, whose description is too long to fit here, and is best described via example, please see the wiki page for a description of how to use it.]] i = 0
end end return a }
StringReader.New = function(self, s)
local o = setmetatable({ }, self)
self.__index = self
o.s = s or o.s
return o
end
StringReader.Peek = function(self)
local i = self.i + 1
if i <= #self.s then
return string.sub(self.s, i, i)
end
return nil
end
StringReader.Next = function(self)
self.i = self.i + 1
if self.i <= #self.s then
return string.sub(self.s, self.i, self.i)
end
return nil
end
StringReader.All = function(self)
return self.s
end
local JsonReader = {
escapes = {
["t"] = "\t",
["n"] = "\n",
["f"] = "\f",
["r"] = "\r",
["b"] = "\b"
}
}
JsonReader.New = function(self, s)
local o = setmetatable({ }, self)
o.reader = StringReader:New(s)
self.__index = self
return o
end
JsonReader.Read = function(self)
self:SkipWhiteSpace()
local peek = self:Peek()
if not (peek ~= nil) then
return error(string.format("Nil string: '%s'", self:All()))
elseif peek == "{" then
return self:ReadObject()
elseif peek == "[" then
return self:ReadArray()
elseif peek == '"' then
return self:ReadString()
elseif string.find(peek, "[%+%-%d]") then
return self:ReadNumber()
elseif peek == "t" then
return self:ReadTrue()
elseif peek == "f" then
return self:ReadFalse()
elseif peek == "n" then
return self:ReadNull()
elseif peek == "/" then
self:ReadComment()
return self:Read()
else
return nil
end
end
JsonReader.ReadTrue = function(self)
self:TestReservedWord({
't',
'r',
'u',
'e'
})
return true
end
JsonReader.ReadFalse = function(self)
self:TestReservedWord({
'f',
'a',
'l',
's',
'e'
})
return false
end
JsonReader.ReadNull = function(self)
self:TestReservedWord({
'n',
'u',
'l',
'l'
})
return nil
end
JsonReader.TestReservedWord = function(self, t)
for _, v in ipairs(t) do
if self:Next() ~= v then
error(string.format("Error reading '%s': %s", table.concat(t), self:All()))
end
end
end
JsonReader.ReadNumber = function(self)
local result = self:Next()
local peek = self:Peek()
while (peek ~= nil) and string.find(peek, "[%+%-%d%.eE]") do
result = result .. self:Next()
peek = self:Peek()
end
result = tonumber(result)
if not (result ~= nil) then
return error(string.format("Invalid number: '%s'", result))
else
return result
end
end
JsonReader.ReadString = function(self)
local result = ""
assert(self:Next() == '"')
while self:Peek() ~= '"' do
local ch = self:Next()
if ch == "\\" then
ch = self:Next()
if self.escapes[ch] then
ch = self.escapes[ch]
end
end
result = result .. ch
end
assert(self:Next() == '"')
local fromunicode
fromunicode = function(m)
return string.char(tonumber(m, 16))
end
return string.gsub(result, "u%x%x(%x%x)", fromunicode)
end
JsonReader.ReadComment = function(self)
assert(self:Next() == "/")
local second = self:Next()
if second == "/" then
return self:ReadSingleLineComment()
elseif second == "*" then
return self:ReadBlockComment()
else
return error(string.format("Invalid comment: %s", self:All()))
end
end
JsonReader.ReadBlockComment = function(self)
local done = false
while not done do
local ch = self:Next()
if ch == "*" and self:Peek() == "/" then
done = true
end
if not done and ch == "/" and self:Peek() == "*" then
error(string.format("Invalid comment: %s, '/*' illegal.", self:All()))
end
end
return self:Next()
end
JsonReader.ReadSingleLineComment = function(self)
local ch = self:Next()
while ch ~= "\r" and ch ~= "\n" do
ch = self:Next()
end
end
JsonReader.ReadArray = function(self)
local result = { }
assert(self:Next() == "[")
local done = false
if self:Peek() == "]" then
done = true
end
while not done do
local item = self:Read()
result[#result + 1] = item
self:SkipWhiteSpace()
if self:Peek() == "]" then
done = true
end
if not done then
local ch = self:Next()
if ch ~= "," then
error(string.format("Invalid array: '%s' due to: '%s'", self:All(), ch))
end
end
end
assert("]" == self:Next())
return result
end
JsonReader.ReadObject = function(self)
local result = { }
assert(self:Next() == "{")
local done = false
if self:Peek() == "}" then
done = true
end
while not done do
local key = self:Read()
if type(key) ~= "string" then
error(string.format("Invalid non-string object key: %s", key))
end
self:SkipWhiteSpace()
local ch = self:Next()
if ch ~= ":" then
error(string.format("Invalid object: '%s' due to: '%s'", self:All(), ch))
end
self:SkipWhiteSpace()
local val = self:Read()
result[key] = val
self:SkipWhiteSpace()
if self:Peek() == "}" then
done = true
end
if not done then
ch = self:Next()
if ch ~= "," then
error(string.format("Invalid array: '%s' near: '%s'", self:All(), ch))
end
end
end
assert(self:Next() == "}")
return result
end
JsonReader.SkipWhiteSpace = function(self)
local p = self:Peek()
while (p ~= nil) and string.find(p, "[%s/]") do
if p == "/" then
self:ReadComment()
else
self:Next()
end
p = self:Peek()
end
end
JsonReader.Peek = function(self)
return self.reader:Peek()
end
JsonReader.Next = function(self)
return self.reader:Next()
end
JsonReader.All = function(self)
return self.reader:All()
end
local Encode
Encode = function(o)
local _with_0 = JsonWriter:New()
_with_0:Write(o)
_with_0:ToString()
return _with_0
end
local Decode
Decode = function(s)
local _with_0 = JsonReader:New(s)
_with_0:Read()
return _with_0
end
t.DecodeJSON = function(jsonString)
pcall(function()
return warn('RbxUtility.DecodeJSON is deprecated, please use Game:GetService("HttpService"):JSONDecode() instead.')
end)
if type(jsonString) == "string" then
return Decode(jsonString)
end
print("RbxUtil.DecodeJSON expects string argument!")
return nil
end
t.EncodeJSON = function(jsonTable)
pcall(function()
return warn('RbxUtility.EncodeJSON is deprecated, please use Game:GetService("HttpService"):JSONEncode() instead.')
end)
return Encode(jsonTable)
end
t.MakeWedge = function(x, y, z, _)
return game:GetService("Terrain"):AutoWedgeCell(x, y, z)
end
t.SelectTerrainRegion = function(regionToSelect, color, selectEmptyCells, selectionParent)
local terrain = game.Workspace:FindFirstChild("Terrain")
if not terrain then
return
end
assert(regionToSelect)
assert(color)
if not type(regionToSelect) == "Region3" then
error("regionToSelect (first arg), should be of type Region3, but is type", type(regionToSelect))
end
if not type(color) == "BrickColor" then
error("color (second arg), should be of type BrickColor, but is type", type(color))
end
local GetCell = terrain.GetCell
local WorldToCellPreferSolid = terrain.WorldToCellPreferSolid
local CellCenterToWorld = terrain.CellCenterToWorld
local emptyMaterial = Enum.CellMaterial.Empty
local selectionContainer = New("Model", "SelectionContainer", {
Archivable = false,
Parent = (function()
if selectionParent then
return selectionParent
else
return game.Workspace
end
end)()
})
local updateSelection
local currentKeepAliveTag
local aliveCounter = 0
local lastRegion
local adornments = { }
local reusableAdorns = { }
local selectionPart = New("Part", "SelectionPart", {
Transparency = 1,
Anchored = true,
Locked = true,
CanCollide = false,
Size = Vector3.new(4.2, 4.2, 4.2)
})
local selectionBox = Instance.new("SelectionBox")
local createAdornment
createAdornment = function(theColor)
local selectionPartClone
local selectionBoxClone
if #reusableAdorns > 0 then
selectionPartClone = reusableAdorns[1]["part"]
selectionBoxClone = reusableAdorns[1]["box"]
table.remove(reusableAdorns, 1)
selectionBoxClone.Visible = true
else
selectionPartClone = selectionPart:Clone()
selectionPartClone.Archivable = false
selectionBoxClone = selectionBox:Clone()
selectionBoxClone.Archivable = false
selectionBoxClone.Adornee = selectionPartClone
selectionBoxClone.Parent = selectionContainer
selectionBoxClone.Adornee = selectionPartClone
selectionBoxClone.Parent = selectionContainer
end
if theColor then
selectionBoxClone.Color = theColor
end
return selectionPartClone, selectionBoxClone
end
local cleanUpAdornments
cleanUpAdornments = function()
for cellPos, adornTable in pairs(adornments) do
if adornTable.KeepAlive ~= currentKeepAliveTag then
adornTable.SelectionBox.Visible = false
table.insert(reusableAdorns, {
part = adornTable.SelectionPart,
box = adornTable.SelectionBox
})
adornments[cellPos] = nil
end
end
end
local incrementAliveCounter
incrementAliveCounter = function()
aliveCounter = aliveCounter + 1
if aliveCounter > 1000000 then
aliveCounter = 0
end
return aliveCounter
end
local adornFullCellsInRegion
adornFullCellsInRegion = function(region, color)
local regionBegin = region.CFrame.p - region.Size / 2 + Vector3.new(2, 2, 2)
local regionEnd = region.CFrame.p + region.Size / 2 - Vector3.new(2, 2, 2)
local cellPosBegin = WorldToCellPreferSolid(terrain, regionBegin)
local cellPosEnd = WorldToCellPreferSolid(terrain, regionEnd)
currentKeepAliveTag = incrementAliveCounter()
for y = cellPosBegin.y, cellPosEnd.y do
for z = cellPosBegin.z, cellPosEnd.z do
for x = cellPosBegin.x, cellPosEnd.x do
local cellMaterial = GetCell(terrain, x, y, z)
if cellMaterial ~= emptyMaterial then
local cframePos = CellCenterToWorld(terrain, x, y, z)
local cellPos = Vector3int16.new(x, y, z)
local updated = false
for cellPosAdorn, adornTable in pairs(adornments) do
if cellPosAdorn == cellPos then
adornTable.KeepAlive = currentKeepAliveTag
if color then
adornTable.SelectionBox.Color = color
end
updated = true
break
end
end
if not updated then
local selectionPart, selectionBox
selectionPart, selectionBox = createAdornment(color)
selectionPart.Size = Vector3.new(4, 4, 4)
selectionPart.CFrame = CFrame.new(cframePos)
local adornTable = {
SelectionPart = selectionPart,
SelectionBox = selectionBox,
KeepAlive = currentKeepAliveTag
}
adornments[cellPos] = adornTable
end
end
end
end
end
return cleanUpAdornments()
end
lastRegion = regionToSelect
if selectEmptyCells then
local selectionPart, selectionBox
selectionPart, selectionBox = createAdornment(color)
selectionPart.Size = regionToSelect.Size
selectionPart.CFrame = regionToSelect.CFrame
adornments.SelectionPart = selectionPart
adornments.SelectionBox = selectionBox
updateSelection = function(newRegion, color)
if newRegion and newRegion ~= lastRegion then
lastRegion = newRegion
selectionPart.Size = newRegion.Size
selectionPart.CFrame = newRegion.CFrame
end
if color then
selectionBox.Color = color
end
end
else
adornFullCellsInRegion(regionToSelect, color)
updateSelection = function(newRegion, color)
if newRegion and newRegion ~= lastRegion then
lastRegion = newRegion
return adornFullCellsInRegion(newRegion, color)
end
end
end
local destroyFunc
destroyFunc = function()
updateSelection = nil
if selectionContainer ~= nil then
selectionContainer:Destroy()
end
adornments = nil
end
return updateSelection, destroyFunc
end
t.CreateSignal = function()
local this = { }
local mBindableEvent = Instance.new("BindableEvent")
local mAllCns = { }
this.connect = function(self, func)
if self ~= this then
error("connect must be called with `:`, not `.`", 2)
end
if type(func) ~= "function" then
error("Argument #1 of connect must be a function, got a " .. tostring(type(func)), 2)
end
local cn = mBindableEvent.Event:connect(func)
mAllCns[cn] = true
local pubCn = { }
pubCn.disconnect = function(self)
cn:disconnect()
mAllCns[cn] = nil
end
pubCn.Disconnect = pubCn.disconnect
return pubCn
end
this.disconnect = function(self)
if self ~= this then
error("disconnect must be called with `:`, not `.`", 2)
end
for cn, _ in pairs(mAllCns) do
cn:disconnect()
mAllCns[cn] = nil
end
end
this.wait = function(self)
if self ~= this then
error("wait must be called with `:`, not `.`", 2)
end
return mBindableEvent.Event:wait()
end
this.fire = function(self, ...)
if self ~= this then
error("fire must be called with `:`, not `.`", 2)
end
return mBindableEvent:Fire(...)
end
this.Connect = this.connect
this.Disconnect = this.disconnect
this.Wait = this.wait
this.Fire = this.fire
return this
end
local Create_PrivImpl
Create_PrivImpl = function(objectType)
if type(objectType) ~= "string" then
error("Argument of Create must be a string", 2)
end
return function(dat)
dat = dat or { }
local obj = Instance.new(objectType)
local parent
local ctor
for k, v in pairs(dat) do
if type(k) == "string" then
if k == "Parent" then
parent = v
else
obj[k] = v
end
elseif type(k) == "number" then
if type(v) ~= "userdata" then
error("Bad entry in Create body: Numeric keys must be paired with children, got a: " .. tostring(type(v)), 2)
end
v.Parent = obj
elseif type(k) == "table" and k.__eventname then
if type(v) ~= "function" then
error("Bad entry in Create body: Key `[Create.E'" .. tostring(k.__eventname) .. "']` must have a function value, got: " .. tostring(v), 2)
end
obj[k.__eventname]:connect(v)
elseif k == t.Create then
if type(v) ~= "function" then
error("Bad entry in Create body: Key `[Create]` should be paired with a constructor function, got: " .. tostring(v), 2)
elseif ctor then
error("Bad entry in Create body: Only one constructor function is allowed", 2)
end
ctor = v
else
error("Bad entry (" .. tostring(k) .. " => " .. tostring(v) .. ") in Create body", 2)
end
end
if ctor ~= nil then
ctor(obj)
end
if parent then
obj.Parent = parent
end
return obj
end
end
t.Create = setmetatable({ }, {
["__call"] = function(_, ...)
return Create_PrivImpl(...)
end
})
t.Create.E = function(eventName)
return {
__eventname = eventName
}
end
t.Help = function(funcNameOrFunc)
if "DecodeJSON" == funcNameOrFunc or t.DecodeJSON == funcNameOrFunc then
return "Function DecodeJSON. " .. "Arguments: (string). " .. "Side effect: returns a table with all parsed JSON values"
elseif "EncodeJSON" == funcNameOrFunc or t.EncodeJSON == funcNameOrFunc then
return "Function EncodeJSON. " .. "Arguments: (table). " .. "Side effect: returns a string composed of argument table in JSON data format"
elseif "MakeWedge" == funcNameOrFunc or t.MakeWedge == funcNameOrFunc then
return "Function MakeWedge. " .. "Arguments: (x, y, z, [default material]). " .. "Description: Makes a wedge at location x, y, z. Sets cell x, y, z to default material if " .. "parameter is provided, if not sets cell x, y, z to be whatever material it previously was. " .. "Returns true if made a wedge, false if the cell remains a block "
elseif "SelectTerrainRegion" == funcNameOrFunc or t.SelectTerrainRegion == funcNameOrFunc then
return "Function SelectTerrainRegion. " .. "Arguments: (regionToSelect, color, selectEmptyCells, selectionParent). " .. "Description: Selects all terrain via a series of selection boxes within the regionToSelect " .. "(this should be a region3 value). The selection box color is detemined by the color argument " .. "(should be a brickcolor value). SelectionParent is the parent that the selection model gets placed to (optional)." .. "SelectEmptyCells is bool, when true will select all cells in the " .. "region, otherwise we only select non-empty cells. Returns a function that can update the selection," .. "arguments to said function are a new region3 to select, and the adornment color (color arg is optional). " .. "Also returns a second function that takes no arguments and destroys the selection"
elseif "CreateSignal" == funcNameOrFunc or t.CreateSignal == funcNameOrFunc then
return "Function CreateSignal. " .. "Arguments: None. " .. "Returns: The newly created Signal object. This object is identical to the RBXScriptSignal class " .. "used for events in Objects, but is a Lua-side object so it can be used to create custom events in" .. "Lua code. " .. "Methods of the Signal object: :connect, :wait, :fire, :disconnect. " .. "For more info you can pass the method name to the Help function, or view the wiki page " .. "for this library. EG: Help('Signal:connect')."
elseif "Signal:connect" == funcNameOrFunc then
return "Method Signal:connect. " .. "Arguments: (function handler). " .. "Return: A connection object which can be used to disconnect the connection to this handler. " .. "Description: Connectes a handler function to this Signal, so that when |fire| is called the " .. "handler function will be called with the arguments passed to |fire|."
elseif "Signal:wait" == funcNameOrFunc then
return "Method Signal:wait. " .. "Arguments: None. " .. "Returns: The arguments passed to the next call to |fire|. " .. "Description: This call does not return until the next call to |fire| is made, at which point it " .. "will return the values which were passed as arguments to that |fire| call."
elseif "Signal:fire" == funcNameOrFunc then
return "Method Signal:fire. " .. "Arguments: Any number of arguments of any type. " .. "Returns: None. " .. "Description: This call will invoke any connected handler functions, and notify any waiting code " .. "attached to this Signal to continue, with the arguments passed to this function. Note: The calls " .. "to handlers are made asynchronously, so this call will return immediately regardless of how long " .. "it takes the connected handler functions to complete."
elseif "Signal:disconnect" == funcNameOrFunc then
return "Method Signal:disconnect. " .. "Arguments: None. " .. "Returns: None. " .. "Description: This call disconnects all handlers attacched to this function, note however, it " .. "does NOT make waiting code continue, as is the behavior of normal Roblox events. This method " .. "can also be called on the connection object which is returned from Signal:connect to only " .. "disconnect a single handler, as opposed to this method, which will disconnect all handlers."
elseif "Create" == funcNameOrFunc then
return "Function Create. " .. "Arguments: A table containing information about how to construct a collection of objects. " .. "Returns: The constructed objects. " .. "Descrition: Create is a very powerfull function, whose description is too long to fit here, and " .. "is best described via example, please see the wiki page for a description of how to use it."
end
end
return t

View File

@ -1,7 +1,22 @@
local a,b,c=3569749,game:GetService'ScriptContext',0 while not b and c<3 do c=c+ print("[Mercury]: Loaded corescript 60595695")
1 b=game:GetService'ScriptContext'wait(0.2)end if b then b:RegisterLibrary( local deepakTestingPlace = 3569749
'Libraries/RbxGui','45284430')b:RegisterLibrary('Libraries/RbxGear','45374389') local sc = game:GetService("ScriptContext")
if game.PlaceId==a then b:RegisterLibrary('Libraries/RbxStatus','52177566')end b local tries = 0
:RegisterLibrary('Libraries/RbxUtility','60595411')b:RegisterLibrary( while not (sc or tries > 2) do
'Libraries/RbxStamper','73157242')b:LibraryRegistrationComplete()else print tries = tries + 1
'failed to find script context, libraries did not load'end sc = game:GetService("ScriptContext")
wait(0.2)
end
if sc then
sc:RegisterLibrary("Libraries/RbxGui", "45284430")
sc:RegisterLibrary("Libraries/RbxGear", "45374389")
if game.PlaceId == deepakTestingPlace then
sc:RegisterLibrary("Libraries/RbxStatus", "52177566")
end
sc:RegisterLibrary("Libraries/RbxUtility", "60595411")
sc:RegisterLibrary("Libraries/RbxStamper", "73157242")
sc:LibraryRegistrationComplete()
else
print("failed to find script context, libraries did not load")
end
return sc

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,97 +1,390 @@
if game.CoreGui.Version<7 then return end local function waitForChild(a,b)while print("[Mercury]: Loaded corescript 89449093")
not a:FindFirstChild(b)do a.ChildAdded:wait()end return a:FindFirstChild(b)end if game.CoreGui.Version < 7 then
local function waitForProperty(a,b)while not a[b]do a.Changed:wait()end end return
waitForChild(game,'Players')if#game.Players:GetChildren()<1 then game.Players. end
ChildAdded:wait()end waitForProperty(game.Players,'LocalPlayer')local a=script. local waitForChild
Parent waitForChild(a,'Gear')local b=script.Parent.Parent assert(b:IsA waitForChild = function(instance, name)
'ScreenGui')waitForChild(a,'Tabs')waitForChild(a.Tabs,'CloseButton')local c=a. while not instance:FindFirstChild(name) do
Tabs.CloseButton waitForChild(a.Tabs,'InventoryButton')local d,e=a.Tabs. instance.ChildAdded:wait()
InventoryButton,nil if game.CoreGui.Version>=8 then waitForChild(a.Tabs, end
'WardrobeButton')e=a.Tabs.WardrobeButton end waitForChild(a.Parent, return instance:FindFirstChild(name)
'ControlFrame')local f,g,h=waitForChild(a.Parent.ControlFrame,'BackpackButton'), end
'gear',waitForChild(a,'SearchFrame')waitForChild(a.SearchFrame,'SearchBoxFrame') local waitForProperty
local i,j,k,l=waitForChild(a.SearchFrame.SearchBoxFrame,'SearchBox'), waitForProperty = function(instance, property)
waitForChild(a.SearchFrame,'SearchButton'),waitForChild(a.SearchFrame, while not instance[property] do
'ResetButton'),waitForChild(Game.CoreGui,'RobloxGui')local m=waitForChild(l, instance.Changed:wait()
'CurrentLoadout')local n,o,p,q,r,s,t,u,v,w,x,y=waitForChild(m,'Background'),true end
,true,false,true,false,nil,0.25,'Search...','~','`',UDim2.new(0,600,0,400)if l. end
AbsoluteSize.Y<=320 then y=UDim2.new(0,200,0,140)end function createPublicEvent( waitForChild(game, "Players")
z)assert(z,'eventName is nil')assert(tostring(z),'eventName is not a string') if #game.Players:GetChildren() < 1 then
local A=Instance.new'BindableEvent'A.Name=tostring(z)A.Parent=script return A game.Players.ChildAdded:wait()
end function createPublicFunction(z,A)assert(z,'funcName is nil')assert( end
tostring(z),'funcName is not a string')assert(A,'invokeFunc is nil')assert(type( waitForProperty(game.Players, "LocalPlayer")
A)=='function',"invokeFunc should be of type 'function'")local B=Instance.new local backpack = script.Parent
'BindableFunction'B.Name=tostring(z)B.OnInvoke=A B.Parent=script return B end waitForChild(backpack, "Gear")
local z,A,B,C,D=createPublicEvent'ResizeEvent',createPublicEvent local screen = script.Parent.Parent
'BackpackOpenEvent',createPublicEvent'BackpackCloseEvent',createPublicEvent assert(screen:IsA("ScreenGui"))
'TabClickedEvent',createPublicEvent'SearchRequestedEvent'function waitForChild(backpack, "Tabs")
deactivateBackpack()a.Visible=false r=false end function waitForChild(backpack.Tabs, "CloseButton")
initHumanoidDiedConnections()if t then t:disconnect()end waitForProperty(game. local closeButton = backpack.Tabs.CloseButton
Players.LocalPlayer,'Character')waitForChild(game.Players.LocalPlayer.Character, waitForChild(backpack.Tabs, "InventoryButton")
'Humanoid')t=game.Players.LocalPlayer.Character.Humanoid.Died:connect( local inventoryButton = backpack.Tabs.InventoryButton
deactivateBackpack)end function activateBackpack()initHumanoidDiedConnections()r local wardrobeButton
=true a.Visible=q if q then toggleBackpack()end end local E=function()q=false p= if game.CoreGui.Version >= 8 then
false f.Selected=false resetSearch()B:Fire(g)a.Tabs.Visible=false h.Visible= waitForChild(backpack.Tabs, "WardrobeButton")
false a:TweenSizeAndPosition(UDim2.new(0,y.X.Offset,0,0),UDim2.new(0.5,-y.X. wardrobeButton = backpack.Tabs.WardrobeButton
Offset/2,1,-85),Enum.EasingDirection.Out,Enum.EasingStyle.Quad,u,true,function() end
game.GuiService:RemoveCenterDialog(a)a.Visible=false f.Selected=false end)delay( waitForChild(backpack.Parent, "ControlFrame")
u,function()game.GuiService:RemoveCenterDialog(a)a.Visible=false f.Selected= local backpackButton = waitForChild(backpack.Parent.ControlFrame, "BackpackButton")
false p=true o=true end)end function showBackpack()game.GuiService: local currentTab = "gear"
AddCenterDialog(a,Enum.CenterDialogType.PlayerInitiatedDialog,function()a. local searchFrame = waitForChild(backpack, "SearchFrame")
Visible=true f.Selected=true end,function()a.Visible=false f.Selected=false end) waitForChild(backpack.SearchFrame, "SearchBoxFrame")
a.Visible=true f.Selected=true a:TweenSizeAndPosition(y,UDim2.new(0.5,-y.X. local searchBox = waitForChild(backpack.SearchFrame.SearchBoxFrame, "SearchBox")
Offset/2,1,-y.Y.Offset-88),Enum.EasingDirection.Out,Enum.EasingStyle.Quad,u,true local searchButton = waitForChild(backpack.SearchFrame, "SearchButton")
)delay(u,function()a.Tabs.Visible=false h.Visible=true A:Fire(g)o=true p=true f. local resetButton = waitForChild(backpack.SearchFrame, "ResetButton")
Image='http://www.roblox.com/asset/?id=97644093'f.Position=UDim2.new(0.5,-60,1,- local robloxGui = waitForChild(Game.CoreGui, "RobloxGui")
y.Y.Offset-103)end)end function toggleBackpack()if not game.Players.LocalPlayer local currentLoadout = waitForChild(robloxGui, "CurrentLoadout")
then return end if not game.Players.LocalPlayer['Character']then return end if local loadoutBackground = waitForChild(currentLoadout, "Background")
not o then return end if not p then return end p=false o=false q=not q if q then local canToggle = true
n.Image='http://www.roblox.com/asset/?id=97623721'n.Position=UDim2.new(-3E-2,0,- local readyForNextEvent = true
0.17,0)n.Size=UDim2.new(1.05,0,1.25,0)n.ZIndex=2 n.Visible=true showBackpack() local backpackIsOpen = false
else f.Position=UDim2.new(0.5,-60,1,-44)n.Visible=false f.Selected=false f.Image local active = true
='http://www.roblox.com/asset/?id=97617958'n.Image= local disabledByDeveloper = false
'http://www.roblox.com/asset/?id=96536002'n.Position=UDim2.new(-0.1,0,-0.1,0)n. local humanoidDiedCon
Size=UDim2.new(1.2,0,1.2,0)E()local F=m:GetChildren()for G=1,#F do if F[G]and F[ local guiTweenSpeed = 0.25
G]:IsA'Frame'then local H=F[G]if#H:GetChildren()>0 then f.Position=UDim2.new(0.5 local searchDefaultText = "Search..."
,-60,1,-108)f.Visible=true n.Visible=true if H:GetChildren()[1]:IsA'ImageButton' local tilde = "~"
then local I=H:GetChildren()[1]I.Active=true I.Draggable=false end end end end local backquote = "`"
end end function closeBackpack()if q then toggleBackpack()end end function local backpackSize = UDim2.new(0, 600, 0, 400)
setSelected(F)assert(F)assert(F:IsA'TextButton')F.BackgroundColor3=Color3.new(1, if robloxGui.AbsoluteSize.Y <= 320 then
1,1)F.TextColor3=Color3.new(0,0,0)F.Selected=true F.ZIndex=3 end function backpackSize = UDim2.new(0, 200, 0, 140)
setUnselected(F)assert(F)assert(F:IsA'TextButton')F.BackgroundColor3=Color3.new( end
0,0,0)F.TextColor3=Color3.new(1,1,1)F.Selected=false F.ZIndex=1 end function local createPublicEvent
updateTabGui(F)assert(F)if F=='gear'then setSelected(d)setUnselected(e)elseif F createPublicEvent = function(eventName)
=='wardrobe'then setSelected(e)setUnselected(d)end end function mouseLeaveTab(F) assert(eventName, "eventName is nil")
assert(F)assert(F:IsA'TextButton')if F.Selected then return end F. assert(tostring(eventName), "eventName is not a string")
BackgroundColor3=Color3.new(0,0,0)end function mouseOverTab(F)assert(F)assert(F: local _with_0 = Instance.new("BindableEvent")
IsA'TextButton')if F.Selected then return end F.BackgroundColor3=Color3.new( _with_0.Name = tostring(eventName)
0.15294117647058825,0.15294117647058825,0.15294117647058825)end function _with_0.Parent = script
newTabClicked(F)assert(F)F=string.lower(F)g=F updateTabGui(F)C:Fire(F) return _with_0
resetSearch()end function trim(F)return(F:gsub('^%s*(.-)%s*$','%1'))end function end
resetSearchBoxGui()k.Visible=false i.Text=v end function doSearch()local F=i. local createPublicFunction
Text if F==''then resetSearch()return end F=trim(F)k.Visible=true D:Fire(F)end createPublicFunction = function(funcName, invokeFunc)
function resetSearch()resetSearchBoxGui()D:Fire()end local F=function()p=true assert(funcName, "funcName is nil")
end function coreGuiChanged(G,H)if G==Enum.CoreGuiType.Backpack or G==Enum. assert(tostring(funcName), "funcName is not a string")
CoreGuiType.All then r=H s=not H if s then pcall(function()game:GetService assert(invokeFunc, "invokeFunc is nil")
'GuiService':RemoveKey(w)game:GetService'GuiService':RemoveKey(x)end)else game: assert(type(invokeFunc) == "function", "invokeFunc should be of type 'function'")
GetService'GuiService':AddKey(w)game:GetService'GuiService':AddKey(x)end local _with_0 = Instance.new("BindableFunction")
resetSearch()h.Visible=H and q m.Visible=H a.Visible=H f.Visible=H end end _with_0.Name = tostring(funcName)
createPublicFunction('CloseBackpack',E)createPublicFunction('BackpackReady',F) _with_0.OnInvoke = invokeFunc
pcall(function()coreGuiChanged(Enum.CoreGuiType.Backpack,Game.StarterGui: _with_0.Parent = script
GetCoreGuiEnabled(Enum.CoreGuiType.Backpack))Game.StarterGui. return _with_0
CoreGuiChangedSignal:connect(coreGuiChanged)end)d.MouseButton1Click:connect( end
function()newTabClicked'gear'end)d.MouseEnter:connect(function()mouseOverTab(d) local resizeEvent = createPublicEvent("ResizeEvent")
end)d.MouseLeave:connect(function()mouseLeaveTab(d)end)if game.CoreGui.Version>= local backpackOpenEvent = createPublicEvent("BackpackOpenEvent")
8 then e.MouseButton1Click:connect(function()newTabClicked'wardrobe'end)e. local backpackCloseEvent = createPublicEvent("BackpackCloseEvent")
MouseEnter:connect(function()mouseOverTab(e)end)e.MouseLeave:connect(function() local tabClickedEvent = createPublicEvent("TabClickedEvent")
mouseLeaveTab(e)end)end c.MouseButton1Click:connect(closeBackpack)b.Changed: local searchRequestedEvent = createPublicEvent("SearchRequestedEvent")
connect(function(G)if G=='AbsoluteSize'then z:Fire(b.AbsoluteSize)end end)game: local resetSearchBoxGui
GetService'GuiService':AddKey(w)game:GetService'GuiService':AddKey(x)game: resetSearchBoxGui = function()
GetService'GuiService'.KeyPressed:connect(function(G)if not r or s then return resetButton.Visible = false
end if G==w or G==x then toggleBackpack()end end)f.MouseButton1Click:connect( searchBox.Text = searchDefaultText
function()if not r or s then return end toggleBackpack()end)if game.Players. end
LocalPlayer['Character']then activateBackpack()end game.Players.LocalPlayer. local resetSearch
CharacterAdded:connect(activateBackpack)i.FocusLost:connect(function(G)if G or i resetSearch = function()
.Text~=''then doSearch()elseif i.Text==''then resetSearch()end end)j. resetSearchBoxGui()
MouseButton1Click:connect(doSearch)k.MouseButton1Click:connect(resetSearch)if h return searchRequestedEvent:Fire()
and l.AbsoluteSize.Y<=320 then h.RobloxLocked=false h:Destroy()end end
local deactivateBackpack
deactivateBackpack = function()
backpack.Visible = false
active = false
end
local initHumanoidDiedConnections
initHumanoidDiedConnections = function()
if humanoidDiedCon then
humanoidDiedCon:disconnect()
end
waitForProperty(game.Players.LocalPlayer, "Character")
waitForChild(game.Players.LocalPlayer.Character, "Humanoid")
humanoidDiedCon = game.Players.LocalPlayer.Character.Humanoid.Died:connect(deactivateBackpack)
end
local hideBackpack
hideBackpack = function()
backpackIsOpen = false
readyForNextEvent = false
backpackButton.Selected = false
resetSearch()
backpackCloseEvent:Fire(currentTab)
backpack.Tabs.Visible = false
searchFrame.Visible = false
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
backpackButton.Selected = false
end)
return delay(guiTweenSpeed, function()
game.GuiService:RemoveCenterDialog(backpack)
backpack.Visible = false
backpackButton.Selected = false
readyForNextEvent = true
canToggle = true
end)
end
local showBackpack
showBackpack = function()
game.GuiService:AddCenterDialog(backpack, Enum.CenterDialogType.PlayerInitiatedDialog, function()
backpack.Visible = true
backpackButton.Selected = true
end, function()
backpack.Visible = false
backpackButton.Selected = false
end)
backpack.Visible = 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)
return delay(guiTweenSpeed, function()
backpack.Tabs.Visible = false
searchFrame.Visible = true
backpackOpenEvent:Fire(currentTab)
canToggle = true
readyForNextEvent = true
backpackButton.Image = "http://www.roblox.com/asset/?id=97644093"
backpackButton.Position = UDim2.new(0.5, -60, 1, -backpackSize.Y.Offset - 103)
end)
end
local toggleBackpack
toggleBackpack = function()
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
canToggle = false
backpackIsOpen = not backpackIsOpen
if backpackIsOpen then
loadoutBackground.Image = "http://www.roblox.com/asset/?id=97623721"
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
return showBackpack()
else
backpackButton.Position = UDim2.new(0.5, -60, 1, -44)
loadoutBackground.Visible = false
backpackButton.Selected = false
backpackButton.Image = "http://www.roblox.com/asset/?id=97617958"
loadoutBackground.Image = "http://www.roblox.com/asset/?id=96536002"
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
local activateBackpack
activateBackpack = function()
initHumanoidDiedConnections()
active = true
backpack.Visible = backpackIsOpen
if backpackIsOpen then
return toggleBackpack()
end
end
local closeBackpack
closeBackpack = function()
if backpackIsOpen then
return toggleBackpack()
end
end
local setSelected
setSelected = function(tab)
assert(tab)
assert(tab:IsA("TextButton"))
tab.BackgroundColor3 = Color3.new(1, 1, 1)
tab.TextColor3 = Color3.new(0, 0, 0)
tab.Selected = true
tab.ZIndex = 3
return tab
end
local setUnselected
setUnselected = function(tab)
assert(tab)
assert(tab:IsA("TextButton"))
tab.BackgroundColor3 = Color3.new(0, 0, 0)
tab.TextColor3 = Color3.new(1, 1, 1)
tab.Selected = false
tab.ZIndex = 1
return tab
end
local updateTabGui
updateTabGui = function(selectedTab)
assert(selectedTab)
if selectedTab == "gear" then
setSelected(inventoryButton)
return setUnselected(wardrobeButton)
elseif selectedTab == "wardrobe" then
setSelected(wardrobeButton)
return setUnselected(inventoryButton)
end
end
local mouseLeaveTab
mouseLeaveTab = function(button)
assert(button)
assert(button:IsA("TextButton"))
if button.Selected then
return
end
button.BackgroundColor3 = Color3.new(0, 0, 0)
end
local mouseOverTab
mouseOverTab = function(button)
assert(button)
assert(button:IsA("TextButton"))
if button.Selected then
return
end
button.BackgroundColor3 = Color3.new(39 / 255, 39 / 255, 39 / 255)
end
local newTabClicked
newTabClicked = function(tabName)
assert(tabName)
tabName = string.lower(tabName)
currentTab = tabName
updateTabGui(tabName)
tabClickedEvent:Fire(tabName)
return resetSearch()
end
local trim
trim = function(s)
return s:gsub("^%s*(.-)%s*$", "%1")
end
local doSearch
doSearch = function()
local searchText = searchBox.Text
if searchText == "" then
resetSearch()
return
end
searchText = trim(searchText)
resetButton.Visible = true
return searchRequestedEvent:Fire(searchText)
end
local backpackReady
backpackReady = function()
readyForNextEvent = true
end
local coreGuiChanged
coreGuiChanged = function(coreGuiType, enabled)
if coreGuiType == Enum.CoreGuiType.Backpack or coreGuiType == Enum.CoreGuiType.All then
active = enabled
disabledByDeveloper = not enabled
do
local _with_0 = game:GetService("GuiService")
if disabledByDeveloper then
pcall(function()
_with_0:RemoveKey(tilde)
return _with_0:RemoveKey(backquote)
end)
else
_with_0:AddKey(tilde)
_with_0:AddKey(backquote)
end
end
resetSearch()
searchFrame.Visible = enabled and backpackIsOpen
currentLoadout.Visible = enabled
backpack.Visible = enabled
backpackButton.Visible = enabled
end
end
createPublicFunction("CloseBackpack", hideBackpack)
createPublicFunction("BackpackReady", backpackReady)
pcall(function()
coreGuiChanged(Enum.CoreGuiType.Backpack, Game.StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Backpack))
return Game.StarterGui.CoreGuiChangedSignal:connect(coreGuiChanged)
end)
inventoryButton.MouseButton1Click:connect(function()
return newTabClicked("gear")
end)
inventoryButton.MouseEnter:connect(function()
return mouseOverTab(inventoryButton)
end)
inventoryButton.MouseLeave:connect(function()
return mouseLeaveTab(inventoryButton)
end)
if game.CoreGui.Version >= 8 then
wardrobeButton.MouseButton1Click:connect(function()
return newTabClicked("wardrobe")
end)
wardrobeButton.MouseEnter:connect(function()
return mouseOverTab(wardrobeButton)
end)
wardrobeButton.MouseLeave:connect(function()
return mouseLeaveTab(wardrobeButton)
end)
end
closeButton.MouseButton1Click:connect(closeBackpack)
screen.Changed:connect(function(prop)
if prop == "AbsoluteSize" then
return resizeEvent:Fire(screen.AbsoluteSize)
end
end)
do
local _with_0 = game:GetService("GuiService")
_with_0:AddKey(tilde)
_with_0:AddKey(backquote)
_with_0.KeyPressed:connect(function(key)
if not active or disabledByDeveloper then
return
end
if key == tilde or key == backquote then
return toggleBackpack()
end
end)
end
backpackButton.MouseButton1Click:connect(function()
if not active or disabledByDeveloper then
return
end
return toggleBackpack()
end)
if game.Players.LocalPlayer["Character"] then
activateBackpack()
end
game.Players.LocalPlayer.CharacterAdded:connect(activateBackpack)
searchBox.FocusLost:connect(function(enterPressed)
if enterPressed or searchBox.Text ~= "" then
return doSearch()
elseif searchBox.Text == "" then
return resetSearch()
end
end)
searchButton.MouseButton1Click:connect(doSearch)
resetButton.MouseButton1Click:connect(resetSearch)
if searchFrame and robloxGui.AbsoluteSize.Y <= 320 then
searchFrame.RobloxLocked = false
return searchFrame:Destroy()
end

File diff suppressed because it is too large Load Diff