Replace corescripts with original files for testing

This commit is contained in:
Lewin Kelly 2023-04-22 13:44:19 +01:00
parent 8c1843e689
commit 9546433e44
22 changed files with 5002 additions and 19462 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,246 +1,52 @@
print("[Mercury]: Loaded corescript 152908679") local a,b,c,d,e,f,g,h,i,j=Game:GetService'ContextActionService',Game:GetService
local New 'UserInputService'.TouchEnabled,{},{},nil,nil,
New = function(className, name, props) 'http://www.banland.xyz/asset/?id=97166756',
if not (props ~= nil) then 'http://www.banland.xyz/asset/?id=97166444',{},{[1]=UDim2.new(0,123,0,70),[2]=
props = name UDim2.new(0,30,0,60),[3]=UDim2.new(0,180,0,160),[4]=UDim2.new(0,85,0,-25),[5]=
name = nil UDim2.new(0,185,0,-25),[6]=UDim2.new(0,185,0,260),[7]=UDim2.new(0,216,0,65)}
end local k=#j Game:GetService'ContentProvider':Preload(g)Game:GetService
local obj = Instance.new(className) 'ContentProvider':Preload(h)while not Game.Players do wait()end while not Game.
if name then Players.LocalPlayer do wait()end function createContextActionGui()if not e and b
obj.Name = name then e=Instance.new'ScreenGui'e.Name='ContextActionGui'f=Instance.new'Frame'f.
end BackgroundTransparency=1 f.Size=UDim2.new(0.3,0,0.5,0)f.Position=UDim2.new(0.7,0
local parent ,0.5,0)f.Name='ContextButtonFrame'f.Parent=e end end function contextButtonDown(
for k, v in pairs(props) do l,m,n)if m.UserInputType==Enum.UserInputType.Touch then l.Image=g a:
if type(k) == "string" then CallFunction(n,Enum.UserInputState.Begin,m)end end function contextButtonMoved(l
if k == "Parent" then ,m,n)if m.UserInputType==Enum.UserInputType.Touch then l.Image=g a:CallFunction(
parent = v n,Enum.UserInputState.Change,m)end end function contextButtonUp(l,m,n)l.Image=h
else if m.UserInputType==Enum.UserInputType.Touch and m.UserInputState==Enum.
obj[k] = v UserInputState.End then a:CallFunction(n,Enum.UserInputState.End,m)end end
end function isSmallScreenDevice()return Game:GetService'GuiService':
elseif type(k) == "number" and type(v) == "userdata" then GetScreenResolution().y<=320 end function createNewButton(l,m)local n=Instance.
v.Parent = obj new'ImageButton'n.Name='ContextActionButton'n.BackgroundTransparency=1 n.Size=
end 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'
obj.Parent = parent .InputEnded:connect(function(p)i[p]=nil end)n.InputBegan:connect(function(p)if i
return obj [p]then return end if p.UserInputState==Enum.UserInputState.Begin and o==nil
end then o=p contextButtonDown(n,p,l)end end)n.InputChanged:connect(function(p)if i[
local contextActionService = Game:GetService("ContextActionService") p]then return end if o~=p then return end contextButtonMoved(n,p,l)end)n.
local isTouchDevice = Game:GetService("UserInputService").TouchEnabled InputEnded:connect(function(p)if i[p]then return end if o~=p then return end o=
local functionTable = { } nil i[p]=true contextButtonUp(n,p,l)end)local p=Instance.new'ImageLabel'p.Name=
local buttonVector = { } 'ActionIcon'p.Position=UDim2.new(0.175,0,0.175,0)p.Size=UDim2.new(0.65,0,0.65,0)
local buttonScreenGui p.BackgroundTransparency=1 if m['image']and type(m['image'])=='string'then p.
local buttonFrame Image=m['image']end p.Parent=n local q=Instance.new'TextLabel'q.Name=
local ContextDownImage = "http://www.banland.xyz/asset/?id=97166756" 'ActionTitle'q.Size=UDim2.new(1,0,1,0)q.BackgroundTransparency=1 q.Font=Enum.
local ContextUpImage = "http://www.banland.xyz/asset/?id=97166444" Font.SourceSansBold q.TextColor3=Color3.new(1,1,1)q.TextStrokeTransparency=0 q.
local oldTouches = { } FontSize=Enum.FontSize.Size18 q.TextWrapped=true q.Text=''if m['title']and type(
local buttonPositionTable = { m['title'])=='string'then q.Text=m['title']end q.Parent=n return n end function
UDim2.new(0, 123, 0, 70), createButton(l,m)local n,o=createNewButton(l,m),nil for p=1,#d do if d[p]==
UDim2.new(0, 30, 0, 60), '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, 180, 0, 160), o]=n c[l]['button']=n n.Position=j[o]n.Parent=f if e and e.Parent==nil then e.
UDim2.new(0, 85, 0, -25), Parent=Game.Players.LocalPlayer.PlayerGui end end function removeAction(l)if not
UDim2.new(0, 185, 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, 260), if d[n]==m then d[n]='empty'break end end m:Destroy()end c[l]=nil end function
UDim2.new(0, 216, 0, 65) addAction(l,m,n)if c[l]then removeAction(l)end c[l]={n}if m and b then
} createContextActionGui()createButton(l,n)end end a.BoundActionChanged:connect(
local maxButtons = #buttonPositionTable function(l,m,n)if c[l]and n then local o=c[l]['button']if o then if m=='image'
do then o.ActionIcon.Image=n[m]elseif m=='title'then o.ActionTitle.Text=n[m]elseif
local _with_0 = Game:GetService("ContentProvider") m=='position'then o.Position=n[m]end end end end)a.BoundActionAdded:connect(
_with_0:Preload(ContextDownImage) function(l,m,n)addAction(l,m,n)end)a.BoundActionRemoved:connect(function(l,m)
_with_0:Preload(ContextUpImage) removeAction(l)end)a.GetActionButtonEvent:connect(function(l)if c[l]then a:
end FireActionButtonFoundSignal(l,c[l]['button'])end end)local l=a:
while not Game.Players do GetAllBoundActionInfo()for m,n in pairs(l)do addAction(m,n['createTouchButton'],
wait() n)end
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,527 +1,112 @@
print("[Mercury]: Loaded corescript 153556783") while not Game do wait()end while not Game:FindFirstChild'Players'do wait()end
local New while not Game.Players.LocalPlayer do wait()end while not Game:FindFirstChild
New = function(className, name, props) 'CoreGui'do wait()end while not Game.CoreGui:FindFirstChild'RobloxGui'do wait()
if not (props ~= nil) then end local a=Game:GetService'UserInputService'local b=pcall(function()a:
props = name IsLuaTouchControls()end)if not b then script:Destroy()end local c=Game:
name = nil GetService'GuiService':GetScreenResolution()function isSmallScreenDevice()return
end c.y<=320 end local d,e=Game.Players.LocalPlayer,120 if isSmallScreenDevice()then
local obj = Instance.new(className) e=70 end local f,g,h,i,j='rbxasset://textures/ui/TouchControlsSheet.png',5,0.92,
if name then {},90 if isSmallScreenDevice()then j=70 end local k,l,m={},nil,0.007 local n,o,p
obj.Name = name ,q=m*16,0.03,0.2,nil Game:GetService'ContentProvider':Preload(f)function
end DistanceBetweenTwoPoints(r,s)local t,u=s.x-r.x,s.y-r.y return math.sqrt((t*t)+(u
local parent *u))end function transformFromCenterToTopLeft(r,s)return UDim2.new(0,r.x-s.
for k, v in pairs(props) do AbsoluteSize.x/2,0,r.y-s.AbsoluteSize.y/2)end function rotatePointAboutLocation(
if type(k) == "string" then 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 k == "Parent" 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
parent = v dotProduct(r,s)return((r.x*s.x)+(r.y*s.y))end function
else stationaryThumbstickTouchMove(r,s,t)local u=Vector2.new(s.Position.X.Offset+s.
obj[k] = v AbsoluteSize.x/2,s.Position.Y.Offset+s.AbsoluteSize.y/2)local v=
end DistanceBetweenTwoPoints(t,u)if v>(e/2)then local w=Vector2.new(t.x-u.x,t.y-u.y)
elseif type(k) == "number" and type(v) == "userdata" then local x=w.unit if x.x==math.nan or x.x==math.inf then x=Vector2.new(0,x.y)end if
v.Parent = obj x.y==math.nan or x.y==math.inf then x=Vector2.new(x.x,0)end local y=u+(x*(e/2))r
end .Position=transformFromCenterToTopLeft(y,r)else r.Position=
end transformFromCenterToTopLeft(t,r)end return Vector2.new(r.Position.X.Offset-s.
obj.Parent = parent Position.X.Offset,r.Position.Y.Offset-s.Position.Y.Offset)end function
return obj followThumbstickTouchMove(r,s,t)local u=Vector2.new(s.Position.X.Offset+s.
end AbsoluteSize.x/2,s.Position.Y.Offset+s.AbsoluteSize.y/2)if
while not Game do DistanceBetweenTwoPoints(t,u)>e/2 then local v=Vector2.new(r.Position.X.Offset+r
wait() .AbsoluteSize.x/2,r.Position.Y.Offset+r.AbsoluteSize.y/2)local w,x=Vector2.new(t
end .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.
while not Game:FindFirstChild("Players") do 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))
wait() local C=B*math.min(z.magnitude/x.magnitude,1)if math.abs(C)>0.00001 then local D
end =rotatePointAboutLocation(u,v,C)s.Position=transformFromCenterToTopLeft(Vector2.
while not Game.Players.LocalPlayer do new(D.x,D.y),s)end s.Position=UDim2.new(0,s.Position.X.Offset+z.x,0,s.Position.Y
wait() .Offset+z.y)end r.Position=transformFromCenterToTopLeft(t,r)local v,w=Vector2.
end new(r.Position.X.Offset,r.Position.Y.Offset),Vector2.new(s.Position.X.Offset,s.
while not Game:FindFirstChild("CoreGui") do Position.Y.Offset)if DistanceBetweenTwoPoints(v,w)>e/2 then local x=(w-v).unit*e
wait() /2 s.Position=UDim2.new(0,v.x+x.x,0,v.y+x.y)end return Vector2.new(r.Position.X.
end Offset-s.Position.X.Offset,r.Position.Y.Offset-s.Position.Y.Offset)end function
while not Game.CoreGui:FindFirstChild("RobloxGui") do movementOutsideDeadZone(r)return((math.abs(r.x)>g)or(math.abs(r.y)>g))end
wait() function constructThumbstick(r,s,t)local u=Instance.new'Frame'u.Name=
end 'ThumbstickFrame'u.Active=true u.Size=UDim2.new(0,e,0,e)u.Position=r u.
local userInputService = Game:GetService("UserInputService") BackgroundTransparency=1 local v=Instance.new'ImageLabel'v.Name=
local success = pcall(function() 'OuterThumbstick'v.Image=f v.ImageRectOffset=Vector2.new(0,0)v.ImageRectSize=
return userInputService:IsLuaTouchControls() Vector2.new(220,220)v.BackgroundTransparency=1 v.Size=UDim2.new(0,e,0,e)v.
end) Position=r v.Parent=Game.CoreGui.RobloxGui local w=Instance.new'ImageLabel'w.
if not success then Name='InnerThumbstick'w.Image=f w.ImageRectOffset=Vector2.new(220,0)w.
script:Destroy() ImageRectSize=Vector2.new(111,111)w.BackgroundTransparency=1 w.Size=UDim2.new(0,
end 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
local screenResolution = Game:GetService("GuiService"):GetScreenResolution() .Parent=u w.ZIndex=2 local x,y,z=nil,nil,nil local A=function(A)if x then return
local isSmallScreenDevice end if A==q then return end if A==l then return end if A.UserInputType~=Enum.
isSmallScreenDevice = function() UserInputType.Touch then return end x=A table.insert(i,x)u.Position=
return screenResolution.y <= 320 transformFromCenterToTopLeft(x.Position,u)v.Position=u.Position y=a.TouchMoved:
end connect(function(B)if B==x then local C=nil if t then C=
local localPlayer = Game.Players.LocalPlayer stationaryThumbstickTouchMove(u,v,Vector2.new(B.Position.x,B.Position.y))else C=
local thumbstickSize = 120 followThumbstickTouchMove(u,v,Vector2.new(B.Position.x,B.Position.y))end if s
if isSmallScreenDevice() then then s(C,v.Size.X.Offset/2)end end end)z=a.TouchEnded:connect(function(B)if B==x
thumbstickSize = 70 then if s then s(Vector2.new(0,0),1)end z:disconnect()y:disconnect()u.Position=r
end v.Position=r for C,D in pairs(i)do if D==x then table.remove(i,C)break end end x
local touchControlsSheet = "rbxasset://textures/ui/TouchControlsSheet.png" =nil end end)end a.Changed:connect(function(B)if B=='ModalEnabled'then u.Visible
local ThumbstickDeadZone = 5 =not a.ModalEnabled v.Visible=not a.ModalEnabled end end)u.InputBegan:connect(A)
local ThumbstickMaxPercentGive = 0.92 return u end function setupCharacterMovement(r)local s,t=nil local u=d.
local thumbstickTouches = { } MoveCharacter local v,w=function(v,w)if d then if movementOutsideDeadZone(v)then
local jumpButtonSize = 90 s=v t=w if v.magnitude/w>h then w=v.magnitude-1 end u(d,v,w)else s=Vector2.new(0
if isSmallScreenDevice() then ,0)t=1 u(d,s,t)end end end,UDim2.new(0,e/2,1,-e*1.75)if isSmallScreenDevice()
jumpButtonSize = 70 then w=UDim2.new(0,(e/2)-10,1,-e-20)end local x=constructThumbstick(w,v,false)x.
end Name='CharacterThumbstick'x.Parent=r local y=function()if d and u and s and t
local oldJumpTouches = { } then u(d,s,t)end end return y end function setupJumpButton(r)local s=Instance.
local currentJumpTouch new'ImageButton's.Name='JumpButton's.BackgroundTransparency=1 s.Image=f s.
local CameraRotateSensitivity = 0.007 ImageRectOffset=Vector2.new(176,222)s.ImageRectSize=Vector2.new(174,174)s.Size=
local CameraRotateDeadZone = CameraRotateSensitivity * 16 UDim2.new(0,j,0,j)if isSmallScreenDevice()then s.Position=UDim2.new(1,-(j*2.25),
local CameraZoomSensitivity = 0.03 1,-j-20)else s.Position=UDim2.new(1,-(j*2.75),1,-j-120)end local t=d.
local PinchZoomDelay = 0.2 JumpCharacter local u=function()while l do if d then t(d)end wait(
local cameraTouch 1.6666666666666665E-2)end end s.InputBegan:connect(function(v)if v.UserInputType
Game:GetService("ContentProvider"):Preload(touchControlsSheet) ~=Enum.UserInputType.Touch then return end if l then return end if v==q then
local DistanceBetweenTwoPoints return end for w,x in pairs(k)do if x==v then return end end l=v s.
DistanceBetweenTwoPoints = function(point1, point2) ImageRectOffset=Vector2.new(0,222)s.ImageRectSize=Vector2.new(174,174)u()end)s.
local dx = point2.x - point1.x InputEnded:connect(function(v)if v.UserInputType~=Enum.UserInputType.Touch then
local dy = point2.y - point1.y return end s.ImageRectOffset=Vector2.new(176,222)s.ImageRectSize=Vector2.new(174
return math.sqrt(dx * dx + dy * dy) ,174)if v==l then table.insert(k,l)l=nil end end)a.InputEnded:connect(function(v
end )for w,x in pairs(k)do if x==v then table.remove(k,w)break end end end)a.Changed
local transformFromCenterToTopLeft :connect(function(v)if v=='ModalEnabled'then s.Visible=not a.ModalEnabled end
transformFromCenterToTopLeft = function(pointToTranslate, guiObject) end)s.Parent=r end function isTouchUsedByJumpButton(r)if r==l then return true
return UDim2.new(0, pointToTranslate.x - guiObject.AbsoluteSize.x / 2, 0, pointToTranslate.y - guiObject.AbsoluteSize.y / 2) end for s,t in pairs(k)do if r==t then return true end end return false end
end function isTouchUsedByThumbstick(r)for s,t in pairs(i)do if r==t then return
local rotatePointAboutLocation true end end return false end function setupCameraControl(r,s)local t,u,v,w,x,y,
rotatePointAboutLocation = function(pointToRotate, pointToRotateAbout, radians) z,A,B=nil,false,a.RotateCamera,-1,false,nil,a.ZoomCamera,{},nil local C,D=
local sinAnglePercent = math.sin(radians) function()q=nil u=false t=nil end,function()A={}y=nil x=false B:Destroy()B=nil
local cosAnglePercent = math.cos(radians) end local E=function(E,F)if B then B:Destroy()end B=Instance.new'Frame'B.Name=
local transformedPoint = pointToRotate 'PinchFrame'B.BackgroundTransparency=1 B.Parent=r B.Size=UDim2.new(1,0,1,0)B.
transformedPoint = Vector2.new(transformedPoint.x - pointToRotateAbout.x, transformedPoint.y - pointToRotateAbout.y) InputChanged:connect(function(G)if not x then D()return end C()if y==nil then if
local xNew = transformedPoint.x * cosAnglePercent - transformedPoint.y * sinAnglePercent G==E then y=(G.Position-F.Position).magnitude E=G elseif G==F then y=(G.Position
local yNew = transformedPoint.x * sinAnglePercent + transformedPoint.y * cosAnglePercent -E.Position).magnitude F=G end else local H=0 if G==E then H=(G.Position-F.
transformedPoint = Vector2.new(xNew + pointToRotateAbout.x, yNew + pointToRotateAbout.y) Position).magnitude E=G elseif G==F then H=(G.Position-E.Position).magnitude F=G
return transformedPoint end if H~=0 then local I=H-y if I~=0 then z(a,(I*o))end y=H end end end)B.
end InputEnded:connect(function(G)if G==E or G==F then D()end end)end local F=
local dotProduct function(F)if#A<1 then table.insert(A,F)w=tick()x=false elseif#A==1 then x=((
dotProduct = function(v1, v2) tick()-w)<=p)if x then table.insert(A,F)E(A[1],A[2])else A={}end end end r.
return v1.x * v2.x + v1.y * v2.y InputBegan:connect(function(G)if G.UserInputType~=Enum.UserInputType.Touch then
end return end if isTouchUsedByJumpButton(G)then return end local H=
local stationaryThumbstickTouchMove isTouchUsedByThumbstick(G)if not H then F(G)end if q==nil and not H then q=G t=
stationaryThumbstickTouchMove = function(thumbstickFrame, thumbstickOuter, touchLocation) Vector2.new(q.Position.x,q.Position.y)end end)a.InputChanged:connect(function(G)
local thumbstickOuterCenterPosition = Vector2.new(thumbstickOuter.Position.X.Offset + thumbstickOuter.AbsoluteSize.x / 2, thumbstickOuter.Position.Y.Offset + thumbstickOuter.AbsoluteSize.y / 2) if G.UserInputType~=Enum.UserInputType.Touch then return end if q~=G then return
local centerDiff = DistanceBetweenTwoPoints(touchLocation, thumbstickOuterCenterPosition) end local H=Vector2.new(q.Position.x,q.Position.y)local I=(t-H)*m if not u and(I
if centerDiff > (thumbstickSize / 2) then .magnitude>n)then u=true t=H end if u and(t~=H)then v(a,I)s()t=H end end)a.
local thumbVector = Vector2.new(touchLocation.x - thumbstickOuterCenterPosition.x, touchLocation.y - thumbstickOuterCenterPosition.y) InputEnded:connect(function(G)if q==G or q==nil then C()end for H,I in pairs(A)
local normal = thumbVector.unit do if I==G then table.remove(A,H)end end end)end function setupTouchControls()
if normal.x == math.nan or normal.x == math.inf then local r=Instance.new'Frame'r.Name='TouchControlFrame'r.Size=UDim2.new(1,0,1,0)r.
normal = Vector2.new(0, normal.y) BackgroundTransparency=1 r.Parent=Game.CoreGui.RobloxGui local s=
end setupCharacterMovement(r)setupJumpButton(r)setupCameraControl(r,s)a.
if normal.y == math.nan or normal.y == math.inf then ProcessedEvent:connect(function(t,u)if not u then return end if t==q and t.
normal = Vector2.new(normal.x, 0) UserInputState==Enum.UserInputState.Begin then q=nil end end)end do
end setupTouchControls()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,127 +1,25 @@
print("[Mercury]: Loaded corescript 36868950") local a=script.Parent:FindFirstChild'ControlFrame'if not a then return end local
local controlFrame = script.Parent:FindFirstChild("ControlFrame") b,c,d=a:FindFirstChild'BottomLeftControl',a:FindFirstChild'BottomRightControl',
if not controlFrame then Instance.new'TextLabel'd.Name='ToolTip'd.Text=''d.Font=Enum.Font.ArialBold d.
return FontSize=Enum.FontSize.Size12 d.TextColor3=Color3.new(1,1,1)d.BorderSizePixel=0
end d.ZIndex=10 d.Size=UDim2.new(2,0,1,0)d.Position=UDim2.new(1,0,0,0)d.
local New BackgroundColor3=Color3.new(0,0,0)d.BackgroundTransparency=1 d.TextTransparency=
New = function(className, name, props) 1 d.TextWrap=true local e=Instance.new'BoolValue'e.Name='inside'e.Value=false e.
if not (props ~= nil) then Parent=d function setUpListeners(f)local g=0.1 f.Parent.MouseEnter:connect(
props = name function()if f:FindFirstChild'inside'then f.inside.Value=true wait(1.2)if f.
name = nil inside.Value then while f.inside.Value and f.BackgroundTransparency>0 do f.
end BackgroundTransparency=f.BackgroundTransparency-g f.TextTransparency=f.
local obj = Instance.new(className) TextTransparency-g wait()end end end end)function killTip(h)h.inside.Value=false
if name then h.BackgroundTransparency=1 h.TextTransparency=1 end f.Parent.MouseLeave:connect(
obj.Name = name function()killTip(f)end)f.Parent.MouseButton1Click:connect(function()killTip(f)
end end)end function createSettingsButtonTip(f)if f==nil then f=b:FindFirstChild
local parent 'SettingsButton'end local g=d:clone()g.RobloxLocked=true g.Text=
for k, v in pairs(props) do 'Settings/Leave Game'g.Position=UDim2.new(0,0,0,-18)g.Size=UDim2.new(0,120,0,20)
if type(k) == "string" then g.Parent=f setUpListeners(g)end wait(5)local f=b:GetChildren()for g=1,#f do if f
if k == "Parent" then [g].Name=='Exit'then local h=d:clone()h.RobloxLocked=true h.Text='Leave Place'h.
parent = v Position=UDim2.new(0,0,-1,0)h.Size=UDim2.new(1,0,1,0)h.Parent=f[g]
else setUpListeners(h)elseif f[g].Name=='SettingsButton'then createSettingsButtonTip(
obj[k] = v f[g])end end local g=c:GetChildren()for h=1,#g do if g[h].Name:find'Camera'~=nil
end then local i=d:clone()i.RobloxLocked=true i.Text='Camera View'if g[h].Name:find
elseif type(k) == "number" and type(v) == "userdata" then 'Zoom'then i.Position=UDim2.new(-1,0,-1.5)else i.Position=UDim2.new(0,0,-1.5,0)
v.Parent = obj end i.Size=UDim2.new(2,0,1.25,0)i.Parent=g[h]setUpListeners(i)end end
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,69 +1,35 @@
print("[Mercury]: Loaded corescript 37801172") local a,b=game:GetService'ScriptContext',false pcall(function()b=game:GetService
local scriptContext = game:GetService("ScriptContext") 'UserInputService'.TouchEnabled end)a:AddCoreScript(60595695,a,
local touchEnabled = false '/Libraries/LibraryRegistration/LibraryRegistration')local function waitForChild
pcall(function() (c,d)while not c:FindFirstChild(d)do c.ChildAdded:wait()end end local c=game:
touchEnabled = game:GetService("UserInputService").TouchEnabled GetService'ScriptContext'c:AddCoreScript(59002209,c,'CoreScripts/Sections')
end) waitForChild(game:GetService'CoreGui','RobloxGui')local d=game:GetService
scriptContext:AddCoreScript(60595695, scriptContext, "/Libraries/LibraryRegistration/LibraryRegistration") 'CoreGui':FindFirstChild'RobloxGui'if not b then c:AddCoreScript(36868950,d,
local waitForChild 'CoreScripts/ToolTip')c:AddCoreScript(46295863,d,'CoreScripts/Settings')else c:
waitForChild = function(instance, name) AddCoreScript(153556783,d,'CoreScripts/TouchControls')end c:AddCoreScript(
while not instance:FindFirstChild(name) do 39250920,d,'CoreScripts/MainBotChatScript')c:AddCoreScript(48488451,d,
instance.ChildAdded:wait() 'CoreScripts/PopupScript')c:AddCoreScript(48488398,d,
end 'CoreScripts/NotificationScript')c:AddCoreScript(97188756,d,
end 'CoreScripts/ChatScript')c:AddCoreScript(107893730,d,
scriptContext = game:GetService("ScriptContext") 'CoreScripts/PurchasePromptScript')if not b or d.AbsoluteSize.Y>600 then c:
scriptContext:AddCoreScript(59002209, scriptContext, "CoreScripts/Sections") AddCoreScript(48488235,d,'CoreScripts/PlayerListScript')else delay(5,function()
waitForChild(game:GetService("CoreGui"), "RobloxGui") if d.AbsoluteSize.Y>=600 then c:AddCoreScript(48488235,d,
local screenGui = game:GetService("CoreGui"):FindFirstChild("RobloxGui") 'CoreScripts/PlayerListScript')end end)end if game.CoreGui.Version>=3 and game.
if not touchEnabled then PlaceId~=130815926 then c:AddCoreScript(53878047,d,
scriptContext:AddCoreScript(36868950, screenGui, "CoreScripts/ToolTip") 'CoreScripts/BackpackScripts/BackpackBuilder')waitForChild(d,'CurrentLoadout')
scriptContext:AddCoreScript(46295863, screenGui, "CoreScripts/Settings") waitForChild(d,'Backpack')local e=d.Backpack if game.CoreGui.Version>=7 then c:
else AddCoreScript(89449093,e,'CoreScripts/BackpackScripts/BackpackManager')end game:
scriptContext:AddCoreScript(153556783, screenGui, "CoreScripts/TouchControls") GetService'ScriptContext':AddCoreScript(89449008,e,
end 'CoreScripts/BackpackScripts/BackpackGear')c:AddCoreScript(53878057,d.
scriptContext:AddCoreScript(39250920, screenGui, "CoreScripts/MainBotChatScript") CurrentLoadout,'CoreScripts/BackpackScripts/LoadoutScript')if game.CoreGui.
scriptContext:AddCoreScript(48488451, screenGui, "CoreScripts/PopupScript") Version>=8 then c:AddCoreScript(-1,e,
scriptContext:AddCoreScript(48488398, screenGui, "CoreScripts/NotificationScript") 'CoreScripts/BackpackScripts/BackpackWardrobe')end end local e=not not game.
scriptContext:AddCoreScript(97188756, screenGui, "CoreScripts/ChatScript") Workspace:FindFirstChild'PSVariable'if e then game:GetService'ScriptContext':
scriptContext:AddCoreScript(107893730, screenGui, "CoreScripts/PurchasePromptScript") AddCoreScript(64164692,game.Players.LocalPlayer,'BuildToolManager')end game.
if not touchEnabled or screenGui.AbsoluteSize.Y > 600 then Workspace.ChildAdded:connect(function(f)if f.Name=='PSVariable'and f:IsA
scriptContext:AddCoreScript(48488235, screenGui, "CoreScripts/PlayerListScript") 'BoolValue'then e=true game:GetService'ScriptContext':AddCoreScript(64164692,
else game.Players.LocalPlayer,'BuildToolManager')end end)if b then c:AddCoreScript(
delay(5, function() 152908679,d,'CoreScripts/ContextActionTouch')waitForChild(d,'ControlFrame')
if screenGui.AbsoluteSize.Y >= 600 then waitForChild(d.ControlFrame,'BottomLeftControl')d.ControlFrame.BottomLeftControl
return scriptContext:AddCoreScript(48488235, screenGui, "CoreScripts/PlayerListScript") .Visible=false waitForChild(d.ControlFrame,'TopLeftControl')d.ControlFrame.
end TopLeftControl.Visible=false 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,231 +1,48 @@
print("[Mercury]: Loaded corescript 38037565") local a,b=5,5 function waitForChild(c,d)local e=c:findFirstChild(d)if e then
local New return e end while true do e=c.ChildAdded:wait()if e.Name==d then return e end
New = function(className, name, props) end end local c=script.Parent local d,e,f,g=waitForChild(c,'Humanoid'),
if not (props ~= nil) then waitForChild(c,'Torso'),c:FindFirstChild'PlayerStats',Instance.new'BoolValue'g.
props = name Name='InCharTag'local h=Instance.new'BoolValue'h.Name='RobloxBuildTool'local i,j
name = nil if f==nil then f=Instance.new'Configuration'f.Parent=c f.Name='PlayerStats'end
end local k=f:FindFirstChild'MaxHealth'if k==nil then k=Instance.new'NumberValue'k.
local obj = Instance.new(className) Parent=f k.Value=100 k.Name='MaxHealth'end d.MaxHealth=k.Value d.Health=k.Value
if name then function onMaxHealthChange()d.MaxHealth=k.Value d.Health=k.Value end k.Changed:
obj.Name = name connect(onMaxHealthChange)local l=game.Players:GetPlayerFromCharacter(script.
end Parent)local m=l.PlayerGui:FindFirstChild'DamageOverTimeGui'if m==nil then m=
local parent Instance.new'BillboardGui'm.Name='DamageOverTimeGui'm.Parent=l.PlayerGui m.
for k, v in pairs(props) do Adornee=script.Parent:FindFirstChild'Head'm.Active=true m.size=UDim2.new(a,0,b,0
if type(k) == "string" then )m.StudsOffset=Vector3.new(0,2,0)end print'newHealth declarations finished'
if k == "Parent" then function billboardHealthChange(n)local o=Instance.new'TextLabel'if n>0 then o.
parent = v Text=tostring(n)o.TextColor3=Color3.new(0,1,0)else o.Text=tostring(n)o.
else TextColor3=Color3.new(1,0,1)end o.size=UDim2.new(1,0,1,0)o.Active=true o.
obj[k] = v FontSize=6 o.BackgroundTransparency=1 o.Parent=m for p=1,10 do wait(0.1)o.
end TextTransparency=p/10 o.Position=UDim2.new(0,0,0,-p*5)o.FontSize=6-p*0.6 end o:
elseif type(k) == "number" and type(v) == "userdata" then remove()end function setMaxHealth()if k.Value>=0 then d.MaxHealth=k.Value print(
v.Parent = obj d.MaxHealth)if d.Health>d.MaxHealth then d.Health=d.MaxHealth end end end k.
end 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
obj.Parent = parent then local q=0 if f then local r,s,t,u,v=f:FindFirstChild'Regen',f:
return obj FindFirstChild'Poison',f:FindFirstChild'Ice',f:FindFirstChild'Fire',f:
end FindFirstChild'Stun'if r then q=q+r.Value.X if r.Value.Y>=0 then r.Value=Vector3
local damageGuiWidth = 5.0 .new(r.Value.X+r.Value.Z,r.Value.Y-o,r.Value.Z)elseif r.Value.Y==-1 then r.Value
local damageGuiHeight = 5.0 =Vector3.new(r.Value.X+r.Value.Z,-1,r.Value.Z)else r:remove()end end if s then q
local waitForChild =q-s.Value.X if s.Value.Y>=0 then s.Value=Vector3.new(s.Value.X+s.Value.Z,s.
waitForChild = function(parent, childName) Value.Y-o,s.Value.Z)elseif s.Value.Y==-1 then s.Value=Vector3.new(s.Value.X+s.
local child = parent:findFirstChild(childName) Value.Z,-1,s.Value.Z)else s:remove()end end if t then q=q-t.Value.X if t.Value.Y
if child then >=0 then t.Value=Vector3.new(t.Value.X,t.Value.Y-o,t.Value.Z)else t:remove()end
return child end if u then n.Enabled=true n.Parent=c.Torso q=q-u.Value.X if u.Value.Y>=0 then
end u.Value=Vector3.new(u.Value.X,u.Value.Y-o,u.Value.Z)else u:remove()n.Enabled=
while true do false n.Parent=nil end end if v then if v.Value>0 then e.Anchored=true i=script.
child = parent.ChildAdded:wait() Parent:GetChildren()j=game.Players:GetPlayerFromCharacter(script.Parent).
if child.Name == childName then Backpack:GetChildren()for w=1,#i do if i[w].className=='Tool'then g:Clone().
return child Parent=i[w]print(j)table.insert(j,i[w])end end for w=1,#j do if j[w]:
end 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.
local Figure = script.Parent Anchored=false for w=1,#j do local x=j[w]:FindFirstChild'RobloxBuildTool'if x
local Humanoid = waitForChild(Figure, "Humanoid") then x:Remove()end j[w].Parent=game.Lighting end wait(0.2)for w=1,#j do local x=
local Torso = waitForChild(Figure, "Torso") j[w]:FindFirstChild'InCharTag'if x then x:Remove()j[w].Parent=script.Parent else
local config = Figure:FindFirstChild("PlayerStats") j[w].Parent=game.Players:GetPlayerFromCharacter(script.Parent).Backpack end end
local inCharTag = Instance.new("BoolValue") v:Remove()end end if q~=0 then coroutine.resume(coroutine.create(
inCharTag.Name = "InCharTag" billboardHealthChange),q)end end p=d.Health+q*o if p*1.01<d.MaxHealth then d.
local hider = Instance.new("BoolValue") Health=p elseif q>0 then d.Health=d.MaxHealth end end end
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,542 +1,142 @@
print("[Mercury]: Loaded corescript 39250920") function waitForProperty(a,b)while not a[b]do a.Changed:wait()end end function
local New waitForChild(a,b)while not a:FindFirstChild(b)do a.ChildAdded:wait()end end
New = function(className, name, props) 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,
if not (props ~= nil) then 'You are too far away to chat!',300,'Chat ended because you walked away',350,
props = name "Chat ended because you didn't reply",350,nil,nil,nil,nil,nil,{},{},nil
name = nil waitForChild(game,'CoreGui')waitForChild(game.CoreGui,'RobloxGui')if game.
end CoreGui.RobloxGui:FindFirstChild'ControlFrame'then u=game.CoreGui.RobloxGui.
local obj = Instance.new(className) ControlFrame else u=game.CoreGui.RobloxGui end function currentTone()if e then
if name then return e.Tone else return Enum.DialogTone.Neutral end end function
obj.Name = name createChatNotificationGui()o=Instance.new'BillboardGui'o.Name=
end 'ChatNotificationGui'o.ExtentsOffset=Vector3.new(0,1,0)o.Size=UDim2.new(4,0,
local parent 5.42857122,0)o.SizeOffset=Vector2.new(0,0)o.StudsOffset=Vector3.new(0.4,4.3,0)o.
for k, v in pairs(props) do Enabled=true o.RobloxLocked=true o.Active=true local v=Instance.new'ImageLabel'v
if type(k) == "string" then .Name='Image'v.Active=false v.BackgroundTransparency=1 v.Position=UDim2.new(0,0,
if k == "Parent" then 0,0)v.Size=UDim2.new(1,0,1,0)v.Image=''v.RobloxLocked=true v.Parent=o local w=
parent = v Instance.new'ImageButton'w.Name='Button'w.AutoButtonColor=false w.Position=UDim2
else .new(0.0879999995,0,0.0529999994,0)w.Size=UDim2.new(0.829999983,0,0.460000008,0)
obj[k] = v w.Image=''w.BackgroundTransparency=1 w.RobloxLocked=true w.Parent=v end function
end getChatColor(v)if v==Enum.DialogTone.Neutral then return Enum.ChatColor.Blue
elseif type(k) == "number" and type(v) == "userdata" then elseif v==Enum.DialogTone.Friendly then return Enum.ChatColor.Green elseif v==
v.Parent = obj Enum.DialogTone.Enemy then return Enum.ChatColor.Red end end function
end 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.
obj.Parent = parent FrameStyle.ChatBlue a.Tail.Image=
return obj 'rbxasset://textures/chatBubble_botBlue_tailRight.png'elseif v==Enum.DialogTone.
end Friendly then a.Style=Enum.FrameStyle.ChatGreen a.Tail.Image=
local waitForProperty 'rbxasset://textures/chatBubble_botGreen_tailRight.png'elseif v==Enum.DialogTone
waitForProperty = function(instance, name) .Enemy then a.Style=Enum.FrameStyle.ChatRed a.Tail.Image=
while not instance[name] do 'rbxasset://textures/chatBubble_botRed_tailRight.png'end styleChoices(v)end
instance.Changed:wait() function setChatNotificationTone(v,w,x)if x==Enum.DialogTone.Neutral then v.
end Image.Image='rbxasset://textures/chatBubble_botBlue_notify_bkg.png'elseif x==
end Enum.DialogTone.Friendly then v.Image.Image=
local waitForChild 'rbxasset://textures/chatBubble_botGreen_notify_bkg.png'elseif x==Enum.
waitForChild = function(instance, name) DialogTone.Enemy then v.Image.Image=
while not instance:FindFirstChild(name) do 'rbxasset://textures/chatBubble_botRed_notify_bkg.png'end if w==Enum.
instance.ChildAdded:wait() DialogPurpose.Quest then v.Image.Button.Image=
end 'rbxasset://textures/chatBubble_bot_notify_bang.png'elseif w==Enum.DialogPurpose
end .Help then v.Image.Button.Image=
local mainFrame 'rbxasset://textures/chatBubble_bot_notify_question.png'elseif w==Enum.
local choices = { } DialogPurpose.Shop then v.Image.Button.Image=
local lastChoice 'rbxasset://textures/chatBubble_bot_notify_money.png'end end function
local choiceMap = { } createMessageDialog()p=Instance.new'Frame'p.Name='DialogScriptMessage'p.Style=
local currentConversationDialog Enum.FrameStyle.RobloxRound p.Visible=false local v=Instance.new'TextLabel'v.
local currentConversationPartner Name='Text'v.Position=UDim2.new(0,0,0,-1)v.Size=UDim2.new(1,0,1,0)v.FontSize=
local currentAbortDialogScript Enum.FontSize.Size14 v.BackgroundTransparency=1 v.TextColor3=Color3.new(1,1,1)v.
local tooFarAwayMessage = "You are too far away to chat!" RobloxLocked=true v.Parent=p end function showMessage(v,w)p.Text.Text=v p.Size=
local tooFarAwaySize = 300 UDim2.new(0,w,0,40)p.Position=UDim2.new(0.5,-w/2,0.5,-40)p.Visible=true wait(2)p
local characterWanderedOffMessage = "Chat ended because you walked away" .Visible=false end function variableDelay(v)local w=math.min(string.len(v),100)
local characterWanderedOffSize = 350 wait(0.75+((w/75)*1.5))end function resetColor(v,w)if w==Enum.DialogTone.Neutral
local conversationTimedOut = "Chat ended because you didn't reply" then v.BackgroundColor3=Color3.new(0,0,0.7019607843137254)v.Number.TextColor3=
local conversationTimedOutSize = 350 Color3.new(0.17647058823529413,0.5568627450980392,0.9607843137254902)elseif w==
local player Enum.DialogTone.Friendly then v.BackgroundColor3=Color3.new(0,
local chatNotificationGui 0.30196078431372547,0)v.Number.TextColor3=Color3.new(0,0.7450980392156863,0)
local messageDialog elseif w==Enum.DialogTone.Enemy then v.BackgroundColor3=Color3.new(
local timeoutScript 0.5490196078431373,0,0)v.Number.TextColor3=Color3.new(1,0.34509803921568627,
local reenableDialogScript 0.30980392156862746)end end function highlightColor(v,w)if w==Enum.DialogTone.
local dialogMap = { } Neutral then v.BackgroundColor3=Color3.new(7.8431372549019605E-3,
local dialogConnections = { } 0.4235294117647059,1)v.Number.TextColor3=Color3.new(1,1,1)elseif w==Enum.
local gui DialogTone.Friendly then v.BackgroundColor3=Color3.new(0,0.5019607843137255,0)v.
waitForChild(game, "CoreGui") Number.TextColor3=Color3.new(1,1,1)elseif w==Enum.DialogTone.Enemy then v.
waitForChild(game.CoreGui, "RobloxGui") BackgroundColor3=Color3.new(0.8,0,0)v.Number.TextColor3=Color3.new(1,1,1)end end
if game.CoreGui.RobloxGui:FindFirstChild("ControlFrame") then function endDialog()if g then g:Remove()g=nil end local v=e e=nil if v and v.
gui = game.CoreGui.RobloxGui.ControlFrame InUse then local w=r:Clone()w.archivable=false w.Disabled=false w.Parent=v end
else for w,x in pairs(s)do if w and x then x.Enabled=not w.InUse end end f=nil end
gui = game.CoreGui.RobloxGui function wanderDialog()print'Wander'a.Visible=false endDialog()showMessage(j,k)
end end function timeoutDialog()print'Timeout'a.Visible=false endDialog()
local currentTone showMessage(l,m)end function normalEndDialog()print'Done'endDialog()end function
currentTone = function() sanitizeMessage(w)if string.len(w)==0 then return'...'else return w end end
if currentConversationDialog then function selectChoice(w)renewKillswitch(e)a.Visible=false if w==c then game.Chat
return currentConversationDialog.Tone :Chat(game.Players.LocalPlayer.Character,'Goodbye!',getChatColor(currentTone()))
else normalEndDialog()else local x=d[w]game.Chat:Chat(game.Players.LocalPlayer.
return Enum.DialogTone.Neutral Character,sanitizeMessage(x.UserDialog),getChatColor(currentTone()))wait(1)e:
end SignalDialogChoiceSelected(n,x)game.Chat:Chat(f,sanitizeMessage(x.ResponseDialog
end ),getChatColor(currentTone()))variableDelay(x.ResponseDialog)
local createChatNotificationGui presentDialogChoices(f,x:GetChildren())end end function newChoice(w)local x=
createChatNotificationGui = function() Instance.new'TextButton'x.BackgroundColor3=Color3.new(0,0,0.7019607843137254)x.
chatNotificationGui = New("BillboardGui", "ChatNotificationGui", { AutoButtonColor=false x.BorderSizePixel=0 x.Text=''x.MouseEnter:connect(function
ExtentsOffset = Vector3.new(0, 1, 0), ()highlightColor(x,currentTone())end)x.MouseLeave:connect(function()resetColor(x
Size = UDim2.new(4, 0, 5.42857122, 0), ,currentTone())end)x.MouseButton1Click:connect(function()selectChoice(x)end)x.
SizeOffset = Vector2.new(0, 0), RobloxLocked=true local y=Instance.new'TextLabel'y.Name='Number'y.TextColor3=
StudsOffset = Vector3.new(0.4, 4.3, 0), Color3.new(0.4980392156862745,0.8313725490196079,1)y.Text=w y.FontSize=Enum.
Enabled = true, FontSize.Size14 y.BackgroundTransparency=1 y.Position=UDim2.new(0,4,0,2)y.Size=
RobloxLocked = true, UDim2.new(0,20,0,24)y.TextXAlignment=Enum.TextXAlignment.Left y.TextYAlignment=
Active = true, Enum.TextYAlignment.Top y.RobloxLocked=true y.Parent=x local z=Instance.new
New("ImageLabel", "Image", { 'TextLabel'z.Name='UserPrompt'z.BackgroundTransparency=1 z.TextColor3=Color3.
Active = false, new(1,1,1)z.FontSize=Enum.FontSize.Size14 z.Position=UDim2.new(0,28,0,2)z.Size=
BackgroundTransparency = 1, UDim2.new(1,-32,1,-4)z.TextXAlignment=Enum.TextXAlignment.Left z.TextYAlignment=
Position = UDim2.new(0, 0, 0, 0), Enum.TextYAlignment.Top z.TextWrap=true z.RobloxLocked=true z.Parent=x return x
Size = UDim2.new(1, 0, 1, 0), end function initialize(w)b[1]=newChoice'1)'b[2]=newChoice'2)'b[3]=newChoice'3)'
Image = "", b[4]=newChoice'4)'c=newChoice'5)'c.UserPrompt.Text='Goodbye!'c.Size=UDim2.new(1,
RobloxLocked = true, 0,0,28)a=Instance.new'Frame'a.Name='UserDialogArea'a.Size=UDim2.new(0,350,0,200)
New("ImageButton", "Button", { a.Style=Enum.FrameStyle.ChatBlue a.Visible=false local x=Instance.new
AutoButtonColor = false, 'ImageLabel'x.Name='Tail'x.Size=UDim2.new(0,62,0,53)x.Position=UDim2.new(1,8,
Position = UDim2.new(0.088, 0, 0.053, 0), 0.25)x.Image='rbxasset://textures/chatBubble_botBlue_tailRight.png'x.
Size = UDim2.new(0.83, 0, 0.46, 0), BackgroundTransparency=1 x.RobloxLocked=true x.Parent=a for y,z in pairs(b)do z.
Image = "", RobloxLocked=true z.Parent=a end c.RobloxLocked=true c.Parent=a a.RobloxLocked=
BackgroundTransparency = 1, true a.Parent=w end function presentDialogChoices(w,x)if not e then return end f
RobloxLocked = true =w local y={}for z,A in pairs(x)do if A:IsA'DialogChoice'then table.insert(y,A)
}) 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].
end UserPrompt.Text=G.UserDialog local H=math.ceil(b[B].UserPrompt.TextBounds.Y/24)*
local getChatColor 24 b[B].Position=UDim2.new(0,0,0,C)b[B].Size=UDim2.new(1,0,0,H)b[B].Visible=true
getChatColor = function(tone) 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
if tone == Enum.DialogTone.Neutral then .Size=UDim2.new(0,350,0,C+24+32)a.Position=UDim2.new(0,20,0,-a.Size.Y.Offset-20)
return Enum.ChatColor.Blue styleMainFrame(currentTone())a.Visible=true end function doDialog(w)while not
elseif tone == Enum.DialogTone.Friendly then Instance.Lock(w,n)do wait()end if w.InUse then Instance.Unlock(w)return else w.
return Enum.ChatColor.Green InUse=true Instance.Unlock(w)end e=w game.Chat:Chat(w.Parent,w.InitialPrompt,
elseif tone == Enum.DialogTone.Enemy then getChatColor(w.Tone))variableDelay(w.InitialPrompt)presentDialogChoices(w.Parent
return Enum.ChatColor.Red ,w:GetChildren())end function renewKillswitch(w)if g then g:Remove()g=nil end g=
end 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.
local resetColor Position)>=e.ConversationDistance)then wanderDialog()end wait(1)end end function
resetColor = function(frame, tone) startDialog(w)if w.Parent and w.Parent:IsA'BasePart'then if n:
if tone == Enum.DialogTone.Neutral then DistanceFromCharacter(w.Parent.Position)>=w.ConversationDistance then
frame.BackgroundColor3 = Color3.new(0, 0, 179 / 255) showMessage(h,i)return end for x,y in pairs(s)do if x and y then y.Enabled=false
frame.Number.TextColor3 = Color3.new(45 / 255, 142 / 255, 245 / 255) end end renewKillswitch(x)delay(1,checkForLeaveArea)doDialog(x)end end function
elseif tone == Enum.DialogTone.Friendly then removeDialog(w)if s[w]then s[w]:Remove()s[w]=nil end if t[w]then t[w]:
frame.BackgroundColor3 = Color3.new(0, 77 / 255, 0) disconnect()t[w]=nil end end function addDialog(w)if w.Parent then if w.Parent:
frame.Number.TextColor3 = Color3.new(0, 190 / 255, 0) IsA'BasePart'then local x=o:clone()x.Enabled=not w.InUse x.Adornee=w.Parent x.
elseif tone == Enum.DialogTone.Enemy then RobloxLocked=true x.Parent=game.CoreGui x.Image.Button.MouseButton1Click:
frame.BackgroundColor3 = Color3.new(140 / 255, 0, 0) connect(function()startDialog(w)end)setChatNotificationTone(x,w.Purpose,w.Tone)s
frame.Number.TextColor3 = Color3.new(255 / 255, 88 / 255, 79 / 255) [w]=x t[w]=w.Changed:connect(function(y)if y=='Parent'and w.Parent then
end 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
local styleChoices setChatNotificationTone(x,w.Purpose,w.Tone)end end)else t[w]=w.Changed:connect(
styleChoices = function(tone) function(x)if x=='Parent'and w.Parent then removeDialog(w)addDialog(w)end end)
for _, obj in pairs(choices) do end end end function fetchScripts()local w=game:GetService'InsertService':
resetColor(obj, tone) LoadAsset(39226062)if type(w)=='string'then wait(0.1)w=game:GetService
end 'InsertService':LoadAsset(39226062)end if type(w)=='string'then return end
return resetColor(lastChoice, tone) waitForChild(w,'TimeoutScript')q=w.TimeoutScript waitForChild(w,
end 'ReenableDialogScript')r=w.ReenableDialogScript end function onLoad()
local styleMainFrame waitForProperty(game.Players,'LocalPlayer')n=game.Players.LocalPlayer
styleMainFrame = function(tone) waitForProperty(n,'Character')fetchScripts()createChatNotificationGui()
if tone == Enum.DialogTone.Neutral then createMessageDialog()p.RobloxLocked=true p.Parent=u waitForChild(u,
mainFrame.Style = Enum.FrameStyle.ChatBlue 'BottomLeftControl')local w=Instance.new'Frame'w.Name='DialogFrame'w.Position=
mainFrame.Tail.Image = "rbxasset://textures/chatBubble_botBlue_tailRight.png" UDim2.new(0,0,0,0)w.Size=UDim2.new(0,0,0,0)w.BackgroundTransparency=1 w.
elseif tone == Enum.DialogTone.Friendly then RobloxLocked=true w.Parent=u.BottomLeftControl initialize(w)game.
mainFrame.Style = Enum.FrameStyle.ChatGreen CollectionService.ItemAdded:connect(function(x)if x:IsA'Dialog'then addDialog(x)
mainFrame.Tail.Image = "rbxasset://textures/chatBubble_botGreen_tailRight.png" end end)game.CollectionService.ItemRemoved:connect(function(x)if x:IsA'Dialog'
elseif tone == Enum.DialogTone.Enemy then then removeDialog(x)end end)for x,y in pairs(game.CollectionService:
mainFrame.Style = Enum.FrameStyle.ChatRed GetCollection'Dialog')do if y:IsA'Dialog'then addDialog(y)end end end onLoad()
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,16 +1,5 @@
print("[Mercury]: Loaded corescript 45374389") local a={}a.Foo=function()print'foo'end a.Bar=function()print'bar'end a.Help=
local t = { } function(b)if b=='Foo'or b==a.Foo then return
t.Foo = function() 'Function Foo. Arguments: None. Side effect: prints foo'elseif b=='Bar'or b==a
return print("foo") .Bar then return'Function Bar. Arguments: None. Side effect: prints bar'end
end end return a
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,235 +1,84 @@
print("[Mercury]: Loaded corescript 48488398") function waitForProperty(a,b)while not a[b]do a.Changed:wait()end end function
local waitForProperty waitForChild(a,b)while not a:FindFirstChild(b)do a.ChildAdded:wait()end end
waitForProperty = function(instance, property) waitForProperty(game.Players,'LocalPlayer')waitForChild(script.Parent,'Popup')
while not instance[property] do waitForChild(script.Parent.Popup,'AcceptButton')script.Parent.Popup.AcceptButton
instance.Changed:wait() .Modal=true local a,b,c,d,e=game.Players.LocalPlayer,nil,{},true,function()if
end 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
local waitForChild end if h.Visible then return end if c[f]then return end h.PopupText.Text=
waitForChild = function(instance, name) 'Accept Friend Request from '..tostring(f.Name)..'?'h.PopupImage.Image=
while not instance:FindFirstChild(name) do 'http://www.roblox.com/thumbs/avatar.ashx?userId='..tostring(f.userId)..
instance.ChildAdded:wait() '&x=352&y=352'showTwoButtons()h.Visible=true h.AcceptButton.Text='Accept'h.
end 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.
waitForProperty(game.Players, "LocalPlayer") MouseButton1Click:connect(function()h.Visible=false g:RequestFriendship(f)if i
waitForChild(script.Parent, "Popup") then i:disconnect()end if j then j:disconnect()end h:TweenSize(UDim2.new(0,0,0,0
waitForChild(script.Parent.Popup, "AcceptButton") ),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true,e())end)j=h.
script.Parent.Popup.AcceptButton.Modal = true DeclineButton.MouseButton1Click:connect(function()h.Visible=false g:
local localPlayer = game.Players.LocalPlayer RevokeFriendship(f)c[f]=true print'pop up blacklist'if i then i:disconnect()end
local teleportUI if j then j:disconnect()end h:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.
local friendRequestBlacklist = { } Out,Enum.EasingStyle.Quart,1,true,e())end)end game.Players.FriendRequestEvent:
local teleportEnabled = true connect(function(f,g,h)if f~=a and g~=a then return end if f==a then if h==Enum.
local showOneButton FriendRequestEvent.Accept then game:GetService'GuiService':SendNotification(
showOneButton = function() 'You are Friends','With '..g.Name..'!',
local popup = script.Parent:FindFirstChild("Popup") 'http://www.roblox.com/thumbs/avatar.ashx?userId='..tostring(g.userId)..
if popup then '&x=48&y=48',5,function()end)end elseif g==a then if h==Enum.FriendRequestEvent.
popup.OKButton.Visible = true Issue then if c[f]then return end game:GetService'GuiService':SendNotification(
popup.DeclineButton.Visible = false 'Friend Request','From '..f.Name,
popup.AcceptButton.Visible = false 'http://www.roblox.com/thumbs/avatar.ashx?userId='..tostring(f.userId)..
end '&x=48&y=48',8,function()makeFriend(f,g)end)elseif h==Enum.FriendRequestEvent.
return popup Accept then game:GetService'GuiService':SendNotification('You are Friends',
end 'With '..f.Name..'!','http://www.roblox.com/thumbs/avatar.ashx?userId='..
local showTwoButtons tostring(f.userId)..'&x=48&y=48',5,function()end)end end end)function
showTwoButtons = function() showOneButton()local f=script.Parent:FindFirstChild'Popup'if f then f.OKButton.
local popup = script.Parent:FindFirstChild("Popup") Visible=true f.DeclineButton.Visible=false f.AcceptButton.Visible=false end end
if popup then function showTwoButtons()local f=script.Parent:FindFirstChild'Popup'if f then f.
popup.OKButton.Visible = false OKButton.Visible=false f.DeclineButton.Visible=true f.AcceptButton.Visible=true
popup.DeclineButton.Visible = true end end function showTeleportUI(f,g)if b~=nil then b:Remove()end waitForChild(a,
popup.AcceptButton.Visible = true 'PlayerGui')b=Instance.new'Message'b.Text=f b.Parent=a.PlayerGui if g>0 then
end wait(g)b:Remove()end end function onTeleport(f,g,h)if game:GetService
return popup 'TeleportService'.CustomizedTeleportUI==false then if f==Enum.TeleportState.
end Started then showTeleportUI('Teleport started...',0)elseif f==Enum.TeleportState
local makePopupInvisible .WaitingForServer then showTeleportUI('Requesting server...',0)elseif f==Enum.
makePopupInvisible = function() TeleportState.InProgress then showTeleportUI('Teleporting...',0)elseif f==Enum.
if script.Parent.Popup then TeleportState.Failed then showTeleportUI(
script.Parent.Popup.Visible = false [[Teleport failed. Insufficient privileges or target place does not exist.]],3)
end end end end if d then a.OnTeleport:connect(onTeleport)game:GetService
end 'TeleportService'.ErrorCallback=function(f)local h=script.Parent:FindFirstChild
local makeFriend 'Popup'showOneButton()h.PopupText.Text=f local i i=h.OKButton.MouseButton1Click:
makeFriend = function(fromPlayer, toPlayer) connect(function()game:GetService'TeleportService':TeleportCancel()if i then i:
local popup = script.Parent:FindFirstChild("Popup") disconnect()end game.GuiService:RemoveCenterDialog(script.Parent:FindFirstChild
if not (popup ~= nil) then 'Popup')h:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle
return .Quart,1,true,e())end)game.GuiService:AddCenterDialog(script.Parent:
end FindFirstChild'Popup',Enum.CenterDialogType.QuitDialog,function()showOneButton()
if popup.Visible then script.Parent:FindFirstChild'Popup'.Visible=true h:TweenSize(UDim2.new(0,330,0,
return 350),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true)end,function()h:
end TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,
if friendRequestBlacklist[fromPlayer] then true,e())end)end game:GetService'TeleportService'.ConfirmationCallback=function(
return f,h,i)local j=script.Parent:FindFirstChild'Popup'j.PopupText.Text=f j.PopupImage
end .Image=''local k,l local function killCons()if k then k:disconnect()end if l
popup.PopupText.Text = "Accept Friend Request from " .. tostring(fromPlayer.Name) .. "?" then l:disconnect()end game.GuiService:RemoveCenterDialog(script.Parent:
popup.PopupImage.Image = "http://www.roblox.com/thumbs/avatar.ashx?userId=" .. tostring(fromPlayer.userId) .. "&x=352&y=352" FindFirstChild'Popup')j:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,
showTwoButtons() Enum.EasingStyle.Quart,1,true,e())end k=j.AcceptButton.MouseButton1Click:
popup.Visible = true connect(function()killCons()local m,n=pcall(function()game:GetService
popup.AcceptButton.Text = "Accept" 'TeleportService':TeleportImpl(h,i)end)if not m then showOneButton()j.PopupText.
popup.DeclineButton.Text = "Decline" Text=n local o o=j.OKButton.MouseButton1Click:connect(function()if o then o:
popup:TweenSize(UDim2.new(0, 330, 0, 350), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true) disconnect()end game.GuiService:RemoveCenterDialog(script.Parent:FindFirstChild
local yesCon, noCon 'Popup')j:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle
yesCon = popup.AcceptButton.MouseButton1Click:connect(function() .Quart,1,true,e())end)game.GuiService:AddCenterDialog(script.Parent:
popup.Visible = false FindFirstChild'Popup',Enum.CenterDialogType.QuitDialog,function()showOneButton()
toPlayer:RequestFriendship(fromPlayer) script.Parent:FindFirstChild'Popup'.Visible=true j:TweenSize(UDim2.new(0,330,0,
if yesCon ~= nil then 350),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true)end,function()j:
yesCon:disconnect() TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,
end true,e())end)end end)l=j.DeclineButton.MouseButton1Click:connect(function()
if noCon ~= nil then killCons()pcall(function()game:GetService'TeleportService':TeleportCancel()end)
noCon:disconnect() end)local m=pcall(function()game.GuiService:AddCenterDialog(script.Parent:
end FindFirstChild'Popup',Enum.CenterDialogType.QuitDialog,function()showTwoButtons(
return popup:TweenSize(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true, makePopupInvisible()) )j.AcceptButton.Text='Leave'j.DeclineButton.Text='Stay'script.Parent:
end) FindFirstChild'Popup'.Visible=true j:TweenSize(UDim2.new(0,330,0,350),Enum.
noCon = popup.DeclineButton.MouseButton1Click:connect(function() EasingDirection.Out,Enum.EasingStyle.Quart,1,true)end,function()j:TweenSize(
popup.Visible = false UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true,e())
toPlayer:RevokeFriendship(fromPlayer) end)end)if m==false then script.Parent:FindFirstChild'Popup'.Visible=true j.
friendRequestBlacklist[fromPlayer] = true AcceptButton.Text='Leave'j.DeclineButton.Text='Stay'j:TweenSize(UDim2.new(0,330,
print("pop up blacklist") 0,350),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true)end return true
if yesCon ~= nil then end end
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,91 +1,20 @@
print("[Mercury]: Loaded corescript 48488451") local a=Instance.new'Frame'a.Position=UDim2.new(0.5,-165,0.5,-175)a.Size=UDim2.
local New new(0,330,0,350)a.Style=Enum.FrameStyle.RobloxRound a.ZIndex=4 a.Name='Popup'a.
New = function(className, name, props) Visible=false a.Parent=script.Parent local b=a:clone()b.Size=UDim2.new(1,16,1,16
if not (props ~= nil) then )b.Position=UDim2.new(0,-8,0,-8)b.Name='Darken'b.ZIndex=1 b.Parent=a local c=
props = name Instance.new'TextButton'c.Position=UDim2.new(0,20,0,270)c.Size=UDim2.new(0,100,0
name = nil ,50)c.Font=Enum.Font.ArialBold c.FontSize=Enum.FontSize.Size24 c.Style=Enum.
end ButtonStyle.RobloxButton c.TextColor3=Color3.new(0.9725490196078431,
local obj = Instance.new(className) 0.9725490196078431,0.9725490196078431)c.Text='Yes'c.ZIndex=5 c.Name=
if name then 'AcceptButton'c.Parent=a local d=c:clone()d.Position=UDim2.new(1,-120,0,270)d.
obj.Name = name Text='No'd.Name='DeclineButton'd.Parent=a local e=c:clone()e.Name='OKButton'e.
end Text='OK'e.Position=UDim2.new(0.5,-50,0,270)e.Visible=false e.Parent=a local f=
local parent Instance.new'ImageLabel'f.BackgroundTransparency=1 f.Position=UDim2.new(0.5,-140
for k, v in pairs(props) do ,0,0)f.Size=UDim2.new(0,280,0,280)f.ZIndex=3 f.Name='PopupImage'f.Parent=a local
if type(k) == "string" then g=Instance.new'ImageLabel'g.BackgroundTransparency=1 g.Size=UDim2.new(1,0,1,0)g.
if k == "Parent" then Image='http://www.roblox.com/asset/?id=47574181'g.Name='Backing'g.ZIndex=2 g.
parent = v Parent=f local h=Instance.new'TextLabel'h.Name='PopupText'h.Size=UDim2.new(1,0,
else 0.8,0)h.Font=Enum.Font.ArialBold h.FontSize=Enum.FontSize.Size36 h.
obj[k] = v BackgroundTransparency=1 h.Text="Hello I'm a popup"h.TextColor3=Color3.new(
end 0.9725490196078431,0.9725490196078431,0.9725490196078431)h.TextWrap=true h.
elseif type(k) == "number" and type(v) == "userdata" then ZIndex=5 h.Parent=a script:remove()
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,731 +1,163 @@
print("[Mercury]: Loaded corescript 60595411") local a,b,c={},assert,{buffer={}}function c:New()local d={}setmetatable(d,self)
local t = { } self.__index=self d.buffer={}return d end function c:Append(d)self.buffer[#self.
local New buffer+1]=d end function c:ToString()return table.concat(self.buffer)end local d
New = function(className, name, props) ={backslashes={['\b']='\\b',['\t']='\\t',['\n']='\\n',['\f']='\\f',['\r']='\\r',
if not (props ~= nil) then ['"']='\\"',['\\']='\\\\',['/']='\\/'}}function d:New()local e={}e.writer=c:New(
props = name )setmetatable(e,self)self.__index=self return e end function d:Append(e)self.
name = nil writer:Append(e)end function d:ToString()return self.writer:ToString()end
end function d:Write(e)local f=type(e)if f=='nil'then self:WriteNil()elseif f==
local obj = Instance.new(className) 'boolean'or f=='number'then self:WriteString(e)elseif f=='string'then self:
if name then ParseString(e)elseif f=='table'then self:WriteTable(e)elseif f=='function'then
obj.Name = name self:WriteFunction(e)elseif f=='thread'or f=='userdata'then self:WriteError(e)
end end end function d:WriteNil()self:Append'null'end function d:WriteString(e)self:
local parent Append(tostring(e))end function d:ParseString(e)self:Append'"'self:Append(string
for k, v in pairs(props) do .gsub(e,'[%z%c\\"/]',function(f)local g=self.backslashes[f]if g then return g
if type(k) == "string" then end return string.format('\\u%.4X',string.byte(f))end))self:Append'"'end
if k == "Parent" then function d:IsArray(e)local f,g=0,function(f)if type(f)=='number'and f>0 then if
parent = v math.floor(f)==f then return true end end return false end for h,i in pairs(e)do
else if not g(h)then return false,'{','}'else f=math.max(f,h)end end return true,'[',
obj[k] = v ']',f end function d:WriteTable(e)local f,g,h,i=self:IsArray(e)self:Append(g)if
end f then for j=1,i do self:Write(e[j])if j<i then self:Append','end end else local
elseif type(k) == "number" and type(v) == "userdata" then j=true for k,l in pairs(e)do if not j then self:Append','end j=false self:
v.Parent = obj ParseString(k)self:Append':'self:Write(l)end end self:Append(h)end function d:
end 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
obj.Parent = parent )end end local e={s='',i=0}function e:New(f)local g={}setmetatable(g,self)self.
return obj __index=self g.s=f or g.s return g end function e:Peek()local f=self.i+1 if f<=#
end self.s then return string.sub(self.s,f,f)end return nil end function e:Next()
local assert = assert self.i=self.i+1 if self.i<=#self.s then return string.sub(self.s,self.i,self.i)
local Null end return nil end function e:All()return self.s end local f={escapes={['t']=
Null = function() '\t',['n']='\n',['f']='\f',['r']='\r',['b']='\b'}}function f:New(g)local h={}h.
return Null reader=e:New(g)setmetatable(h,self)self.__index=self return h end function f:
end Read()self:SkipWhiteSpace()local g=self:Peek()if g==nil then error(string.
local StringBuilder = { format("Nil string: '%s'",self:All()))elseif g=='{'then return self:ReadObject()
buffer = { } elseif g=='['then return self:ReadArray()elseif g=='"'then return self:
} ReadString()elseif string.find(g,'[%+%-%d]')then return self:ReadNumber()elseif
StringBuilder.New = function(self) g=='t'then return self:ReadTrue()elseif g=='f'then return self:ReadFalse()elseif
local o = setmetatable({ }, self) g=='n'then return self:ReadNull()elseif g=='/'then self:ReadComment()return self
self.__index = self :Read()else return nil end end function f:ReadTrue()self:TestReservedWord{'t',
o.buffer = { } 'r','u','e'}return true end function f:ReadFalse()self:TestReservedWord{'f','a',
return o 'l','s','e'}return false end function f:ReadNull()self:TestReservedWord{'n','u',
end 'l','l'}return nil end function f:TestReservedWord(g)for h,i in ipairs(g)do if
StringBuilder.Append = function(self, s) self:Next()~=i then error(string.format("Error reading '%s': %s",table.concat(g)
do ,self:All()))end end end function f:ReadNumber()local g,h=self:Next(),self:Peek(
local _obj_0 = self.buffer )while h~=nil and string.find(h,'[%+%-%d%.eE]')do g=g..self:Next()h=self:Peek()
_obj_0[#_obj_0 + 1] = s end g=tonumber(g)if g==nil then error(string.format("Invalid number: '%s'",g))
end 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.
StringBuilder.ToString = function(self) escapes[h]then h=self.escapes[h]end end g=g..h end b(self:Next()=='"')local h=
return table.concat(self.buffer) function(h)return string.char(tonumber(h,16))end return string.gsub(g,
end 'u%x%x(%x%x)',h)end function f:ReadComment()b(self:Next()=='/')local g=self:
local JsonWriter = { Next()if g=='/'then self:ReadSingleLineComment()elseif g=='*'then self:
backslashes = { ReadBlockComment()else error(string.format('Invalid comment: %s',self:All()))end
["\b"] = "\\b", end function f:ReadBlockComment()local g=false while not g do local h=self:Next(
["\t"] = "\\t", )if h=='*'and self:Peek()=='/'then g=true end if not g and h=='/'and self:Peek()
["\n"] = "\\n", =='*'then error(string.format("Invalid comment: %s, '/*' illegal.",self:All()))
["\f"] = "\\f", end end self:Next()end function f:ReadSingleLineComment()local g=self:Next()
["\r"] = "\\r", while g~='\r'and g~='\n'do g=self:Next()end end function f:ReadArray()local g={}
['"'] = '\\"', 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
JsonWriter.New = function(self) if self:Peek()=='}'then h=true end while not h do local i=self:Read()if type(i)
local o = setmetatable({ }, self) ~='string'then error(string.format('Invalid non-string object key: %s',i))end
o.writer = StringBuilder:New() self:SkipWhiteSpace()local j=self:Next()if j~=':'then error(string.format(
self.__index = self "Invalid object: '%s' due to: '%s'",self:All(),j))end self:SkipWhiteSpace()local
return o k=self:Read()g[i]=k self:SkipWhiteSpace()if self:Peek()=='}'then h=true end if
end not h then j=self:Next()if j~=','then error(string.format(
JsonWriter.Append = function(self, s) "Invalid array: '%s' near: '%s'",self:All(),j))end end end b(self:Next()=='}')
return self.writer:Append(s) return g end function f:SkipWhiteSpace()local g=self:Peek()while g~=nil and
end string.find(g,'[%s/]')do if g=='/'then self:ReadComment()else self:Next()end g=
JsonWriter.ToString = function(self) self:Peek()end end function f:Peek()return self.reader:Peek()end function f:Next
return self.writer:ToString() ()return self.reader:Next()end function f:All()return self.reader:All()end
end function Encode(g)local h=d:New()h:Write(g)return h:ToString()end function
JsonWriter.Write = function(self, o) Decode(g)local h=f:New(g)return h:Read()end function Null()return Null end a.
local _exp_0 = type(o) DecodeJSON=function(g)pcall(function()warn
if "nil" == _exp_0 then [[RbxUtility.DecodeJSON is deprecated, please use Game:GetService('HttpService'):JSONDecode() instead.]]
return self:WriteNil() end)if type(g)=='string'then return Decode(g)end print
elseif "boolean" == _exp_0 or "number" == _exp_0 then 'RbxUtil.DecodeJSON expects string argument!'return nil end a.EncodeJSON=
return self:WriteString(o) function(g)pcall(function()warn
elseif "string" == _exp_0 then [[RbxUtility.EncodeJSON is deprecated, please use Game:GetService('HttpService'):JSONEncode() instead.]]
return self:ParseString(o) end)return Encode(g)end a.MakeWedge=function(g,h,i,j)return game:GetService
elseif "table" == _exp_0 then 'Terrain':AutoWedgeCell(g,h,i)end a.SelectTerrainRegion=function(g,h,i,j)local k
return self:WriteTable(o) =game.Workspace:FindFirstChild'Terrain'if not k then return end b(g)b(h)if not
elseif "function" == _exp_0 then type(g)=='Region3'then error(
return self:WriteFunction(o) [[regionToSelect (first arg), should be of type Region3, but is type]],type(g))
elseif "thread" == _exp_0 or "userdata" == _exp_0 then end if not type(h)=='BrickColor'then error(
return self:WriteError(o) [[color (second arg), should be of type BrickColor, but is type]],type(h))end
end local l,m,n,o,p=k.GetCell,k.WorldToCellPreferSolid,k.CellCenterToWorld,Enum.
end CellMaterial.Empty,Instance.new'Model'p.Name='SelectionContainer'p.Archivable=
JsonWriter.WriteNil = function(self) false if j then p.Parent=j else p.Parent=game.Workspace end local q,r,s,t,u,v,w=
return self:Append("null") nil,nil,0,nil,{},{},Instance.new'Part'w.Name='SelectionPart'w.Transparency=1 w.
end Anchored=true w.Locked=true w.CanCollide=false w.Size=Vector3.new(4.2,4.2,4.2)
JsonWriter.WriteString = function(self, o) local x=Instance.new'SelectionBox'function createAdornment(y)local z,A=nil,nil
return self:Append(tostring(o)) if#v>0 then z=v[1]['part']A=v[1]['box']table.remove(v,1)A.Visible=true else z=w:
end Clone()z.Archivable=false A=x:Clone()A.Archivable=false A.Adornee=z A.Parent=p A
JsonWriter.ParseString = function(self, s) .Adornee=z A.Parent=p end if y then A.Color=y end return z,A end function
self:Append('"') cleanUpAdornments()for y,z in pairs(u)do if z.KeepAlive~=r then z.SelectionBox.
self:Append(string.gsub(s, '[%z%c\\"/]', function(n) Visible=false table.insert(v,{part=z.SelectionPart,box=z.SelectionBox})u[y]=nil
local c = self.backslashes[n] end end end function incrementAliveCounter()s=s+1 if s>1000000 then s=0 end
if c then return s end function adornFullCellsInRegion(y,z)local A,B=y.CFrame.p-(y.Size/2)
return c +Vector3.new(2,2,2),y.CFrame.p+(y.Size/2)-Vector3.new(2,2,2)local C,D=m(k,A),m(k
end ,B)r=incrementAliveCounter()for E=C.y,D.y do for F=C.z,D.z do for G=C.x,D.x do
return string.format("\\u%.4X", string.byte(n)) 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),
end)) false for L,M in pairs(u)do if L==J then M.KeepAlive=r if z then M.SelectionBox.
return self:Append('"') Color=z end K=true break end end if not K then local N,O=createAdornment(z)N.
end Size=Vector3.new(4,4,4)N.CFrame=CFrame.new(I)local P={SelectionPart=N,
JsonWriter.IsArray = function(self, t) SelectionBox=O,KeepAlive=r}u[J]=P end end end end end cleanUpAdornments()end t=g
local count = 0 if i then local y,z=createAdornment(h)y.Size=g.Size y.CFrame=g.CFrame u.
local isindex SelectionPart=y u.SelectionBox=z q=function(A,B)if A and A~=t then t=A y.Size=A.
isindex = function(k) Size y.CFrame=A.CFrame end if B then z.Color=B end end else
if type(k) == "number" and k > 0 and math.floor(k) == k then adornFullCellsInRegion(g,h)q=function(y,z)if y and y~=t then t=y
return true adornFullCellsInRegion(y,z)end end end local y=function()q=nil if p then p:
end Destroy()end u=nil end return q,y end function a.CreateSignal()local g,h,i={},
return false Instance.new'BindableEvent',{}function g:connect(j)if self~=g then error(
end 'connect must be called with `:`, not `.`',2)end if type(j)~='function'then
for k, _ in pairs(t) do error('Argument #1 of connect must be a function, got a '..type(j),2)end local k
if not isindex(k) then =h.Event:connect(j)i[k]=true local l={}function l:disconnect()k:disconnect()i[k]
return false, "{", "}" =nil end l.Disconnect=l.disconnect return l end function g:disconnect()if self~=
else g then error('disconnect must be called with `:`, not `.`',2)end for j,k in
count = math.max(count, k) pairs(i)do j:disconnect()i[j]=nil end end function g:wait()if self~=g then
end error('wait must be called with `:`, not `.`',2)end return h.Event:wait()end
end function g:fire(...)if self~=g then error(
return true, "[", "]", count 'fire must be called with `:`, not `.`',2)end h:Fire(...)end g.Connect=g.connect
end g.Disconnect=g.disconnect g.Wait=g.wait g.Fire=g.fire return g end
JsonWriter.WriteTable = function(self, t) local function Create_PrivImpl(g)if type(g)~='string'then error(
local ba, st, et, n = self:IsArray(t) 'Argument of Create must be a string',2)end return function(h)h=h or{}local i,j,
self:Append(st) k=Instance.new(g),nil,nil for l,m in pairs(h)do if type(l)=='string'then if l==
if ba then 'Parent'then j=m else i[l]=m end elseif type(l)=='number'then if type(m)~=
for i = 1, n do 'userdata'then error(
self:Write(t[i]) [[Bad entry in Create body: Numeric keys must be paired with children, got a: ]]
if i < n then ..type(m),2)end m.Parent=i elseif type(l)=='table'and l.__eventname then if
self:Append(",") type(m)~='function'then error("Bad entry in Create body: Key `[Create.E'"..l.
end __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(
else [[Bad entry in Create body: Key `[Create]` should be paired with a constructor function, got: ]]
local first = true ..tostring(m),2)elseif k then error(
for k, v in pairs(t) do [[Bad entry in Create body: Only one constructor function is allowed]],2)end k=m
if not first then else error('Bad entry ('..tostring(l)..' => '..tostring(m)..') in Create body',2
self:Append(",") )end end if k then k(i)end if j then i.Parent=j end return i end end a.Create=
end setmetatable({},{__call=function(g,...)return Create_PrivImpl(...)end})a.Create.
first = false E=function(g)return{__eventname=g}end a.Help=function(g)if g=='DecodeJSON'or g==
self:ParseString(k) a.DecodeJSON then return
self:Append(":") [[Function DecodeJSON. Arguments: (string). Side effect: returns a table with all parsed JSON values]]
self:Write(v) end if g=='EncodeJSON'or g==a.EncodeJSON then return
end [[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
return self:Append(et) [[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 ]]
end end if g=='SelectTerrainRegion'or g==a.SelectTerrainRegion then return
JsonWriter.WriteError = function(self, o) [[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]]
return error(string.format("Encoding of %s unsupported", tostring(o))) end if g=='CreateSignal'or g==a.CreateSignal then return
end [[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').]]
JsonWriter.WriteFunction = function(self, o) end if g=='Signal:connect'then return
if o == Null then [[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|.]]
return self:WriteNil() end if g=='Signal:wait'then return
else [[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.]]
return self:WriteError(o) end if g=='Signal:fire'then return
end [[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
local StringReader = { [[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.]]
s = "", end if g=='Create'then return
i = 0 [[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 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,22 +1,7 @@
print("[Mercury]: Loaded corescript 60595695") local a,b,c=3569749,game:GetService'ScriptContext',0 while not b and c<3 do c=c+
local deepakTestingPlace = 3569749 1 b=game:GetService'ScriptContext'wait(0.2)end if b then b:RegisterLibrary(
local sc = game:GetService("ScriptContext") 'Libraries/RbxGui','45284430')b:RegisterLibrary('Libraries/RbxGear','45374389')
local tries = 0 if game.PlaceId==a then b:RegisterLibrary('Libraries/RbxStatus','52177566')end b
while not (sc or tries > 2) do :RegisterLibrary('Libraries/RbxUtility','60595411')b:RegisterLibrary(
tries = tries + 1 'Libraries/RbxStamper','73157242')b:LibraryRegistrationComplete()else print
sc = game:GetService("ScriptContext") 'failed to find script context, libraries did not load'end
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,390 +1,97 @@
print("[Mercury]: Loaded corescript 89449093") if game.CoreGui.Version<7 then return end local function waitForChild(a,b)while
if game.CoreGui.Version < 7 then not a:FindFirstChild(b)do a.ChildAdded:wait()end return a:FindFirstChild(b)end
return local function waitForProperty(a,b)while not a[b]do a.Changed:wait()end end
end waitForChild(game,'Players')if#game.Players:GetChildren()<1 then game.Players.
local waitForChild ChildAdded:wait()end waitForProperty(game.Players,'LocalPlayer')local a=script.
waitForChild = function(instance, name) Parent waitForChild(a,'Gear')local b=script.Parent.Parent assert(b:IsA
while not instance:FindFirstChild(name) do 'ScreenGui')waitForChild(a,'Tabs')waitForChild(a.Tabs,'CloseButton')local c=a.
instance.ChildAdded:wait() Tabs.CloseButton waitForChild(a.Tabs,'InventoryButton')local d,e=a.Tabs.
end InventoryButton,nil if game.CoreGui.Version>=8 then waitForChild(a.Tabs,
return instance:FindFirstChild(name) 'WardrobeButton')e=a.Tabs.WardrobeButton end waitForChild(a.Parent,
end 'ControlFrame')local f,g,h=waitForChild(a.Parent.ControlFrame,'BackpackButton'),
local waitForProperty 'gear',waitForChild(a,'SearchFrame')waitForChild(a.SearchFrame,'SearchBoxFrame')
waitForProperty = function(instance, property) local i,j,k,l=waitForChild(a.SearchFrame.SearchBoxFrame,'SearchBox'),
while not instance[property] do waitForChild(a.SearchFrame,'SearchButton'),waitForChild(a.SearchFrame,
instance.Changed:wait() 'ResetButton'),waitForChild(Game.CoreGui,'RobloxGui')local m=waitForChild(l,
end '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.
waitForChild(game, "Players") AbsoluteSize.Y<=320 then y=UDim2.new(0,200,0,140)end function createPublicEvent(
if #game.Players:GetChildren() < 1 then z)assert(z,'eventName is nil')assert(tostring(z),'eventName is not a string')
game.Players.ChildAdded:wait() local A=Instance.new'BindableEvent'A.Name=tostring(z)A.Parent=script return A
end end function createPublicFunction(z,A)assert(z,'funcName is nil')assert(
waitForProperty(game.Players, "LocalPlayer") tostring(z),'funcName is not a string')assert(A,'invokeFunc is nil')assert(type(
local backpack = script.Parent A)=='function',"invokeFunc should be of type 'function'")local B=Instance.new
waitForChild(backpack, "Gear") 'BindableFunction'B.Name=tostring(z)B.OnInvoke=A B.Parent=script return B end
local screen = script.Parent.Parent local z,A,B,C,D=createPublicEvent'ResizeEvent',createPublicEvent
assert(screen:IsA("ScreenGui")) 'BackpackOpenEvent',createPublicEvent'BackpackCloseEvent',createPublicEvent
waitForChild(backpack, "Tabs") 'TabClickedEvent',createPublicEvent'SearchRequestedEvent'function
waitForChild(backpack.Tabs, "CloseButton") deactivateBackpack()a.Visible=false r=false end function
local closeButton = backpack.Tabs.CloseButton initHumanoidDiedConnections()if t then t:disconnect()end waitForProperty(game.
waitForChild(backpack.Tabs, "InventoryButton") Players.LocalPlayer,'Character')waitForChild(game.Players.LocalPlayer.Character,
local inventoryButton = backpack.Tabs.InventoryButton 'Humanoid')t=game.Players.LocalPlayer.Character.Humanoid.Died:connect(
local wardrobeButton deactivateBackpack)end function activateBackpack()initHumanoidDiedConnections()r
if game.CoreGui.Version >= 8 then =true a.Visible=q if q then toggleBackpack()end end local E=function()q=false p=
waitForChild(backpack.Tabs, "WardrobeButton") false f.Selected=false resetSearch()B:Fire(g)a.Tabs.Visible=false h.Visible=
wardrobeButton = backpack.Tabs.WardrobeButton false a:TweenSizeAndPosition(UDim2.new(0,y.X.Offset,0,0),UDim2.new(0.5,-y.X.
end Offset/2,1,-85),Enum.EasingDirection.Out,Enum.EasingStyle.Quad,u,true,function()
waitForChild(backpack.Parent, "ControlFrame") game.GuiService:RemoveCenterDialog(a)a.Visible=false f.Selected=false end)delay(
local backpackButton = waitForChild(backpack.Parent.ControlFrame, "BackpackButton") u,function()game.GuiService:RemoveCenterDialog(a)a.Visible=false f.Selected=
local currentTab = "gear" false p=true o=true end)end function showBackpack()game.GuiService:
local searchFrame = waitForChild(backpack, "SearchFrame") AddCenterDialog(a,Enum.CenterDialogType.PlayerInitiatedDialog,function()a.
waitForChild(backpack.SearchFrame, "SearchBoxFrame") Visible=true f.Selected=true end,function()a.Visible=false f.Selected=false end)
local searchBox = waitForChild(backpack.SearchFrame.SearchBoxFrame, "SearchBox") a.Visible=true f.Selected=true a:TweenSizeAndPosition(y,UDim2.new(0.5,-y.X.
local searchButton = waitForChild(backpack.SearchFrame, "SearchButton") Offset/2,1,-y.Y.Offset-88),Enum.EasingDirection.Out,Enum.EasingStyle.Quad,u,true
local resetButton = waitForChild(backpack.SearchFrame, "ResetButton") )delay(u,function()a.Tabs.Visible=false h.Visible=true A:Fire(g)o=true p=true f.
local robloxGui = waitForChild(Game.CoreGui, "RobloxGui") Image='http://www.roblox.com/asset/?id=97644093'f.Position=UDim2.new(0.5,-60,1,-
local currentLoadout = waitForChild(robloxGui, "CurrentLoadout") y.Y.Offset-103)end)end function toggleBackpack()if not game.Players.LocalPlayer
local loadoutBackground = waitForChild(currentLoadout, "Background") then return end if not game.Players.LocalPlayer['Character']then return end if
local canToggle = true not o then return end if not p then return end p=false o=false q=not q if q then
local readyForNextEvent = true n.Image='http://www.roblox.com/asset/?id=97623721'n.Position=UDim2.new(-3E-2,0,-
local backpackIsOpen = false 0.17,0)n.Size=UDim2.new(1.05,0,1.25,0)n.ZIndex=2 n.Visible=true showBackpack()
local active = true else f.Position=UDim2.new(0.5,-60,1,-44)n.Visible=false f.Selected=false f.Image
local disabledByDeveloper = false ='http://www.roblox.com/asset/?id=97617958'n.Image=
local humanoidDiedCon 'http://www.roblox.com/asset/?id=96536002'n.Position=UDim2.new(-0.1,0,-0.1,0)n.
local guiTweenSpeed = 0.25 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 searchDefaultText = "Search..." G]:IsA'Frame'then local H=F[G]if#H:GetChildren()>0 then f.Position=UDim2.new(0.5
local tilde = "~" ,-60,1,-108)f.Visible=true n.Visible=true if H:GetChildren()[1]:IsA'ImageButton'
local backquote = "`" then local I=H:GetChildren()[1]I.Active=true I.Draggable=false end end end end
local backpackSize = UDim2.new(0, 600, 0, 400) end end function closeBackpack()if q then toggleBackpack()end end function
if robloxGui.AbsoluteSize.Y <= 320 then setSelected(F)assert(F)assert(F:IsA'TextButton')F.BackgroundColor3=Color3.new(1,
backpackSize = UDim2.new(0, 200, 0, 140) 1,1)F.TextColor3=Color3.new(0,0,0)F.Selected=true F.ZIndex=3 end function
end setUnselected(F)assert(F)assert(F:IsA'TextButton')F.BackgroundColor3=Color3.new(
local createPublicEvent 0,0,0)F.TextColor3=Color3.new(1,1,1)F.Selected=false F.ZIndex=1 end function
createPublicEvent = function(eventName) updateTabGui(F)assert(F)if F=='gear'then setSelected(d)setUnselected(e)elseif F
assert(eventName, "eventName is nil") =='wardrobe'then setSelected(e)setUnselected(d)end end function mouseLeaveTab(F)
assert(tostring(eventName), "eventName is not a string") assert(F)assert(F:IsA'TextButton')if F.Selected then return end F.
local _with_0 = Instance.new("BindableEvent") BackgroundColor3=Color3.new(0,0,0)end function mouseOverTab(F)assert(F)assert(F:
_with_0.Name = tostring(eventName) IsA'TextButton')if F.Selected then return end F.BackgroundColor3=Color3.new(
_with_0.Parent = script 0.15294117647058825,0.15294117647058825,0.15294117647058825)end function
return _with_0 newTabClicked(F)assert(F)F=string.lower(F)g=F updateTabGui(F)C:Fire(F)
end resetSearch()end function trim(F)return(F:gsub('^%s*(.-)%s*$','%1'))end function
local createPublicFunction resetSearchBoxGui()k.Visible=false i.Text=v end function doSearch()local F=i.
createPublicFunction = function(funcName, invokeFunc) Text if F==''then resetSearch()return end F=trim(F)k.Visible=true D:Fire(F)end
assert(funcName, "funcName is nil") function resetSearch()resetSearchBoxGui()D:Fire()end local F=function()p=true
assert(tostring(funcName), "funcName is not a string") end function coreGuiChanged(G,H)if G==Enum.CoreGuiType.Backpack or G==Enum.
assert(invokeFunc, "invokeFunc is nil") CoreGuiType.All then r=H s=not H if s then pcall(function()game:GetService
assert(type(invokeFunc) == "function", "invokeFunc should be of type 'function'") 'GuiService':RemoveKey(w)game:GetService'GuiService':RemoveKey(x)end)else game:
local _with_0 = Instance.new("BindableFunction") GetService'GuiService':AddKey(w)game:GetService'GuiService':AddKey(x)end
_with_0.Name = tostring(funcName) resetSearch()h.Visible=H and q m.Visible=H a.Visible=H f.Visible=H end end
_with_0.OnInvoke = invokeFunc createPublicFunction('CloseBackpack',E)createPublicFunction('BackpackReady',F)
_with_0.Parent = script pcall(function()coreGuiChanged(Enum.CoreGuiType.Backpack,Game.StarterGui:
return _with_0 GetCoreGuiEnabled(Enum.CoreGuiType.Backpack))Game.StarterGui.
end CoreGuiChangedSignal:connect(coreGuiChanged)end)d.MouseButton1Click:connect(
local resizeEvent = createPublicEvent("ResizeEvent") function()newTabClicked'gear'end)d.MouseEnter:connect(function()mouseOverTab(d)
local backpackOpenEvent = createPublicEvent("BackpackOpenEvent") end)d.MouseLeave:connect(function()mouseLeaveTab(d)end)if game.CoreGui.Version>=
local backpackCloseEvent = createPublicEvent("BackpackCloseEvent") 8 then e.MouseButton1Click:connect(function()newTabClicked'wardrobe'end)e.
local tabClickedEvent = createPublicEvent("TabClickedEvent") MouseEnter:connect(function()mouseOverTab(e)end)e.MouseLeave:connect(function()
local searchRequestedEvent = createPublicEvent("SearchRequestedEvent") mouseLeaveTab(e)end)end c.MouseButton1Click:connect(closeBackpack)b.Changed:
local resetSearchBoxGui connect(function(G)if G=='AbsoluteSize'then z:Fire(b.AbsoluteSize)end end)game:
resetSearchBoxGui = function() GetService'GuiService':AddKey(w)game:GetService'GuiService':AddKey(x)game:
resetButton.Visible = false GetService'GuiService'.KeyPressed:connect(function(G)if not r or s then return
searchBox.Text = searchDefaultText end if G==w or G==x then toggleBackpack()end end)f.MouseButton1Click:connect(
end function()if not r or s then return end toggleBackpack()end)if game.Players.
local resetSearch LocalPlayer['Character']then activateBackpack()end game.Players.LocalPlayer.
resetSearch = function() CharacterAdded:connect(activateBackpack)i.FocusLost:connect(function(G)if G or i
resetSearchBoxGui() .Text~=''then doSearch()elseif i.Text==''then resetSearch()end end)j.
return searchRequestedEvent:Fire() MouseButton1Click:connect(doSearch)k.MouseButton1Click:connect(resetSearch)if h
end and l.AbsoluteSize.Y<=320 then h.RobloxLocked=false h:Destroy()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