Temporarily switch to unminified corescripts for debugging
This commit is contained in:
parent
005f005eb0
commit
6b2ca1f213
File diff suppressed because it is too large
Load Diff
|
|
@ -1,51 +1,245 @@
|
||||||
local a a=function(b,c,d)if not(d~=nil)then d=c c=nil end local e=Instance.new(b
|
local New
|
||||||
)if c then e.Name=c end local f for g,h in pairs(d)do if type(g)=='string'then
|
New = function(className, name, props)
|
||||||
if g=='Parent'then f=h else e[g]=h end elseif type(g)=='number'and type(h)==
|
if not (props ~= nil) then
|
||||||
'userdata'then h.Parent=e end end e.Parent=f return e end local b,c,d,e,f,g,h,i,
|
props = name
|
||||||
j,k=Game:GetService'ContextActionService',Game:GetService'UserInputService'.
|
name = nil
|
||||||
TouchEnabled,{},{},nil,nil,'http://www.banland.xyz/asset/?id=97166756',
|
end
|
||||||
'http://www.banland.xyz/asset/?id=97166444',{},{UDim2.new(0,123,0,70),UDim2.new(
|
local obj = Instance.new(className)
|
||||||
0,30,0,60),UDim2.new(0,180,0,160),UDim2.new(0,85,0,-25),UDim2.new(0,185,0,-25),
|
if name then
|
||||||
UDim2.new(0,185,0,260),UDim2.new(0,216,0,65)}local l=#k do local m=Game:
|
obj.Name = name
|
||||||
GetService'ContentProvider'm:Preload(h)m:Preload(i)end while not Game.Players do
|
end
|
||||||
wait()end while not Game.Players.LocalPlayer do wait()end local m m=function()if
|
local parent
|
||||||
not f and c then f=a('ScreenGui','ContextActionGui',{a('Frame',
|
for k, v in pairs(props) do
|
||||||
'ContextButtonFrame',{BackgroundTransparency=1,Size=UDim2.new(0.3,0,0.5,0),
|
if type(k) == "string" then
|
||||||
Position=UDim2.new(0.7,0,0.5,0)})})end end local n n=function(o,p,q)if p.
|
if k == "Parent" then
|
||||||
UserInputType==Enum.UserInputType.Touch then o.Image=h return b:CallFunction(q,
|
parent = v
|
||||||
Enum.UserInputState.Begin)end end local o o=function(p,q,r)if q.UserInputType==
|
else
|
||||||
Enum.UserInputType.Touch then p.Image=h return b:CallFunction(r,Enum.
|
obj[k] = v
|
||||||
UserInputState.Change)end end local p p=function(q,r,s)q.Image=i if r.
|
end
|
||||||
UserInputType==Enum.UserInputType.Touch and r.UserInputState==Enum.
|
elseif type(k) == "number" and type(v) == "userdata" then
|
||||||
UserInputState.End then return b:CallFunction(s,Enum.UserInputState.End,r)end
|
v.Parent = obj
|
||||||
end local q q=function()return Game:GetService'GuiService':GetScreenResolution()
|
end
|
||||||
.y<=320 end local r r=function(s,t)local u,v=a('ImageButton',
|
end
|
||||||
'ContextActionButton',{BackgroundTransparency=1,Size=UDim2.new((function()if q()
|
obj.Parent = parent
|
||||||
then return 0,90,0,90 else return 0,70,0,70 end end)()),Active=true,Image=i,
|
return obj
|
||||||
Parent=g}),nil Game:GetService'UserInputService'.InputEnded:connect(function(w)j
|
end
|
||||||
[w]=nil end)u.InputBegan:connect(function(w)if j[w]then return end if w.
|
local contextActionService = Game:GetService("ContextActionService")
|
||||||
UserInputState==Enum.UserInputState.Begin and not(v~=nil)then v=w return n(u,w,s
|
local isTouchDevice = Game:GetService("UserInputService").TouchEnabled
|
||||||
)end end)u.InputChanged:connect(function(w)if j[w]or v~=w then return end return
|
local functionTable = { }
|
||||||
o(u,w,s)end)u.InputEnded:connect(function(w)if j[w]or v~=w then return end v=nil
|
local buttonVector = { }
|
||||||
j[w]=true return p(u,w,s)end)local w=a('ImageLabel','ActionIcon',{Position=UDim2
|
local buttonScreenGui
|
||||||
.new(0.175,0,0.175,0),Size=UDim2.new(0.65,0,0.65,0),BackgroundTransparency=1})if
|
local buttonFrame
|
||||||
t['image']and type(t['image'])=='string'then w.Image=t['image']end w.Parent=u
|
local ContextDownImage = "http://www.banland.xyz/asset/?id=97166756"
|
||||||
local x=a('TextLabel','ActionTitle',{Size=UDim2.new(1,0,1,0),
|
local ContextUpImage = "http://www.banland.xyz/asset/?id=97166444"
|
||||||
BackgroundTransparency=1,Font=Enum.Font.SourceSansBold,TextColor3=Color3.new(1,1
|
local oldTouches = { }
|
||||||
,1),TextStrokeTransparency=0,FontSize=Enum.FontSize.Size18,TextWrapped=true,Text
|
local buttonPositionTable = {
|
||||||
=''})if t['title']and type(t['title'])=='string'then x.Text=t['title']end x.
|
UDim2.new(0, 123, 0, 70),
|
||||||
Parent=u return u end local s s=function(t,u)local v,w=r(t,u),nil for x=1,#e do
|
UDim2.new(0, 30, 0, 60),
|
||||||
if e[x]=='empty'then w=x break end end if not w then w=#e+1 end if w>l then
|
UDim2.new(0, 180, 0, 160),
|
||||||
return end e[w]=v d[t]['button']=v v.Position=k[w]v.Parent=g if f and not(f.
|
UDim2.new(0, 85, 0, -25),
|
||||||
Parent~=nil)then f.Parent=Game.Players.LocalPlayer.PlayerGui end end local t t=
|
UDim2.new(0, 185, 0, -25),
|
||||||
function(u)if not d[u]then return end local v=d[u]['button']if v then v.Parent=
|
UDim2.new(0, 185, 0, 260),
|
||||||
nil for w=1,#e do if e[w]==v then e[w]='empty'break end end v:Destroy()end d[u]=
|
UDim2.new(0, 216, 0, 65)
|
||||||
nil end local u u=function(v,w,x)if d[v]then t(v)end d[v]={x}if w and c then m()
|
}
|
||||||
return s(v,x)end end b.BoundActionChanged:connect(function(v,w,x)if d[v]and x
|
local maxButtons = #buttonPositionTable
|
||||||
then do local y=d[v]['button']if y then if w=='image'then y.ActionIcon.Image=x[w
|
do
|
||||||
]elseif w=='title'then y.ActionTitle.Text=x[w]elseif w=='position'then y.
|
local _with_0 = Game:GetService("ContentProvider")
|
||||||
Position=x[w]end end end end end)b.BoundActionAdded:connect(function(v,w,x)
|
_with_0:Preload(ContextDownImage)
|
||||||
return u(v,w,x)end)b.BoundActionRemoved:connect(function(v,w)return t(v)end)b.
|
_with_0:Preload(ContextUpImage)
|
||||||
GetActionButtonEvent:connect(function(v)if d[v]then return b:
|
end
|
||||||
FireActionButtonFoundSignal(v,d[v]['button'])end end)local v=b:
|
while not Game.Players do
|
||||||
GetAllBoundActionInfo()for w,x in pairs(v)do u(w,x['createTouchButton'],x)end
|
wait()
|
||||||
|
end
|
||||||
|
while not Game.Players.LocalPlayer do
|
||||||
|
wait()
|
||||||
|
end
|
||||||
|
local createContextActionGui
|
||||||
|
createContextActionGui = function()
|
||||||
|
if not buttonScreenGui and isTouchDevice then
|
||||||
|
buttonScreenGui = New("ScreenGui", "ContextActionGui", {
|
||||||
|
New("Frame", "ContextButtonFrame", {
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Size = UDim2.new(0.3, 0, 0.5, 0),
|
||||||
|
Position = UDim2.new(0.7, 0, 0.5, 0)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local contextButtonDown
|
||||||
|
contextButtonDown = function(button, inputObject, actionName)
|
||||||
|
if inputObject.UserInputType == Enum.UserInputType.Touch then
|
||||||
|
button.Image = ContextDownImage
|
||||||
|
return contextActionService:CallFunction(actionName, Enum.UserInputState.Begin)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local contextButtonMoved
|
||||||
|
contextButtonMoved = function(button, inputObject, actionName)
|
||||||
|
if inputObject.UserInputType == Enum.UserInputType.Touch then
|
||||||
|
button.Image = ContextDownImage
|
||||||
|
return contextActionService:CallFunction(actionName, Enum.UserInputState.Change)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local contextButtonUp
|
||||||
|
contextButtonUp = function(button, inputObject, actionName)
|
||||||
|
button.Image = ContextUpImage
|
||||||
|
if inputObject.UserInputType == Enum.UserInputType.Touch and inputObject.UserInputState == Enum.UserInputState.End then
|
||||||
|
return contextActionService:CallFunction(actionName, Enum.UserInputState.End, inputObject)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local isSmallScreenDevice
|
||||||
|
isSmallScreenDevice = function()
|
||||||
|
return Game:GetService("GuiService"):GetScreenResolution().y <= 320
|
||||||
|
end
|
||||||
|
local createNewButton
|
||||||
|
createNewButton = function(actionName, functionInfoTable)
|
||||||
|
local contextButton = New("ImageButton", "ContextActionButton", {
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Size = UDim2.new((function()
|
||||||
|
if isSmallScreenDevice() then
|
||||||
|
return 0, 90, 0, 90
|
||||||
|
else
|
||||||
|
return 0, 70, 0, 70
|
||||||
|
end
|
||||||
|
end)()),
|
||||||
|
Active = true,
|
||||||
|
Image = ContextUpImage,
|
||||||
|
Parent = buttonFrame
|
||||||
|
})
|
||||||
|
local currentButtonTouch
|
||||||
|
Game:GetService("UserInputService").InputEnded:connect(function(inputObject)
|
||||||
|
oldTouches[inputObject] = nil
|
||||||
|
end)
|
||||||
|
contextButton.InputBegan:connect(function(inputObject)
|
||||||
|
if oldTouches[inputObject] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if inputObject.UserInputState == Enum.UserInputState.Begin and not (currentButtonTouch ~= nil) then
|
||||||
|
currentButtonTouch = inputObject
|
||||||
|
return contextButtonDown(contextButton, inputObject, actionName)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
contextButton.InputChanged:connect(function(inputObject)
|
||||||
|
if oldTouches[inputObject] or currentButtonTouch ~= inputObject then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
return contextButtonMoved(contextButton, inputObject, actionName)
|
||||||
|
end)
|
||||||
|
contextButton.InputEnded:connect(function(inputObject)
|
||||||
|
if oldTouches[inputObject] or currentButtonTouch ~= inputObject then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
currentButtonTouch = nil
|
||||||
|
oldTouches[inputObject] = true
|
||||||
|
return contextButtonUp(contextButton, inputObject, actionName)
|
||||||
|
end)
|
||||||
|
local actionIcon = New("ImageLabel", "ActionIcon", {
|
||||||
|
Position = UDim2.new(0.175, 0, 0.175, 0),
|
||||||
|
Size = UDim2.new(0.65, 0, 0.65, 0),
|
||||||
|
BackgroundTransparency = 1
|
||||||
|
})
|
||||||
|
if functionInfoTable["image"] and type(functionInfoTable["image"]) == "string" then
|
||||||
|
actionIcon.Image = functionInfoTable["image"]
|
||||||
|
end
|
||||||
|
actionIcon.Parent = contextButton
|
||||||
|
local actionTitle = New("TextLabel", "ActionTitle", {
|
||||||
|
Size = UDim2.new(1, 0, 1, 0),
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Font = Enum.Font.SourceSansBold,
|
||||||
|
TextColor3 = Color3.new(1, 1, 1),
|
||||||
|
TextStrokeTransparency = 0,
|
||||||
|
FontSize = Enum.FontSize.Size18,
|
||||||
|
TextWrapped = true,
|
||||||
|
Text = ""
|
||||||
|
})
|
||||||
|
if functionInfoTable["title"] and type(functionInfoTable["title"]) == "string" then
|
||||||
|
actionTitle.Text = functionInfoTable["title"]
|
||||||
|
end
|
||||||
|
actionTitle.Parent = contextButton
|
||||||
|
return contextButton
|
||||||
|
end
|
||||||
|
local createButton
|
||||||
|
createButton = function(actionName, functionInfoTable)
|
||||||
|
local button = createNewButton(actionName, functionInfoTable)
|
||||||
|
local position
|
||||||
|
for i = 1, #buttonVector do
|
||||||
|
if buttonVector[i] == "empty" then
|
||||||
|
position = i
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if not position then
|
||||||
|
position = #buttonVector + 1
|
||||||
|
end
|
||||||
|
if position > maxButtons then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
buttonVector[position] = button
|
||||||
|
functionTable[actionName]["button"] = button
|
||||||
|
button.Position = buttonPositionTable[position]
|
||||||
|
button.Parent = buttonFrame
|
||||||
|
if buttonScreenGui and not (buttonScreenGui.Parent ~= nil) then
|
||||||
|
buttonScreenGui.Parent = Game.Players.LocalPlayer.PlayerGui
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local removeAction
|
||||||
|
removeAction = function(actionName)
|
||||||
|
if not functionTable[actionName] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local actionButton = functionTable[actionName]["button"]
|
||||||
|
if actionButton then
|
||||||
|
actionButton.Parent = nil
|
||||||
|
for i = 1, #buttonVector do
|
||||||
|
if buttonVector[i] == actionButton then
|
||||||
|
buttonVector[i] = "empty"
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
actionButton:Destroy()
|
||||||
|
end
|
||||||
|
functionTable[actionName] = nil
|
||||||
|
end
|
||||||
|
local addAction
|
||||||
|
addAction = function(actionName, createTouchButton, functionInfoTable)
|
||||||
|
if functionTable[actionName] then
|
||||||
|
removeAction(actionName)
|
||||||
|
end
|
||||||
|
functionTable[actionName] = {
|
||||||
|
functionInfoTable
|
||||||
|
}
|
||||||
|
if createTouchButton and isTouchDevice then
|
||||||
|
createContextActionGui()
|
||||||
|
return createButton(actionName, functionInfoTable)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
contextActionService.BoundActionChanged:connect(function(actionName, changeName, changeTable)
|
||||||
|
if functionTable[actionName] and changeTable then
|
||||||
|
do
|
||||||
|
local button = functionTable[actionName]["button"]
|
||||||
|
if button then
|
||||||
|
if changeName == "image" then
|
||||||
|
button.ActionIcon.Image = changeTable[changeName]
|
||||||
|
elseif changeName == "title" then
|
||||||
|
button.ActionTitle.Text = changeTable[changeName]
|
||||||
|
elseif changeName == "position" then
|
||||||
|
button.Position = changeTable[changeName]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
contextActionService.BoundActionAdded:connect(function(actionName, createTouchButton, functionInfoTable)
|
||||||
|
return addAction(actionName, createTouchButton, functionInfoTable)
|
||||||
|
end)
|
||||||
|
contextActionService.BoundActionRemoved:connect(function(actionName, _)
|
||||||
|
return removeAction(actionName)
|
||||||
|
end)
|
||||||
|
contextActionService.GetActionButtonEvent:connect(function(actionName)
|
||||||
|
if functionTable[actionName] then
|
||||||
|
return contextActionService:FireActionButtonFoundSignal(actionName, functionTable[actionName]["button"])
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
local boundActions = contextActionService:GetAllBoundActionInfo()
|
||||||
|
for actionName, actionData in pairs(boundActions) do
|
||||||
|
addAction(actionName, actionData["createTouchButton"], actionData)
|
||||||
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,104 +1,526 @@
|
||||||
local a a=function(b,c,d)if not(d~=nil)then d=c c=nil end local e=Instance.new(b
|
local New
|
||||||
)if c then e.Name=c end local f for g,h in pairs(d)do if type(g)=='string'then
|
New = function(className, name, props)
|
||||||
if g=='Parent'then f=h else e[g]=h end elseif type(g)=='number'and type(h)==
|
if not (props ~= nil) then
|
||||||
'userdata'then h.Parent=e end end e.Parent=f return e end while not Game do
|
props = name
|
||||||
wait()end while not Game:FindFirstChild'Players'do wait()end while not Game.
|
name = nil
|
||||||
Players.LocalPlayer do wait()end while not Game:FindFirstChild'CoreGui'do wait()
|
end
|
||||||
end while not Game.CoreGui:FindFirstChild'RobloxGui'do wait()end local b=Game:
|
local obj = Instance.new(className)
|
||||||
GetService'UserInputService'local c=pcall(function()return b:IsLuaTouchControls(
|
if name then
|
||||||
)end)if not c then script:Destroy()end local d,e=Game:GetService'GuiService':
|
obj.Name = name
|
||||||
GetScreenResolution(),nil e=function()return d.y<=320 end local f,g=Game.Players
|
end
|
||||||
.LocalPlayer,120 if e()then g=70 end local h,i,j,k,l=
|
local parent
|
||||||
'rbxasset://textures/ui/TouchControlsSheet.png',5,0.92,{},90 if e()then l=70 end
|
for k, v in pairs(props) do
|
||||||
local m,n,o={},nil,0.007 local p,q,r,s=o*16,0.03,0.2,nil Game:GetService
|
if type(k) == "string" then
|
||||||
'ContentProvider':Preload(h)local t t=function(u,v)local w,x=v.x-u.x,v.y-u.y
|
if k == "Parent" then
|
||||||
return math.sqrt(w*w+x*x)end local u u=function(v,w)return UDim2.new(0,v.x-w.
|
parent = v
|
||||||
AbsoluteSize.x/2,0,v.y-w.AbsoluteSize.y/2)end local v v=function(w,x,y)local z,A
|
else
|
||||||
,B=math.sin(y),math.cos(y),w B=Vector2.new(B.x-x.x,B.y-x.y)local C,D=B.x*A-B.y*z
|
obj[k] = v
|
||||||
,B.x*z+B.y*A B=Vector2.new(C+x.x,D+x.y)return B end local w w=function(x,y)
|
end
|
||||||
return x.x*y.x+x.y*y.y end local x x=function(y,z,A)local B=Vector2.new(z.
|
elseif type(k) == "number" and type(v) == "userdata" then
|
||||||
Position.X.Offset+z.AbsoluteSize.x/2,z.Position.Y.Offset+z.AbsoluteSize.y/2)
|
v.Parent = obj
|
||||||
local C=t(A,B)if C>(g/2)then local D=Vector2.new(A.x-B.x,A.y-B.y)local E=D.unit
|
end
|
||||||
if E.x==math.nan or E.x==math.inf then E=Vector2.new(0,E.y)end if E.y==math.nan
|
end
|
||||||
or E.y==math.inf then E=Vector2.new(E.x,0)end local F=B+(E*(g/2))y.Position=u(F,
|
obj.Parent = parent
|
||||||
y)else y.Position=u(A,y)end return Vector2.new(y.Position.X.Offset-z.Position.X.
|
return obj
|
||||||
Offset,y.Position.Y.Offset-z.Position.Y.Offset)end local y y=function(z,A,B)
|
end
|
||||||
local C=Vector2.new(A.Position.X.Offset+A.AbsoluteSize.x/2,A.Position.Y.Offset+A
|
while not Game do
|
||||||
.AbsoluteSize.y/2)if t(B,C)>g/2 then local D=Vector2.new(z.Position.X.Offset+z.
|
wait()
|
||||||
AbsoluteSize.x/2,z.Position.Y.Offset+z.AbsoluteSize.y/2)local E,F=Vector2.new(B.
|
end
|
||||||
x-D.x,B.y-D.y).unit,Vector2.new(D.x-C.x,D.y-C.y)local G,H=F.unit,Vector2.new(B.x
|
while not Game:FindFirstChild("Players") do
|
||||||
-D.x,B.y-D.y)local I=(G.x*E.y)-(G.y*E.x)local J=math.atan2(I,w(G,E))local K=J*
|
wait()
|
||||||
math.min(H.magnitude/F.magnitude,1)if math.abs(K)>0.00001 then local L=v(C,D,K)A
|
end
|
||||||
.Position=u(Vector2.new(L.x,L.y),A)end A.Position=UDim2.new(0,A.Position.X.
|
while not Game.Players.LocalPlayer do
|
||||||
Offset+H.x,0,A.Position.Y.Offset+H.y)end z.Position=u(B,z)local D,E=Vector2.new(
|
wait()
|
||||||
z.Position.X.Offset,z.Position.Y.Offset),Vector2.new(A.Position.X.Offset,A.
|
end
|
||||||
Position.Y.Offset)if t(D,E)>g/2 then local F=(E-D).unit*g/2 A.Position=UDim2.
|
while not Game:FindFirstChild("CoreGui") do
|
||||||
new(0,D.x+F.x,0,D.y+F.y)end return Vector2.new(z.Position.X.Offset-A.Position.X.
|
wait()
|
||||||
Offset,z.Position.Y.Offset-A.Position.Y.Offset)end local z z=function(A)return(
|
end
|
||||||
math.abs(A.x)>i)or(math.abs(A.y)>i)end local A A=function(B,C,D)local E=a(
|
while not Game.CoreGui:FindFirstChild("RobloxGui") do
|
||||||
'Frame','ThumbstickFrame',{Active=true,Size=UDim2.new(0,g,0,g),Position=B,
|
wait()
|
||||||
BackgroundTransparency=1})a('ImageLabel','InnerThumbstick',{Image=h,
|
end
|
||||||
ImageRectOffset=Vector2.new(220,0),ImageRectSize=Vector2.new(111,111),
|
local userInputService = Game:GetService("UserInputService")
|
||||||
BackgroundTransparency=1,Size=UDim2.new(0,g/2,0,g/2),Position=UDim2.new(0,E.Size
|
local success = pcall(function()
|
||||||
.X.Offset/2-g/4,0,E.Size.Y.Offset/2-g/4),ZIndex=2,Parent=E})local F,G,H,I,J=a(
|
return userInputService:IsLuaTouchControls()
|
||||||
'ImageLabel','OuterThumbstick',{Image=h,ImageRectOffset=Vector2.new(0,0),
|
end)
|
||||||
ImageRectSize=Vector2.new(220,220),BackgroundTransparency=1,Size=UDim2.new(0,g,0
|
if not success then
|
||||||
,g),Position=B,Parent=Game.CoreGui.RobloxGui}),nil,nil,nil,nil J=function(K)if G
|
script:Destroy()
|
||||||
then return end if K==s then return end if K==n then return end if K.
|
end
|
||||||
UserInputType~=Enum.UserInputType.Touch then return end G=K table.insert(k,G)E.
|
local screenResolution = Game:GetService("GuiService"):GetScreenResolution()
|
||||||
Position=u(G.Position,E)F.Position=E.Position H=b.TouchMoved:connect(function(L)
|
local isSmallScreenDevice
|
||||||
if L==G then local M if D then M=x(E,F,Vector2.new(L.Position.x,L.Position.y))
|
isSmallScreenDevice = function()
|
||||||
else M=y(E,F,Vector2.new(L.Position.x,L.Position.y))end if C then return C(M,F.
|
return screenResolution.y <= 320
|
||||||
Size.X.Offset/2)end end end)I=b.TouchEnded:connect(function(L)if L==G then if C
|
end
|
||||||
then C(Vector2.new(0,0),1)end I:disconnect()H:disconnect()E.Position=B F.
|
local localPlayer = Game.Players.LocalPlayer
|
||||||
Position=B for M,N in pairs(k)do if N==G then table.remove(k,M)break end end G=
|
local thumbstickSize = 120
|
||||||
nil end end)end b.Changed:connect(function(K)if K=='ModalEnabled'then do local L
|
if isSmallScreenDevice() then
|
||||||
=not b.ModalEnabled E.Visible=L F.Visible=L end end end)E.InputBegan:connect(J)
|
thumbstickSize = 70
|
||||||
return E end local B B=function(C)local D,E,F,G=nil,nil,f.MoveCharacter,nil G=
|
end
|
||||||
function(H,I)if f then if z(H)then D=H E=I if H.magnitude/I>j then I=H.magnitude
|
local touchControlsSheet = "rbxasset://textures/ui/TouchControlsSheet.png"
|
||||||
-1 end return F(f,H,I)else D=Vector2.new(0,0)E=1 return F(f,D,E)end end end
|
local ThumbstickDeadZone = 5
|
||||||
local H=UDim2.new(0,g/2,1,-g*1.75)if e()then H=UDim2.new(0,(g/2)-10,1,-g-20)end
|
local ThumbstickMaxPercentGive = 0.92
|
||||||
local I=A(H,G,false)I.Name='CharacterThumbstick'I.Parent=C local J J=function()
|
local thumbstickTouches = { }
|
||||||
if f and F and D and E then return F(f,D,E)end end return J end local C C=
|
local jumpButtonSize = 90
|
||||||
function(D)local E,F,G=a('ImageButton','JumpButton',{BackgroundTransparency=1,
|
if isSmallScreenDevice() then
|
||||||
Image=h,ImageRectOffset=Vector2.new(176,222),ImageRectSize=Vector2.new(174,174),
|
jumpButtonSize = 70
|
||||||
Size=UDim2.new(0,l,0,l),Position=UDim2.new(1,(function()if e()then return-(l*
|
end
|
||||||
2.25),1,-l-20 else return-(l*2.75),1,-l-120 end end)())}),f.JumpCharacter,nil G=
|
local oldJumpTouches = { }
|
||||||
function()while n do if f then F(f)end wait(1.6666666666666665E-2)end end E.
|
local currentJumpTouch
|
||||||
InputBegan:connect(function(H)if H.UserInputType~=Enum.UserInputType.Touch then
|
local CameraRotateSensitivity = 0.007
|
||||||
return end if n then return end if H==s then return end for I,J in pairs(m)do if
|
local CameraRotateDeadZone = CameraRotateSensitivity * 16
|
||||||
J==H then return end end n=H E.ImageRectOffset=Vector2.new(0,222)E.ImageRectSize
|
local CameraZoomSensitivity = 0.03
|
||||||
=Vector2.new(174,174)return G()end)E.InputEnded:connect(function(H)if H.
|
local PinchZoomDelay = 0.2
|
||||||
UserInputType~=Enum.UserInputType.Touch then return end E.ImageRectOffset=
|
local cameraTouch
|
||||||
Vector2.new(176,222)E.ImageRectSize=Vector2.new(174,174)if H==n then table.
|
Game:GetService("ContentProvider"):Preload(touchControlsSheet)
|
||||||
insert(m,n)n=nil end end)b.InputEnded:connect(function(H)for I,J in pairs(m)do
|
local DistanceBetweenTwoPoints
|
||||||
if J==H then table.remove(m,I)break end end end)b.Changed:connect(function(H)if
|
DistanceBetweenTwoPoints = function(point1, point2)
|
||||||
H=='ModalEnabled'then E.Visible=not b.ModalEnabled end end)E.Parent=D end local
|
local dx = point2.x - point1.x
|
||||||
D D=function(E)if E==n then return true end for F,G in pairs(m)do if E==G then
|
local dy = point2.y - point1.y
|
||||||
return true end end return false end local E E=function(F)for G,H in pairs(k)do
|
return math.sqrt(dx * dx + dy * dy)
|
||||||
if F==H then return true end end return false end local F F=function(G,H)local I
|
end
|
||||||
,J,K,L,M,N,O,P,Q,R=nil,false,b.RotateCamera,-1,false,nil,b.ZoomCamera,{},nil,nil
|
local transformFromCenterToTopLeft
|
||||||
R=function()s=nil J=false I=nil end local S S=function()P={}N=nil M=false Q:
|
transformFromCenterToTopLeft = function(pointToTranslate, guiObject)
|
||||||
Destroy()Q=nil end local T T=function(U,V)if Q~=nil then Q:Destroy()end Q=a(
|
return UDim2.new(0, pointToTranslate.x - guiObject.AbsoluteSize.x / 2, 0, pointToTranslate.y - guiObject.AbsoluteSize.y / 2)
|
||||||
'Frame',{Name='PinchFrame',BackgroundTransparency=1,Size=UDim2.new(1,0,1,0),
|
end
|
||||||
Parent=G})Q.InputChanged:connect(function(W)if not M then S()return end R()if
|
local rotatePointAboutLocation
|
||||||
not(N~=nil)then if W==U then N=(W.Position-V.Position).magnitude U=W elseif W==V
|
rotatePointAboutLocation = function(pointToRotate, pointToRotateAbout, radians)
|
||||||
then N=(W.Position-U.Position).magnitude V=W end else local X=0 if W==U then X=(
|
local sinAnglePercent = math.sin(radians)
|
||||||
W.Position-V.Position).magnitude U=W elseif W==V then X=(W.Position-U.Position).
|
local cosAnglePercent = math.cos(radians)
|
||||||
magnitude V=W end if X~=0 then local Y=X-N if Y~=0 then O(b,(Y*q))end N=X end
|
local transformedPoint = pointToRotate
|
||||||
end end)return Q.InputEnded:connect(function(W)if W==U or W==V then return S()
|
transformedPoint = Vector2.new(transformedPoint.x - pointToRotateAbout.x, transformedPoint.y - pointToRotateAbout.y)
|
||||||
end end)end local U U=function(V)if#P<1 then table.insert(P,V)L=tick()M=false
|
local xNew = transformedPoint.x * cosAnglePercent - transformedPoint.y * sinAnglePercent
|
||||||
elseif#P==1 then M=((tick()-L)<=r)if M then table.insert(P,V)return T(P[1],P[2])
|
local yNew = transformedPoint.x * sinAnglePercent + transformedPoint.y * cosAnglePercent
|
||||||
else P={}end end end G.InputBegan:connect(function(V)if V.UserInputType~=Enum.
|
transformedPoint = Vector2.new(xNew + pointToRotateAbout.x, yNew + pointToRotateAbout.y)
|
||||||
UserInputType.Touch then return end if D(V)then return end local W=E(V)if not W
|
return transformedPoint
|
||||||
then U(V)end if not(s~=nil)and not W then s=V I=Vector2.new(s.Position.x,s.
|
end
|
||||||
Position.y)end end)b.InputChanged:connect(function(V)if V.UserInputType~=Enum.
|
local dotProduct
|
||||||
UserInputType.Touch then return end if s~=V then return end local W=Vector2.new(
|
dotProduct = function(v1, v2)
|
||||||
s.Position.x,s.Position.y)local X=(I-W)*o if not J and(X.magnitude>p)then J=true
|
return v1.x * v2.x + v1.y * v2.y
|
||||||
I=W end if J and(I~=W)then K(b,X)H()I=W end end)return b.InputEnded:connect(
|
end
|
||||||
function(V)if s==V or not(s~=nil)then R()end for W,X in pairs(P)do if X==V then
|
local stationaryThumbstickTouchMove
|
||||||
table.remove(P,W)end end end)end local G G=function()local H=a('Frame',
|
stationaryThumbstickTouchMove = function(thumbstickFrame, thumbstickOuter, touchLocation)
|
||||||
'TouchControlFrame',{Size=UDim2.new(1,0,1,0),BackgroundTransparency=1,Parent=
|
local thumbstickOuterCenterPosition = Vector2.new(thumbstickOuter.Position.X.Offset + thumbstickOuter.AbsoluteSize.x / 2, thumbstickOuter.Position.Y.Offset + thumbstickOuter.AbsoluteSize.y / 2)
|
||||||
Game.CoreGui.RobloxGui})local I=B(H)C(H)F(H,I)return b.ProcessedEvent:connect(
|
local centerDiff = DistanceBetweenTwoPoints(touchLocation, thumbstickOuterCenterPosition)
|
||||||
function(J,K)if not K then return end if J==s and J.UserInputState==Enum.
|
if centerDiff > (thumbstickSize / 2) then
|
||||||
UserInputState.Begin then s=nil end end)end return G()
|
local thumbVector = Vector2.new(touchLocation.x - thumbstickOuterCenterPosition.x, touchLocation.y - thumbstickOuterCenterPosition.y)
|
||||||
|
local normal = thumbVector.unit
|
||||||
|
if normal.x == math.nan or normal.x == math.inf then
|
||||||
|
normal = Vector2.new(0, normal.y)
|
||||||
|
end
|
||||||
|
if normal.y == math.nan or normal.y == math.inf then
|
||||||
|
normal = Vector2.new(normal.x, 0)
|
||||||
|
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
|
|
@ -1,27 +1,126 @@
|
||||||
local a=script.Parent:FindFirstChild'ControlFrame'if not a then return end local
|
local controlFrame = script.Parent:FindFirstChild("ControlFrame")
|
||||||
b b=function(c,d,e)if not(e~=nil)then e=d d=nil end local f=Instance.new(c)if d
|
if not controlFrame then
|
||||||
then f.Name=d end local g for h,i in pairs(e)do if type(h)=='string'then if h==
|
return
|
||||||
'Parent'then g=i else f[h]=i end elseif type(h)=='number'and type(i)=='userdata'
|
end
|
||||||
then i.Parent=f end end f.Parent=g return f end local c,d,e,f=a:FindFirstChild
|
local New
|
||||||
'BottomLeftControl',a:FindFirstChild'BottomRightControl',b('TextLabel','ToolTip'
|
New = function(className, name, props)
|
||||||
,{Text='',Font=Enum.Font.ArialBold,FontSize=Enum.FontSize.Size12,TextColor3=
|
if not (props ~= nil) then
|
||||||
Color3.new(1,1,1),BorderSizePixel=0,ZIndex=10,Size=UDim2.new(2,0,1,0),Position=
|
props = name
|
||||||
UDim2.new(1,0,0,0),BackgroundColor3=Color3.new(0,0,0),BackgroundTransparency=1,
|
name = nil
|
||||||
TextTransparency=1,TextWrap=true,b('BoolValue','inside',{Value=false})}),nil f=
|
end
|
||||||
function(g)local h=0.1 g.Parent.MouseEnter:connect(function()if g:FindFirstChild
|
local obj = Instance.new(className)
|
||||||
'inside'then g.inside.Value=true wait(1.2)if g.inside.Value then while g.inside.
|
if name then
|
||||||
Value and g.BackgroundTransparency>0 do g.BackgroundTransparency=g.
|
obj.Name = name
|
||||||
BackgroundTransparency-h g.TextTransparency=g.TextTransparency-h wait()end end
|
end
|
||||||
end end)local i i=function(j)j.inside.Value=false j.BackgroundTransparency=1 j.
|
local parent
|
||||||
TextTransparency=1 end g.Parent.MouseLeave:connect(function()return i(g)end)
|
for k, v in pairs(props) do
|
||||||
return g.Parent.MouseButton1Click:connect(function()return i(g)end)end local g g
|
if type(k) == "string" then
|
||||||
=function(h)if not(h~=nil)then h=c:FindFirstChild'SettingsButton'end local i=e:
|
if k == "Parent" then
|
||||||
clone()i.RobloxLocked=true i.Text='Settings/Leave Game'i.Position=UDim2.new(0,0,
|
parent = v
|
||||||
0,-18)i.Size=UDim2.new(0,120,0,20)i.Parent=h f(i)return i end wait(5)local h=c:
|
else
|
||||||
GetChildren()for i=1,#h do if h[i].Name=='Exit'then do local j=e:clone()j.
|
obj[k] = v
|
||||||
RobloxLocked=true j.Text='Leave Place'j.Position=UDim2.new(0,0,-1,0)j.Size=UDim2
|
end
|
||||||
.new(1,0,1,0)j.Parent=h[i]f(j)end elseif h[i].Name=='SettingsButton'then g(h[i])
|
elseif type(k) == "number" and type(v) == "userdata" then
|
||||||
end end local i=d:GetChildren()for j=1,#i do if(i[j].Name:find'Camera'~=nil)then
|
v.Parent = obj
|
||||||
do local k=e:clone()k.RobloxLocked=true k.Text='Camera View'if i[j].Name:find
|
end
|
||||||
'Zoom'then k.Position=UDim2.new(-1,0,-1.5)else k.Position=UDim2.new(0,0,-1.5,0)
|
end
|
||||||
end k.Size=UDim2.new(2,0,1.25,0)k.Parent=i[j]f(k)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
|
||||||
|
|
|
||||||
|
|
@ -1,33 +1,68 @@
|
||||||
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 c c=function(d,e)
|
pcall(function()
|
||||||
while not d:FindFirstChild(e)do d.ChildAdded:wait()end end a=game:GetService
|
touchEnabled = game:GetService("UserInputService").TouchEnabled
|
||||||
'ScriptContext'a:AddCoreScript(59002209,a,'CoreScripts/Sections')c(game:
|
end)
|
||||||
GetService'CoreGui','RobloxGui')local d=game:GetService'CoreGui':FindFirstChild
|
scriptContext:AddCoreScript(60595695, scriptContext, "/Libraries/LibraryRegistration/LibraryRegistration")
|
||||||
'RobloxGui'if not b then a:AddCoreScript(36868950,d,'CoreScripts/ToolTip')a:
|
local waitForChild
|
||||||
AddCoreScript(46295863,d,'CoreScripts/Settings')else a:AddCoreScript(153556783,d
|
waitForChild = function(instance, name)
|
||||||
,'CoreScripts/TouchControls')end a:AddCoreScript(39250920,d,
|
while not instance:FindFirstChild(name) do
|
||||||
'CoreScripts/MainBotChatScript')a:AddCoreScript(48488451,d,
|
instance.ChildAdded:wait()
|
||||||
'CoreScripts/PopupScript')a:AddCoreScript(48488398,d,
|
end
|
||||||
'CoreScripts/NotificationScript')a:AddCoreScript(97188756,d,
|
end
|
||||||
'CoreScripts/ChatScript')a:AddCoreScript(107893730,d,
|
scriptContext = game:GetService("ScriptContext")
|
||||||
'CoreScripts/PurchasePromptScript')if not b or d.AbsoluteSize.Y>600 then a:
|
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 return a: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 a:AddCoreScript(53878047,d,
|
scriptContext:AddCoreScript(36868950, screenGui, "CoreScripts/ToolTip")
|
||||||
'CoreScripts/BackpackScripts/BackpackBuilder')c(d,'CurrentLoadout')c(d,
|
scriptContext:AddCoreScript(46295863, screenGui, "CoreScripts/Settings")
|
||||||
'Backpack')local e=d.Backpack if game.CoreGui.Version>=7 then a:AddCoreScript(
|
else
|
||||||
89449093,e,'CoreScripts/BackpackScripts/BackpackManager')end a:AddCoreScript(
|
scriptContext:AddCoreScript(153556783, screenGui, "CoreScripts/TouchControls")
|
||||||
89449008,e,'CoreScripts/BackpackScripts/BackpackGear')a:AddCoreScript(53878057,d
|
end
|
||||||
.CurrentLoadout,'CoreScripts/BackpackScripts/LoadoutScript')if game.CoreGui.
|
scriptContext:AddCoreScript(39250920, screenGui, "CoreScripts/MainBotChatScript")
|
||||||
Version>=8 then a:AddCoreScript(-1,e,
|
scriptContext:AddCoreScript(48488451, screenGui, "CoreScripts/PopupScript")
|
||||||
'CoreScripts/BackpackScripts/BackpackWardrobe')end end local e=not not game.
|
scriptContext:AddCoreScript(48488398, screenGui, "CoreScripts/NotificationScript")
|
||||||
Workspace:FindFirstChild'PSVariable'if e then a:AddCoreScript(64164692,game.
|
scriptContext:AddCoreScript(97188756, screenGui, "CoreScripts/ChatScript")
|
||||||
Players.LocalPlayer,'BuildToolManager')end game.Workspace.ChildAdded:connect(
|
scriptContext:AddCoreScript(107893730, screenGui, "CoreScripts/PurchasePromptScript")
|
||||||
function(f)if f.Name=='PSVariable'and f:IsA'BoolValue'then e=true return a:
|
if not touchEnabled or screenGui.AbsoluteSize.Y > 600 then
|
||||||
AddCoreScript(64164692,game.Players.LocalPlayer,'BuildToolManager')end end)if b
|
scriptContext:AddCoreScript(48488235, screenGui, "CoreScripts/PlayerListScript")
|
||||||
then a:AddCoreScript(152908679,d,'CoreScripts/ContextActionTouch')c(d,
|
else
|
||||||
'ControlFrame')c(d.ControlFrame,'BottomLeftControl')d.ControlFrame.
|
delay(5, function()
|
||||||
BottomLeftControl.Visible=false c(d.ControlFrame,'TopLeftControl')d.ControlFrame
|
if screenGui.AbsoluteSize.Y >= 600 then
|
||||||
.TopLeftControl.Visible=false end
|
return scriptContext:AddCoreScript(48488235, screenGui, "CoreScripts/PlayerListScript")
|
||||||
|
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
|
||||||
|
|
|
||||||
|
|
@ -1,49 +1,230 @@
|
||||||
local a a=function(b,c,d)if not(d~=nil)then d=c c=nil end local e=Instance.new(b
|
local New
|
||||||
)if c then e.Name=c end local f for g,h in pairs(d)do if type(g)=='string'then
|
New = function(className, name, props)
|
||||||
if g=='Parent'then f=h else e[g]=h end elseif type(g)=='number'and type(h)==
|
if not (props ~= nil) then
|
||||||
'userdata'then h.Parent=e end end e.Parent=f return e end local b,c,d=5,5,nil d=
|
props = name
|
||||||
function(e,f)local g=e:findFirstChild(f)if g then return g end while true do g=e
|
name = nil
|
||||||
.ChildAdded:wait()if g.Name==f then return g end end end local e=script.Parent
|
end
|
||||||
local f,g,h,i=d(e,'Humanoid'),d(e,'Torso'),e:FindFirstChild'PlayerStats',
|
local obj = Instance.new(className)
|
||||||
Instance.new'BoolValue'i.Name='InCharTag'local j=Instance.new'BoolValue'j.Name=
|
if name then
|
||||||
'RobloxBuildTool'if not(h~=nil)then h=a('Configuration','PlayerStats',{Parent=e}
|
obj.Name = name
|
||||||
)end local k=h:FindFirstChild'MaxHealth'if not(k~=nil)then k=a('NumberValue',
|
end
|
||||||
'MaxHealth',{Value=100,Parent=h})end f.MaxHealth=k.Value f.Health=k.Value local
|
local parent
|
||||||
l l=function()f.MaxHealth=k.Value f.Health=k.Value end k.Changed:connect(l)local
|
for k, v in pairs(props) do
|
||||||
m=game.Players:GetPlayerFromCharacter(script.Parent)local n=m.PlayerGui:
|
if type(k) == "string" then
|
||||||
FindFirstChild'DamageOverTimeGui'if not(n~=nil)then n=a('BillboardGui',
|
if k == "Parent" then
|
||||||
'DamageOverTimeGui',{Parent=m.PlayerGui,Adornee=script.Parent:FindFirstChild
|
parent = v
|
||||||
'Head',Active=true,size=UDim2.new(b,0,c,0),StudsOffset=Vector3.new(0,2,0)})end
|
else
|
||||||
print'newHealth declarations finished'local o o=function(p)local q=a('TextLabel'
|
obj[k] = v
|
||||||
,{Text=tostring(p),TextColor3=(function()if p>0 then return Color3.new(0,1,0)
|
end
|
||||||
else return Color3.new(1,0,1)end end)(),size=UDim2.new(1,0,1,0),Active=true,
|
elseif type(k) == "number" and type(v) == "userdata" then
|
||||||
FontSize=6,BackgroundTransparency=1,Parent=n})for r=1,10 do wait(0.1)q.
|
v.Parent = obj
|
||||||
TextTransparency=r/10 q.Position=UDim2.new(0,0,0,-r*5)q.FontSize=6-r*0.6 end
|
end
|
||||||
return q:remove()end local p p=function()if k.Value>=0 then f.MaxHealth=k.Value
|
end
|
||||||
print(f.MaxHealth)if f.Health>f.MaxHealth then f.Health=f.MaxHealth end end end
|
obj.Parent = parent
|
||||||
k.Changed:connect(p)local q=a('Fire','FireEffect',{Heat=0.1,Size=3,Enabled=false
|
return obj
|
||||||
})while true do local r,s=wait(1),f.Health if s>0 then local t=0 if h then local
|
end
|
||||||
u,v,w,x,y=h:FindFirstChild'Regen',h:FindFirstChild'Poison',h:FindFirstChild'Ice'
|
local damageGuiWidth = 5.0
|
||||||
,h:FindFirstChild'Fire',h:FindFirstChild'Stun'if u then t=t+u.Value.X if u.Value
|
local damageGuiHeight = 5.0
|
||||||
.Y>=0 then u.Value=Vector3.new(u.Value.X+u.Value.Z,u.Value.Y-r,u.Value.Z)elseif
|
local waitForChild
|
||||||
u.Value.Y==-1 then u.Value=Vector3.new(u.Value.X+u.Value.Z,-1,u.Value.Z)else u:
|
waitForChild = function(parent, childName)
|
||||||
remove()end end if v then t=t-v.Value.X if v.Value.Y>=0 then v.Value=Vector3.
|
local child = parent:findFirstChild(childName)
|
||||||
new(v.Value.X+v.Value.Z,v.Value.Y-r,v.Value.Z)elseif v.Value.Y==-1 then v.Value=
|
if child then
|
||||||
Vector3.new(v.Value.X+v.Value.Z,-1,v.Value.Z)else v:remove()end end if w then t=
|
return child
|
||||||
t-w.Value.X if w.Value.Y>=0 then w.Value=Vector3.new(w.Value.X,w.Value.Y-r,w.
|
end
|
||||||
Value.Z)else w:remove()end end if x then q.Enabled=true q.Parent=e.Torso t=t-x.
|
while true do
|
||||||
Value.X if x.Value.Y>=0 then x.Value=Vector3.new(x.Value.X,x.Value.Y-r,x.Value.Z
|
child = parent.ChildAdded:wait()
|
||||||
)else x:remove()q.Enabled=false q.Parent=nil end end if y then local z if y.
|
if child.Name == childName then
|
||||||
Value>0 then g.Anchored=true local A=script.Parent:GetChildren()z=game.Players:
|
return child
|
||||||
GetPlayerFromCharacter(script.Parent).Backpack:GetChildren()for B=1,#A do if A[B
|
end
|
||||||
].className=='Tool'then i:Clone().Parent=A[B]print(z)table.insert(z,A[B])end end
|
end
|
||||||
for B=1,#z do if not(z[B]:FindFirstChild'RobloxBuildTool'~=nil)then j:Clone().
|
end
|
||||||
Parent=z[B]z[B].Parent=game.Lighting end end wait(0.2)for B=1,#z do z[B].Parent=
|
local Figure = script.Parent
|
||||||
game.Players:GetPlayerFromCharacter(script.Parent).Backpack end y.Value=y.Value-
|
local Humanoid = waitForChild(Figure, "Humanoid")
|
||||||
r else g.Anchored=false for A=1,#z do local B=z[A]:FindFirstChild
|
local Torso = waitForChild(Figure, "Torso")
|
||||||
'RobloxBuildTool'if B then B:Remove()end z[A].Parent=game.Lighting end wait(0.2)
|
local config = Figure:FindFirstChild("PlayerStats")
|
||||||
for A=1,#z do local B=z[A]:FindFirstChild'InCharTag'if B then B:Remove()z[A].
|
local inCharTag = Instance.new("BoolValue")
|
||||||
Parent=script.Parent else z[A].Parent=game.Players:GetPlayerFromCharacter(script
|
inCharTag.Name = "InCharTag"
|
||||||
.Parent).Backpack end end y:Remove()end end if t~=0 then coroutine.resume(
|
local hider = Instance.new("BoolValue")
|
||||||
coroutine.create(o),t)end end s=f.Health+t*r if s*1.01<f.MaxHealth then f.Health
|
hider.Name = "RobloxBuildTool"
|
||||||
=s elseif t>0 then f.Health=f.MaxHealth end end end
|
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
|
||||||
|
|
|
||||||
|
|
@ -1,131 +1,541 @@
|
||||||
local a a=function(b,c,d)if not(d~=nil)then d=c c=nil end local e=Instance.new(b
|
local New
|
||||||
)if c then e.Name=c end local f for g,h in pairs(d)do if type(g)=='string'then
|
New = function(className, name, props)
|
||||||
if g=='Parent'then f=h else e[g]=h end elseif type(g)=='number'and type(h)==
|
if not (props ~= nil) then
|
||||||
'userdata'then h.Parent=e end end e.Parent=f return e end local b b=function(c,d
|
props = name
|
||||||
)while not c[d]do c.Changed:wait()end end local c c=function(d,e)while not d:
|
name = nil
|
||||||
FindFirstChild(e)do d.ChildAdded:wait()end end local d,e,f,g,h,i,j,k,l,m,n,o,p,q
|
end
|
||||||
,r,s,t,u,v,w,x=nil,{},nil,{},nil,nil,nil,'You are too far away to chat!',300,
|
local obj = Instance.new(className)
|
||||||
'Chat ended because you walked away',350,"Chat ended because you didn't reply",
|
if name then
|
||||||
350,nil,nil,nil,nil,nil,{},{},nil c(game,'CoreGui')c(game.CoreGui,'RobloxGui')if
|
obj.Name = name
|
||||||
game.CoreGui.RobloxGui:FindFirstChild'ControlFrame'then x=game.CoreGui.RobloxGui
|
end
|
||||||
.ControlFrame else x=game.CoreGui.RobloxGui end local y y=function()if h then
|
local parent
|
||||||
return h.Tone else return Enum.DialogTone.Neutral end end local z z=function()r=
|
for k, v in pairs(props) do
|
||||||
a('BillboardGui','ChatNotificationGui',{ExtentsOffset=Vector3.new(0,1,0),Size=
|
if type(k) == "string" then
|
||||||
UDim2.new(4,0,5.42857122,0),SizeOffset=Vector2.new(0,0),StudsOffset=Vector3.new(
|
if k == "Parent" then
|
||||||
0.4,4.3,0),Enabled=true,RobloxLocked=true,Active=true,a('ImageLabel','Image',{
|
parent = v
|
||||||
Active=false,BackgroundTransparency=1,Position=UDim2.new(0,0,0,0),Size=UDim2.
|
else
|
||||||
new(1,0,1,0),Image='',RobloxLocked=true,a('ImageButton','Button',{
|
obj[k] = v
|
||||||
AutoButtonColor=false,Position=UDim2.new(0.088,0,0.053,0),Size=UDim2.new(0.83,0,
|
end
|
||||||
0.46,0),Image='',BackgroundTransparency=1,RobloxLocked=true})})})end local A A=
|
elseif type(k) == "number" and type(v) == "userdata" then
|
||||||
function(B)if B==Enum.DialogTone.Neutral then return Enum.ChatColor.Blue elseif
|
v.Parent = obj
|
||||||
B==Enum.DialogTone.Friendly then return Enum.ChatColor.Green elseif B==Enum.
|
end
|
||||||
DialogTone.Enemy then return Enum.ChatColor.Red end end local B B=function(C,D)
|
end
|
||||||
if D==Enum.DialogTone.Neutral then C.BackgroundColor3=Color3.new(0,0,
|
obj.Parent = parent
|
||||||
0.7019607843137254)C.Number.TextColor3=Color3.new(0.17647058823529413,
|
return obj
|
||||||
0.5568627450980392,0.9607843137254902)elseif D==Enum.DialogTone.Friendly then C.
|
end
|
||||||
BackgroundColor3=Color3.new(0,0.30196078431372547,0)C.Number.TextColor3=Color3.
|
local waitForProperty
|
||||||
new(0,0.7450980392156863,0)elseif D==Enum.DialogTone.Enemy then C.
|
waitForProperty = function(instance, name)
|
||||||
BackgroundColor3=Color3.new(0.5490196078431373,0,0)C.Number.TextColor3=Color3.
|
while not instance[name] do
|
||||||
new(1,0.34509803921568627,0.30980392156862746)end end local C C=function(D)for E
|
instance.Changed:wait()
|
||||||
,F in pairs(e)do B(F,D)end return B(f,D)end local D D=function(E)if E==Enum.
|
end
|
||||||
DialogTone.Neutral then d.Style=Enum.FrameStyle.ChatBlue d.Tail.Image=
|
end
|
||||||
'rbxasset://textures/chatBubble_botBlue_tailRight.png'elseif E==Enum.DialogTone.
|
local waitForChild
|
||||||
Friendly then d.Style=Enum.FrameStyle.ChatGreen d.Tail.Image=
|
waitForChild = function(instance, name)
|
||||||
'rbxasset://textures/chatBubble_botGreen_tailRight.png'elseif E==Enum.DialogTone
|
while not instance:FindFirstChild(name) do
|
||||||
.Enemy then d.Style=Enum.FrameStyle.ChatRed d.Tail.Image=
|
instance.ChildAdded:wait()
|
||||||
'rbxasset://textures/chatBubble_botRed_tailRight.png'end return C(E)end local E
|
end
|
||||||
E=function(F,G,H)if H==Enum.DialogTone.Neutral then F.Image.Image=
|
end
|
||||||
'rbxasset://textures/chatBubble_botBlue_notify_bkg.png'elseif H==Enum.DialogTone
|
local mainFrame
|
||||||
.Friendly then F.Image.Image=
|
local choices = { }
|
||||||
'rbxasset://textures/chatBubble_botGreen_notify_bkg.png'elseif H==Enum.
|
local lastChoice
|
||||||
DialogTone.Enemy then F.Image.Image=
|
local choiceMap = { }
|
||||||
'rbxasset://textures/chatBubble_botRed_notify_bkg.png'end if G==Enum.
|
local currentConversationDialog
|
||||||
DialogPurpose.Quest then F.Image.Button.Image=
|
local currentConversationPartner
|
||||||
'rbxasset://textures/chatBubble_bot_notify_bang.png'elseif G==Enum.DialogPurpose
|
local currentAbortDialogScript
|
||||||
.Help then F.Image.Button.Image=
|
local tooFarAwayMessage = "You are too far away to chat!"
|
||||||
'rbxasset://textures/chatBubble_bot_notify_question.png'elseif G==Enum.
|
local tooFarAwaySize = 300
|
||||||
DialogPurpose.Shop then F.Image.Button.Image=
|
local characterWanderedOffMessage = "Chat ended because you walked away"
|
||||||
'rbxasset://textures/chatBubble_bot_notify_money.png'end end local F F=function(
|
local characterWanderedOffSize = 350
|
||||||
)s=a('Frame','DialogScriptMessage',{Style=Enum.FrameStyle.RobloxRound,Visible=
|
local conversationTimedOut = "Chat ended because you didn't reply"
|
||||||
false,a('TextLabel','Text',{Position=UDim2.new(0,0,0,-1),Size=UDim2.new(1,0,1,0)
|
local conversationTimedOutSize = 350
|
||||||
,FontSize=Enum.FontSize.Size14,BackgroundTransparency=1,TextColor3=Color3.new(1,
|
local player
|
||||||
1,1),RobloxLocked=true})})end local G G=function(H,I)s.Text.Text=H s.Size=UDim2.
|
local chatNotificationGui
|
||||||
new(0,I,0,40)s.Position=UDim2.new(0.5,-I/2,0.5,-40)s.Visible=true wait(2)s.
|
local messageDialog
|
||||||
Visible=false return s end local H H=function(I)local J=math.min(string.len(I),
|
local timeoutScript
|
||||||
100)return wait(0.75+(J/75)*1.5)end local I I=function(J,K)if K==Enum.DialogTone
|
local reenableDialogScript
|
||||||
.Neutral then J.BackgroundColor3=Color3.new(7.8431372549019605E-3,
|
local dialogMap = { }
|
||||||
0.4235294117647059,1)J.Number.TextColor3=Color3.new(1,1,1)elseif K==Enum.
|
local dialogConnections = { }
|
||||||
DialogTone.Friendly then J.BackgroundColor3=Color3.new(0,0.5019607843137255,0)J.
|
local gui
|
||||||
Number.TextColor3=Color3.new(1,1,1)elseif K==Enum.DialogTone.Enemy then J.
|
waitForChild(game, "CoreGui")
|
||||||
BackgroundColor3=Color3.new(0.8,0,0)J.Number.TextColor3=Color3.new(1,1,1)end end
|
waitForChild(game.CoreGui, "RobloxGui")
|
||||||
local J J=function()if j then j:Remove()j=nil end local K=h h=nil if K and K.
|
if game.CoreGui.RobloxGui:FindFirstChild("ControlFrame") then
|
||||||
InUse then local L=u:Clone()L.archivable=false L.Disabled=false L.Parent=K end
|
gui = game.CoreGui.RobloxGui.ControlFrame
|
||||||
for L,M in pairs(v)do if L and M then M.Enabled=not L.InUse end end i=nil end
|
else
|
||||||
local L L=function()print'Wander'd.Visible=false J()return G(m,n)end local M M=
|
gui = game.CoreGui.RobloxGui
|
||||||
function()print'Timeout'd.Visible=false J()return G(o,p)end local N N=function()
|
end
|
||||||
print'Done'return J()end local O O=function(P)if string.len(P)==0 then return
|
local currentTone
|
||||||
'...'else return P end end local P P=function(Q)if j then j:Remove()j=nil end j=
|
currentTone = function()
|
||||||
t:Clone()j.archivable=false j.Disabled=false j.Parent=Q return j end local Q Q=
|
if currentConversationDialog then
|
||||||
function(R,S)if not h then return end i=R local T={}for U,V in pairs(S)do if V:
|
return currentConversationDialog.Tone
|
||||||
IsA'DialogChoice'then table.insert(T,V)end end table.sort(T,function(W,X)return
|
else
|
||||||
W.Name<X.Name end)if#T==0 then N()return end local W,X=1,0 g={}for Y,Z in pairs(
|
return Enum.DialogTone.Neutral
|
||||||
e)do Z.Visible=false end for _,aa in pairs(T)do if W<=#e then e[W].Size=UDim2.
|
end
|
||||||
new(1,0,0,72)e[W].UserPrompt.Text=aa.UserDialog local ab=math.ceil(e[W].
|
end
|
||||||
UserPrompt.TextBounds.Y/24)*24 e[W].Position=UDim2.new(0,0,0,X)e[W].Size=UDim2.
|
local createChatNotificationGui
|
||||||
new(1,0,0,ab)e[W].Visible=true g[e[W]]=aa X=X+ab W=W+1 end end f.Position=UDim2.
|
createChatNotificationGui = function()
|
||||||
new(0,0,0,X)f.Number.Text=W..')'d.Size=UDim2.new(0,350,0,X+24+32)d.Position=
|
chatNotificationGui = New("BillboardGui", "ChatNotificationGui", {
|
||||||
UDim2.new(0,20,0,-d.Size.Y.Offset-20)D(y())d.Visible=true end local aa aa=
|
ExtentsOffset = Vector3.new(0, 1, 0),
|
||||||
function(ab)P(h)d.Visible=false if ab==f then game.Chat:Chat(game.Players.
|
Size = UDim2.new(4, 0, 5.42857122, 0),
|
||||||
LocalPlayer.Character,'Goodbye!',A(y()))return N()else local R=g[ab]game.Chat:
|
SizeOffset = Vector2.new(0, 0),
|
||||||
Chat(game.Players.LocalPlayer.Character,O(R.UserDialog),A(y()))wait(1)h:
|
StudsOffset = Vector3.new(0.4, 4.3, 0),
|
||||||
SignalDialogChoiceSelected(q,R)game.Chat:Chat(i,O(R.ResponseDialog),A(y()))H(R.
|
Enabled = true,
|
||||||
ResponseDialog)return Q(i,R:GetChildren())end end local ab ab=function(R)local S
|
RobloxLocked = true,
|
||||||
=a('TextButton',{BackgroundColor3=Color3.new(0,0,0.7019607843137254),
|
Active = true,
|
||||||
AutoButtonColor=false,BorderSizePixel=0,Text='',RobloxLocked=true,a('TextLabel',
|
New("ImageLabel", "Image", {
|
||||||
'Number',{TextColor3=Color3.new(0.4980392156862745,0.8313725490196079,1),Text=R,
|
Active = false,
|
||||||
FontSize=Enum.FontSize.Size14,BackgroundTransparency=1,Position=UDim2.new(0,4,0,
|
BackgroundTransparency = 1,
|
||||||
2),Size=UDim2.new(0,20,0,24),TextXAlignment=Enum.TextXAlignment.Left,
|
Position = UDim2.new(0, 0, 0, 0),
|
||||||
TextYAlignment=Enum.TextYAlignment.Top,RobloxLocked=true}),a('TextLabel',
|
Size = UDim2.new(1, 0, 1, 0),
|
||||||
'UserPrompt',{BackgroundTransparency=1,TextColor3=Color3.new(1,1,1),FontSize=
|
Image = "",
|
||||||
Enum.FontSize.Size14,Position=UDim2.new(0,28,0,2),Size=UDim2.new(1,-32,1,-4),
|
RobloxLocked = true,
|
||||||
TextXAlignment=Enum.TextXAlignment.Left,TextYAlignment=Enum.TextYAlignment.Top,
|
New("ImageButton", "Button", {
|
||||||
TextWrap=true,RobloxLocked=true})})S.MouseEnter:connect(function()return I(S,y()
|
AutoButtonColor = false,
|
||||||
)end)S.MouseLeave:connect(function()return B(S,y())end)S.MouseButton1Click:
|
Position = UDim2.new(0.088, 0, 0.053, 0),
|
||||||
connect(function()return aa(S)end)return S end local R R=function(S)e[1]=ab'1)'e
|
Size = UDim2.new(0.83, 0, 0.46, 0),
|
||||||
[2]=ab'2)'e[3]=ab'3)'e[4]=ab'4)'f=ab'5)'f.UserPrompt.Text='Goodbye!'f.Size=UDim2
|
Image = "",
|
||||||
.new(1,0,0,28)d=a('Frame','UserDialogArea',{Size=UDim2.new(0,350,0,200),Style=
|
BackgroundTransparency = 1,
|
||||||
Enum.FrameStyle.ChatBlue,Visible=false,a('ImageLabel','Tail',{Size=UDim2.new(0,
|
RobloxLocked = true
|
||||||
62,0,53),Position=UDim2.new(1,8,0.25),Image=
|
})
|
||||||
'rbxasset://textures/chatBubble_botBlue_tailRight.png',BackgroundTransparency=1,
|
})
|
||||||
RobloxLocked=true})})for T,W in pairs(e)do W.RobloxLocked=true W.Parent=d f.
|
})
|
||||||
RobloxLocked=true end f.Parent=d d.RobloxLocked=true d.Parent=S end local S S=
|
end
|
||||||
function(T)while not Instance.Lock(T,q)do wait()end if T.InUse then Instance.
|
local getChatColor
|
||||||
Unlock(T)return else T.InUse=true Instance.Unlock(T)end h=T game.Chat:Chat(T.
|
getChatColor = function(tone)
|
||||||
Parent,T.InitialPrompt,A(T.Tone))H(T.InitialPrompt)return Q(T.Parent,T:
|
if tone == Enum.DialogTone.Neutral then
|
||||||
GetChildren())end local T T=function()while h do if h.Parent and(q:
|
return Enum.ChatColor.Blue
|
||||||
DistanceFromCharacter(h.Parent.Position>=h.ConversationDistance))then L()end
|
elseif tone == Enum.DialogTone.Friendly then
|
||||||
wait(1)end end local W W=function(X)if X.Parent and X.Parent:IsA'BasePart'then
|
return Enum.ChatColor.Green
|
||||||
if q:DistanceFromCharacter(X.Parent.Position)>=X.ConversationDistance then G(k,l
|
elseif tone == Enum.DialogTone.Enemy then
|
||||||
)return end for _,ac in pairs(v)do if _ and ac then ac.Enabled=false end end P(_
|
return Enum.ChatColor.Red
|
||||||
)delay(1,T)return S(_)end end local ac ac=function(X)if v[X]then v[X]:Remove()v[
|
end
|
||||||
X]=nil end if w[X]then w[X]:disconnect()w[X]=nil end end local X X=function(_)if
|
end
|
||||||
_.Parent then if _.Parent:IsA'BasePart'then local ad=r:clone()ad.Enabled=not _.
|
local resetColor
|
||||||
InUse ad.Adornee=_.Parent ad.RobloxLocked=true ad.Parent=game.CoreGui ad.Image.
|
resetColor = function(frame, tone)
|
||||||
Button.MouseButton1Click:connect(function()return W(_)end)E(ad,_.Purpose,_.Tone)
|
if tone == Enum.DialogTone.Neutral then
|
||||||
v[_]=ad w[_]=_.Changed:connect(function(ae)if ae=='Parent'and _.Parent then ac(_
|
frame.BackgroundColor3 = Color3.new(0, 0, 179 / 255)
|
||||||
)return X(_)elseif ae=='InUse'then ad.Enabled=not h and not _.InUse if _==h then
|
frame.Number.TextColor3 = Color3.new(45 / 255, 142 / 255, 245 / 255)
|
||||||
return M()end elseif ae=='Tone'or ae=='Purpose'then return E(ad,_.Purpose,_.Tone
|
elseif tone == Enum.DialogTone.Friendly then
|
||||||
)end end)else w[_]=_.Changed:connect(function(ad)if ad=='Parent'and _.Parent
|
frame.BackgroundColor3 = Color3.new(0, 77 / 255, 0)
|
||||||
then ac(_)return X(_)end end)end end end local ad ad=function()local ae=game:
|
frame.Number.TextColor3 = Color3.new(0, 190 / 255, 0)
|
||||||
GetService'InsertService':LoadAsset(39226062)if type(ae)=='string'then wait(0.1)
|
elseif tone == Enum.DialogTone.Enemy then
|
||||||
ae=game:GetService'InsertService':LoadAsset(39226062)end if type(ae)=='string'
|
frame.BackgroundColor3 = Color3.new(140 / 255, 0, 0)
|
||||||
then return end c(ae,'TimeoutScript')t=ae.TimeoutScript c(ae,
|
frame.Number.TextColor3 = Color3.new(255 / 255, 88 / 255, 79 / 255)
|
||||||
'ReenableDialogScript')u=ae.ReenableDialogScript end local ae ae=function()b(
|
end
|
||||||
game.Players,'LocalPlayer')q=game.Players.LocalPlayer b(q,'Character')ad()z()F()
|
end
|
||||||
s.RobloxLocked=true s.Parent=x c(x,'BottomLeftControl')local _=a('Frame',
|
local styleChoices
|
||||||
'DialogFrame',{Position=UDim2.new(0,0,0,0),Size=UDim2.new(0,0,0,0),
|
styleChoices = function(tone)
|
||||||
BackgroundTransparency=1,RobloxLocked=true,Parent=x.BottomLeftControl})R(_)game.
|
for _, obj in pairs(choices) do
|
||||||
CollectionService.ItemAdded:connect(function(af)if af:IsA'Dialog'then return X(
|
resetColor(obj, tone)
|
||||||
af)end end)game.CollectionService.ItemRemoved:connect(function(af)if af:IsA
|
end
|
||||||
'Dialog'then return ac(af)end end)for af,ag in pairs(game.CollectionService:
|
return resetColor(lastChoice, tone)
|
||||||
GetCollection'Dialog')do if ag:IsA'Dialog'then X(ag)end end end return ae()
|
end
|
||||||
|
local styleMainFrame
|
||||||
|
styleMainFrame = function(tone)
|
||||||
|
if tone == Enum.DialogTone.Neutral then
|
||||||
|
mainFrame.Style = Enum.FrameStyle.ChatBlue
|
||||||
|
mainFrame.Tail.Image = "rbxasset://textures/chatBubble_botBlue_tailRight.png"
|
||||||
|
elseif tone == Enum.DialogTone.Friendly then
|
||||||
|
mainFrame.Style = Enum.FrameStyle.ChatGreen
|
||||||
|
mainFrame.Tail.Image = "rbxasset://textures/chatBubble_botGreen_tailRight.png"
|
||||||
|
elseif tone == Enum.DialogTone.Enemy then
|
||||||
|
mainFrame.Style = Enum.FrameStyle.ChatRed
|
||||||
|
mainFrame.Tail.Image = "rbxasset://textures/chatBubble_botRed_tailRight.png"
|
||||||
|
end
|
||||||
|
return styleChoices(tone)
|
||||||
|
end
|
||||||
|
local setChatNotificationTone
|
||||||
|
setChatNotificationTone = function(gui, purpose, tone)
|
||||||
|
if tone == Enum.DialogTone.Neutral then
|
||||||
|
gui.Image.Image = "rbxasset://textures/chatBubble_botBlue_notify_bkg.png"
|
||||||
|
elseif tone == Enum.DialogTone.Friendly then
|
||||||
|
gui.Image.Image = "rbxasset://textures/chatBubble_botGreen_notify_bkg.png"
|
||||||
|
elseif tone == Enum.DialogTone.Enemy then
|
||||||
|
gui.Image.Image = "rbxasset://textures/chatBubble_botRed_notify_bkg.png"
|
||||||
|
end
|
||||||
|
if purpose == Enum.DialogPurpose.Quest then
|
||||||
|
gui.Image.Button.Image = "rbxasset://textures/chatBubble_bot_notify_bang.png"
|
||||||
|
elseif purpose == Enum.DialogPurpose.Help then
|
||||||
|
gui.Image.Button.Image = "rbxasset://textures/chatBubble_bot_notify_question.png"
|
||||||
|
elseif purpose == Enum.DialogPurpose.Shop then
|
||||||
|
gui.Image.Button.Image = "rbxasset://textures/chatBubble_bot_notify_money.png"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local createMessageDialog
|
||||||
|
createMessageDialog = function()
|
||||||
|
messageDialog = New("Frame", "DialogScriptMessage", {
|
||||||
|
Style = Enum.FrameStyle.RobloxRound,
|
||||||
|
Visible = false,
|
||||||
|
New("TextLabel", "Text", {
|
||||||
|
Position = UDim2.new(0, 0, 0, -1),
|
||||||
|
Size = UDim2.new(1, 0, 1, 0),
|
||||||
|
FontSize = Enum.FontSize.Size14,
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
TextColor3 = Color3.new(1, 1, 1),
|
||||||
|
RobloxLocked = true
|
||||||
|
})
|
||||||
|
})
|
||||||
|
end
|
||||||
|
local showMessage
|
||||||
|
showMessage = function(msg, size)
|
||||||
|
messageDialog.Text.Text = msg
|
||||||
|
messageDialog.Size = UDim2.new(0, size, 0, 40)
|
||||||
|
messageDialog.Position = UDim2.new(0.5, -size / 2, 0.5, -40)
|
||||||
|
messageDialog.Visible = true
|
||||||
|
wait(2)
|
||||||
|
messageDialog.Visible = false
|
||||||
|
return messageDialog
|
||||||
|
end
|
||||||
|
local variableDelay
|
||||||
|
variableDelay = function(str)
|
||||||
|
local length = math.min(string.len(str), 100)
|
||||||
|
return wait(0.75 + (length / 75) * 1.5)
|
||||||
|
end
|
||||||
|
local highlightColor
|
||||||
|
highlightColor = function(frame, tone)
|
||||||
|
if tone == Enum.DialogTone.Neutral then
|
||||||
|
frame.BackgroundColor3 = Color3.new(2 / 255, 108 / 255, 255 / 255)
|
||||||
|
frame.Number.TextColor3 = Color3.new(1, 1, 1)
|
||||||
|
elseif tone == Enum.DialogTone.Friendly then
|
||||||
|
frame.BackgroundColor3 = Color3.new(0, 128 / 255, 0)
|
||||||
|
frame.Number.TextColor3 = Color3.new(1, 1, 1)
|
||||||
|
elseif tone == Enum.DialogTone.Enemy then
|
||||||
|
frame.BackgroundColor3 = Color3.new(204 / 255, 0, 0)
|
||||||
|
frame.Number.TextColor3 = Color3.new(1, 1, 1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local endDialog
|
||||||
|
endDialog = function()
|
||||||
|
if currentAbortDialogScript then
|
||||||
|
currentAbortDialogScript:Remove()
|
||||||
|
currentAbortDialogScript = nil
|
||||||
|
end
|
||||||
|
local dialog = currentConversationDialog
|
||||||
|
currentConversationDialog = nil
|
||||||
|
if dialog and dialog.InUse then
|
||||||
|
local reenableScript = reenableDialogScript:Clone()
|
||||||
|
reenableScript.archivable = false
|
||||||
|
reenableScript.Disabled = false
|
||||||
|
reenableScript.Parent = dialog
|
||||||
|
end
|
||||||
|
for dialog, gui in pairs(dialogMap) do
|
||||||
|
if dialog and gui then
|
||||||
|
gui.Enabled = not dialog.InUse
|
||||||
|
end
|
||||||
|
end
|
||||||
|
currentConversationPartner = nil
|
||||||
|
end
|
||||||
|
local wanderDialog
|
||||||
|
wanderDialog = function()
|
||||||
|
print("Wander")
|
||||||
|
mainFrame.Visible = false
|
||||||
|
endDialog()
|
||||||
|
return showMessage(characterWanderedOffMessage, characterWanderedOffSize)
|
||||||
|
end
|
||||||
|
local timeoutDialog
|
||||||
|
timeoutDialog = function()
|
||||||
|
print("Timeout")
|
||||||
|
mainFrame.Visible = false
|
||||||
|
endDialog()
|
||||||
|
return showMessage(conversationTimedOut, conversationTimedOutSize)
|
||||||
|
end
|
||||||
|
local normalEndDialog
|
||||||
|
normalEndDialog = function()
|
||||||
|
print("Done")
|
||||||
|
return endDialog()
|
||||||
|
end
|
||||||
|
local sanitizeMessage
|
||||||
|
sanitizeMessage = function(msg)
|
||||||
|
if string.len(msg) == 0 then
|
||||||
|
return "..."
|
||||||
|
else
|
||||||
|
return msg
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local renewKillswitch
|
||||||
|
renewKillswitch = function(dialog)
|
||||||
|
if currentAbortDialogScript then
|
||||||
|
currentAbortDialogScript:Remove()
|
||||||
|
currentAbortDialogScript = nil
|
||||||
|
end
|
||||||
|
currentAbortDialogScript = timeoutScript:Clone()
|
||||||
|
currentAbortDialogScript.archivable = false
|
||||||
|
currentAbortDialogScript.Disabled = false
|
||||||
|
currentAbortDialogScript.Parent = dialog
|
||||||
|
return currentAbortDialogScript
|
||||||
|
end
|
||||||
|
local presentDialogChoices
|
||||||
|
presentDialogChoices = function(talkingPart, dialogChoices)
|
||||||
|
if not currentConversationDialog then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
currentConversationPartner = talkingPart
|
||||||
|
local sortedDialogChoices = { }
|
||||||
|
for _, obj in pairs(dialogChoices) do
|
||||||
|
if obj:IsA("DialogChoice") then
|
||||||
|
table.insert(sortedDialogChoices, obj)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
table.sort(sortedDialogChoices, function(a, b)
|
||||||
|
return a.Name < b.Name
|
||||||
|
end)
|
||||||
|
if #sortedDialogChoices == 0 then
|
||||||
|
normalEndDialog()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local pos = 1
|
||||||
|
local yPosition = 0
|
||||||
|
choiceMap = { }
|
||||||
|
for _, obj in pairs(choices) do
|
||||||
|
obj.Visible = false
|
||||||
|
end
|
||||||
|
for _, obj in pairs(sortedDialogChoices) do
|
||||||
|
if pos <= #choices then
|
||||||
|
choices[pos].Size = UDim2.new(1, 0, 0, 24 * 3)
|
||||||
|
choices[pos].UserPrompt.Text = obj.UserDialog
|
||||||
|
local height = math.ceil(choices[pos].UserPrompt.TextBounds.Y / 24) * 24
|
||||||
|
choices[pos].Position = UDim2.new(0, 0, 0, yPosition)
|
||||||
|
choices[pos].Size = UDim2.new(1, 0, 0, height)
|
||||||
|
choices[pos].Visible = true
|
||||||
|
choiceMap[choices[pos]] = obj
|
||||||
|
yPosition = yPosition + height
|
||||||
|
pos = pos + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
lastChoice.Position = UDim2.new(0, 0, 0, yPosition)
|
||||||
|
lastChoice.Number.Text = pos .. ")"
|
||||||
|
mainFrame.Size = UDim2.new(0, 350, 0, yPosition + 24 + 32)
|
||||||
|
mainFrame.Position = UDim2.new(0, 20, 0, -mainFrame.Size.Y.Offset - 20)
|
||||||
|
styleMainFrame(currentTone())
|
||||||
|
mainFrame.Visible = true
|
||||||
|
end
|
||||||
|
local selectChoice
|
||||||
|
selectChoice = function(choice)
|
||||||
|
renewKillswitch(currentConversationDialog)
|
||||||
|
mainFrame.Visible = false
|
||||||
|
if choice == lastChoice then
|
||||||
|
game.Chat:Chat(game.Players.LocalPlayer.Character, "Goodbye!", getChatColor(currentTone()))
|
||||||
|
return normalEndDialog()
|
||||||
|
else
|
||||||
|
local dialogChoice = choiceMap[choice]
|
||||||
|
game.Chat:Chat(game.Players.LocalPlayer.Character, sanitizeMessage(dialogChoice.UserDialog), getChatColor(currentTone()))
|
||||||
|
wait(1)
|
||||||
|
currentConversationDialog:SignalDialogChoiceSelected(player, dialogChoice)
|
||||||
|
game.Chat:Chat(currentConversationPartner, sanitizeMessage(dialogChoice.ResponseDialog), getChatColor(currentTone()))
|
||||||
|
variableDelay(dialogChoice.ResponseDialog)
|
||||||
|
return presentDialogChoices(currentConversationPartner, dialogChoice:GetChildren())
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local newChoice
|
||||||
|
newChoice = function(numberText)
|
||||||
|
local frame = New("TextButton", {
|
||||||
|
BackgroundColor3 = Color3.new(0, 0, 179 / 255),
|
||||||
|
AutoButtonColor = false,
|
||||||
|
BorderSizePixel = 0,
|
||||||
|
Text = "",
|
||||||
|
RobloxLocked = true,
|
||||||
|
New("TextLabel", "Number", {
|
||||||
|
TextColor3 = Color3.new(127 / 255, 212 / 255, 255 / 255),
|
||||||
|
Text = numberText,
|
||||||
|
FontSize = Enum.FontSize.Size14,
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Position = UDim2.new(0, 4, 0, 2),
|
||||||
|
Size = UDim2.new(0, 20, 0, 24),
|
||||||
|
TextXAlignment = Enum.TextXAlignment.Left,
|
||||||
|
TextYAlignment = Enum.TextYAlignment.Top,
|
||||||
|
RobloxLocked = true
|
||||||
|
}),
|
||||||
|
New("TextLabel", "UserPrompt", {
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
TextColor3 = Color3.new(1, 1, 1),
|
||||||
|
FontSize = Enum.FontSize.Size14,
|
||||||
|
Position = UDim2.new(0, 28, 0, 2),
|
||||||
|
Size = UDim2.new(1, -32, 1, -4),
|
||||||
|
TextXAlignment = Enum.TextXAlignment.Left,
|
||||||
|
TextYAlignment = Enum.TextYAlignment.Top,
|
||||||
|
TextWrap = true,
|
||||||
|
RobloxLocked = true
|
||||||
|
})
|
||||||
|
})
|
||||||
|
frame.MouseEnter:connect(function()
|
||||||
|
return highlightColor(frame, currentTone())
|
||||||
|
end)
|
||||||
|
frame.MouseLeave:connect(function()
|
||||||
|
return resetColor(frame, currentTone())
|
||||||
|
end)
|
||||||
|
frame.MouseButton1Click:connect(function()
|
||||||
|
return selectChoice(frame)
|
||||||
|
end)
|
||||||
|
return frame
|
||||||
|
end
|
||||||
|
local initialize
|
||||||
|
initialize = function(parent)
|
||||||
|
choices[1] = newChoice("1)")
|
||||||
|
choices[2] = newChoice("2)")
|
||||||
|
choices[3] = newChoice("3)")
|
||||||
|
choices[4] = newChoice("4)")
|
||||||
|
lastChoice = newChoice("5)")
|
||||||
|
lastChoice.UserPrompt.Text = "Goodbye!"
|
||||||
|
lastChoice.Size = UDim2.new(1, 0, 0, 28)
|
||||||
|
mainFrame = New("Frame", "UserDialogArea", {
|
||||||
|
Size = UDim2.new(0, 350, 0, 200),
|
||||||
|
Style = Enum.FrameStyle.ChatBlue,
|
||||||
|
Visible = false,
|
||||||
|
New("ImageLabel", "Tail", {
|
||||||
|
Size = UDim2.new(0, 62, 0, 53),
|
||||||
|
Position = UDim2.new(1, 8, 0.25),
|
||||||
|
Image = "rbxasset://textures/chatBubble_botBlue_tailRight.png",
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
RobloxLocked = true
|
||||||
|
})
|
||||||
|
})
|
||||||
|
for _, obj in pairs(choices) do
|
||||||
|
obj.RobloxLocked = true
|
||||||
|
obj.Parent = mainFrame
|
||||||
|
lastChoice.RobloxLocked = true
|
||||||
|
end
|
||||||
|
lastChoice.Parent = mainFrame
|
||||||
|
mainFrame.RobloxLocked = true
|
||||||
|
mainFrame.Parent = parent
|
||||||
|
end
|
||||||
|
local doDialog
|
||||||
|
doDialog = function(dialog)
|
||||||
|
while not Instance.Lock(dialog, player) do
|
||||||
|
wait()
|
||||||
|
end
|
||||||
|
if dialog.InUse then
|
||||||
|
Instance.Unlock(dialog)
|
||||||
|
return
|
||||||
|
else
|
||||||
|
dialog.InUse = true
|
||||||
|
Instance.Unlock(dialog)
|
||||||
|
end
|
||||||
|
currentConversationDialog = dialog
|
||||||
|
game.Chat:Chat(dialog.Parent, dialog.InitialPrompt, getChatColor(dialog.Tone))
|
||||||
|
variableDelay(dialog.InitialPrompt)
|
||||||
|
return presentDialogChoices(dialog.Parent, dialog:GetChildren())
|
||||||
|
end
|
||||||
|
local checkForLeaveArea
|
||||||
|
checkForLeaveArea = function()
|
||||||
|
while currentConversationDialog do
|
||||||
|
if currentConversationDialog.Parent and (player:DistanceFromCharacter(currentConversationDialog.Parent.Position >= currentConversationDialog.ConversationDistance)) then
|
||||||
|
wanderDialog()
|
||||||
|
end
|
||||||
|
wait(1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local startDialog
|
||||||
|
startDialog = function(dialog)
|
||||||
|
if dialog.Parent and dialog.Parent:IsA("BasePart") then
|
||||||
|
if player:DistanceFromCharacter(dialog.Parent.Position) >= dialog.ConversationDistance then
|
||||||
|
showMessage(tooFarAwayMessage, tooFarAwaySize)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
for dialog, gui in pairs(dialogMap) do
|
||||||
|
if dialog and gui then
|
||||||
|
gui.Enabled = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
renewKillswitch(dialog)
|
||||||
|
delay(1, checkForLeaveArea)
|
||||||
|
return doDialog(dialog)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local removeDialog
|
||||||
|
removeDialog = function(dialog)
|
||||||
|
if dialogMap[dialog] then
|
||||||
|
dialogMap[dialog]:Remove()
|
||||||
|
dialogMap[dialog] = nil
|
||||||
|
end
|
||||||
|
if dialogConnections[dialog] then
|
||||||
|
dialogConnections[dialog]:disconnect()
|
||||||
|
dialogConnections[dialog] = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local addDialog
|
||||||
|
addDialog = function(dialog)
|
||||||
|
if dialog.Parent then
|
||||||
|
if dialog.Parent:IsA("BasePart") then
|
||||||
|
local chatGui = chatNotificationGui:clone()
|
||||||
|
chatGui.Enabled = not dialog.InUse
|
||||||
|
chatGui.Adornee = dialog.Parent
|
||||||
|
chatGui.RobloxLocked = true
|
||||||
|
chatGui.Parent = game.CoreGui
|
||||||
|
chatGui.Image.Button.MouseButton1Click:connect(function()
|
||||||
|
return startDialog(dialog)
|
||||||
|
end)
|
||||||
|
setChatNotificationTone(chatGui, dialog.Purpose, dialog.Tone)
|
||||||
|
dialogMap[dialog] = chatGui
|
||||||
|
dialogConnections[dialog] = dialog.Changed:connect(function(prop)
|
||||||
|
if prop == "Parent" and dialog.Parent then
|
||||||
|
removeDialog(dialog)
|
||||||
|
return addDialog(dialog)
|
||||||
|
elseif prop == "InUse" then
|
||||||
|
chatGui.Enabled = not currentConversationDialog and not dialog.InUse
|
||||||
|
if dialog == currentConversationDialog then
|
||||||
|
return timeoutDialog()
|
||||||
|
end
|
||||||
|
elseif prop == "Tone" or prop == "Purpose" then
|
||||||
|
return setChatNotificationTone(chatGui, dialog.Purpose, dialog.Tone)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
else
|
||||||
|
dialogConnections[dialog] = dialog.Changed:connect(function(prop)
|
||||||
|
if prop == "Parent" and dialog.Parent then
|
||||||
|
removeDialog(dialog)
|
||||||
|
return addDialog(dialog)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local fetchScripts
|
||||||
|
fetchScripts = function()
|
||||||
|
local model = game:GetService("InsertService"):LoadAsset(39226062)
|
||||||
|
if type(model) == "string" then
|
||||||
|
wait(0.1)
|
||||||
|
model = game:GetService("InsertService"):LoadAsset(39226062)
|
||||||
|
end
|
||||||
|
if type(model) == "string" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
waitForChild(model, "TimeoutScript")
|
||||||
|
timeoutScript = model.TimeoutScript
|
||||||
|
waitForChild(model, "ReenableDialogScript")
|
||||||
|
reenableDialogScript = model.ReenableDialogScript
|
||||||
|
end
|
||||||
|
local onLoad
|
||||||
|
onLoad = function()
|
||||||
|
waitForProperty(game.Players, "LocalPlayer")
|
||||||
|
player = game.Players.LocalPlayer
|
||||||
|
waitForProperty(player, "Character")
|
||||||
|
fetchScripts()
|
||||||
|
createChatNotificationGui()
|
||||||
|
createMessageDialog()
|
||||||
|
messageDialog.RobloxLocked = true
|
||||||
|
messageDialog.Parent = gui
|
||||||
|
waitForChild(gui, "BottomLeftControl")
|
||||||
|
local frame = New("Frame", "DialogFrame", {
|
||||||
|
Position = UDim2.new(0, 0, 0, 0),
|
||||||
|
Size = UDim2.new(0, 0, 0, 0),
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
RobloxLocked = true,
|
||||||
|
Parent = gui.BottomLeftControl
|
||||||
|
})
|
||||||
|
initialize(frame)
|
||||||
|
game.CollectionService.ItemAdded:connect(function(obj)
|
||||||
|
if obj:IsA("Dialog") then
|
||||||
|
return addDialog(obj)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
game.CollectionService.ItemRemoved:connect(function(obj)
|
||||||
|
if obj:IsA("Dialog") then
|
||||||
|
return removeDialog(obj)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
for _, obj in pairs(game.CollectionService:GetCollection("Dialog")) do
|
||||||
|
if obj:IsA("Dialog") then
|
||||||
|
addDialog(obj)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return onLoad()
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,5 +1,15 @@
|
||||||
local a={}a.Foo=function()return print'foo'end a.Bar=function()return print'bar'
|
local t = { }
|
||||||
end a.Help=function(b)if'Foo'==b or a.Foo==b then return
|
t.Foo = function()
|
||||||
'Function Foo. Arguments: None. Side effect: prints foo'elseif'Bar'==b or a.
|
return print("foo")
|
||||||
Bar==b 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
|
|
@ -1,84 +1,234 @@
|
||||||
local a a=function(b,c)while not b[c]do b.Changed:wait()end end local b b=
|
local waitForProperty
|
||||||
function(c,d)while not c:FindFirstChild(d)do c.ChildAdded:wait()end end a(game.
|
waitForProperty = function(instance, property)
|
||||||
Players,'LocalPlayer')b(script.Parent,'Popup')b(script.Parent.Popup,
|
while not instance[property] do
|
||||||
'AcceptButton')script.Parent.Popup.AcceptButton.Modal=true local c,d,e,f,g=game.
|
instance.Changed:wait()
|
||||||
Players.LocalPlayer,nil,{},true,nil g=function()local h=script.Parent:
|
end
|
||||||
FindFirstChild'Popup'if h then h.OKButton.Visible=true h.DeclineButton.Visible=
|
end
|
||||||
false h.AcceptButton.Visible=false end return h end local h h=function()local i=
|
local waitForChild
|
||||||
script.Parent:FindFirstChild'Popup'if i then i.OKButton.Visible=false i.
|
waitForChild = function(instance, name)
|
||||||
DeclineButton.Visible=true i.AcceptButton.Visible=true end return i end local i
|
while not instance:FindFirstChild(name) do
|
||||||
i=function()if script.Parent.Popup then script.Parent.Popup.Visible=false end
|
instance.ChildAdded:wait()
|
||||||
end local j j=function(k,l)local m=script.Parent:FindFirstChild'Popup'if not(m~=
|
end
|
||||||
nil)then return end if m.Visible then return end if e[k]then return end m.
|
end
|
||||||
PopupText.Text='Accept Friend Request from '..tostring(k.Name)..'?'m.PopupImage.
|
waitForProperty(game.Players, "LocalPlayer")
|
||||||
Image='http://www.roblox.com/thumbs/avatar.ashx?userId='..tostring(k.userId)..
|
waitForChild(script.Parent, "Popup")
|
||||||
'&x=352&y=352'h()m.Visible=true m.AcceptButton.Text='Accept'm.DeclineButton.Text
|
waitForChild(script.Parent.Popup, "AcceptButton")
|
||||||
='Decline'm:TweenSize(UDim2.new(0,330,0,350),Enum.EasingDirection.Out,Enum.
|
script.Parent.Popup.AcceptButton.Modal = true
|
||||||
EasingStyle.Quart,1,true)local n,o n=m.AcceptButton.MouseButton1Click:connect(
|
local localPlayer = game.Players.LocalPlayer
|
||||||
function()m.Visible=false l:RequestFriendship(k)if n~=nil then n:disconnect()end
|
local teleportUI
|
||||||
if o~=nil then o:disconnect()end return m:TweenSize(UDim2.new(0,0,0,0),Enum.
|
local friendRequestBlacklist = { }
|
||||||
EasingDirection.Out,Enum.EasingStyle.Quart,1,true,i())end)o=m.DeclineButton.
|
local teleportEnabled = true
|
||||||
MouseButton1Click:connect(function()m.Visible=false l:RevokeFriendship(k)e[k]=
|
local showOneButton
|
||||||
true print'pop up blacklist'if n~=nil then n:disconnect()end if o~=nil then o:
|
showOneButton = function()
|
||||||
disconnect()end return m:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,
|
local popup = script.Parent:FindFirstChild("Popup")
|
||||||
Enum.EasingStyle.Quart,1,true,i())end)end game.Players.FriendRequestEvent:
|
if popup then
|
||||||
connect(function(k,l,m)if k~=c and l~=c then return end if k==c then if m==Enum.
|
popup.OKButton.Visible = true
|
||||||
FriendRequestEvent.Accept then return game:GetService'GuiService':
|
popup.DeclineButton.Visible = false
|
||||||
SendNotification('You are Friends','With '..tostring(l.Name)..'!',
|
popup.AcceptButton.Visible = false
|
||||||
'http://www.roblox.com/thumbs/avatar.ashx?userId='..tostring(l.userId)..
|
end
|
||||||
'&x=48&y=48',5,function()end)end elseif l==c then if m==Enum.FriendRequestEvent.
|
return popup
|
||||||
Issue then if e[k]then return end return game:GetService'GuiService':
|
end
|
||||||
SendNotification('Friend Request','From '..tostring(k.Name),
|
local showTwoButtons
|
||||||
'http://www.roblox.com/thumbs/avatar.ashx?userId='..tostring(k.userId)..
|
showTwoButtons = function()
|
||||||
'&x=48&y=48',8,function()return j(k,l)end)elseif m==Enum.FriendRequestEvent.
|
local popup = script.Parent:FindFirstChild("Popup")
|
||||||
Accept then return game:GetService'GuiService':SendNotification(
|
if popup then
|
||||||
'You are Friends','With '..tostring(k.Name)..'!',
|
popup.OKButton.Visible = false
|
||||||
'http://www.roblox.com/thumbs/avatar.ashx?userId='..tostring(k.userId)..
|
popup.DeclineButton.Visible = true
|
||||||
'&x=48&y=48',5,function()end)end end end)local k k=function(l,m)if d~=nil then d
|
popup.AcceptButton.Visible = true
|
||||||
:Remove()end b(c,'PlayerGui')local n=Instance.new'Message'n.Text=l n.Parent=c.
|
end
|
||||||
PlayerGui if m>0 then wait(m)n:Remove()end return n end local l l=function(m,n,o
|
return popup
|
||||||
)if game:GetService'TeleportService'.CustomizedTeleportUI==false then return k((
|
end
|
||||||
function()if Enum.TeleportState.Started==m then return'Teleport started...',0
|
local makePopupInvisible
|
||||||
elseif Enum.TeleportState.WaitingForServer==m then return'Requesting server...',
|
makePopupInvisible = function()
|
||||||
0 elseif Enum.TeleportState.InProgress==m then return'Teleporting...',0 elseif
|
if script.Parent.Popup then
|
||||||
Enum.TeleportState.Failed==m then return
|
script.Parent.Popup.Visible = false
|
||||||
[[Teleport failed. Insufficient privileges or target place does not exist.]],3
|
end
|
||||||
end end)())end end if f then c.OnTeleport:connect(l)game:GetService
|
end
|
||||||
'TeleportService'.ErrorCallback=function(m)local o=script.Parent:FindFirstChild
|
local makeFriend
|
||||||
'Popup'g()o.PopupText.Text=m local p p=o.OKButton.MouseButton1Click:connect(
|
makeFriend = function(fromPlayer, toPlayer)
|
||||||
function()game:GetService'TeleportService':TeleportCancel()if p then p:
|
local popup = script.Parent:FindFirstChild("Popup")
|
||||||
disconnect()end game.GuiService:RemoveCenterDialog(script.Parent:FindFirstChild
|
if not (popup ~= nil) then
|
||||||
'Popup')return o:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.
|
return
|
||||||
EasingStyle.Quart,1,true,i())end)return game.GuiService:AddCenterDialog(script.
|
end
|
||||||
Parent:FindFirstChild('Popup',Enum.CenterDialogType.QuitDialog),function()g()
|
if popup.Visible then
|
||||||
script.Parent:FindFirstChild'Popup'.Visible=true return o:TweenSize(UDim2.new(0,
|
return
|
||||||
330,0,350),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true)end,function()
|
end
|
||||||
return o:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.
|
if friendRequestBlacklist[fromPlayer] then
|
||||||
Quart,1,true,i())end)end game:GetService'TeleportService'.ConfirmationCallback=
|
return
|
||||||
function(m,o,p)local q=script.Parent:FindFirstChild'Popup'q.PopupText.Text=m q.
|
end
|
||||||
PopupImage.Image=''local r,s,t t=function()if r~=nil then r:disconnect()end if s
|
popup.PopupText.Text = "Accept Friend Request from " .. tostring(fromPlayer.Name) .. "?"
|
||||||
~=nil then s: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')return q:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection
|
showTwoButtons()
|
||||||
.Out,Enum.EasingStyle.Quart,1,true,i())end r=q.AcceptButton.MouseButton1Click:
|
popup.Visible = true
|
||||||
connect(function()t()local u,v u,v=pcall(function()return game:GetService
|
popup.AcceptButton.Text = "Accept"
|
||||||
'TeleportService':TeleportImpl(o,p)end)if not u then g()q.PopupText.Text=v local
|
popup.DeclineButton.Text = "Decline"
|
||||||
w w=q.OKButton.MouseButton1Click:connect(function()if w~=nil then w:disconnect()
|
popup:TweenSize(UDim2.new(0, 330, 0, 350), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true)
|
||||||
end game.GuiService:RemoveCenterDialog(script.Parent:FindFirstChild'Popup')
|
local yesCon, noCon
|
||||||
return q:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.
|
yesCon = popup.AcceptButton.MouseButton1Click:connect(function()
|
||||||
Quart,1,true,i())end)return game.GuiService:AddCenterDialog(script.Parent:
|
popup.Visible = false
|
||||||
FindFirstChild('Popup',Enum.CenterDialogType.QuitDialog),function()g()script.
|
toPlayer:RequestFriendship(fromPlayer)
|
||||||
Parent:FindFirstChild'Popup'.Visible=true return q:TweenSize(UDim2.new(0,330,0,
|
if yesCon ~= nil then
|
||||||
350),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true)end,function()return
|
yesCon:disconnect()
|
||||||
q:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1
|
end
|
||||||
,true,i())end)end end)s=q.DeclineButton.MouseButton1Click:connect(function()t()
|
if noCon ~= nil then
|
||||||
return pcall(function()return game:GetService'TeleportService':TeleportCancel()
|
noCon:disconnect()
|
||||||
end)end)local u=pcall(function()return game.GuiService:AddCenterDialog(script.
|
end
|
||||||
Parent:FindFirstChild('Popup',Enum.CenterDialogType.QuitDialog),function()h()q.
|
return popup:TweenSize(UDim2.new(0, 0, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quart, 1, true, makePopupInvisible())
|
||||||
AcceptButton.Text='Leave'q.DeclineButton.Text='Stay'script.Parent:FindFirstChild
|
end)
|
||||||
'Popup'.Visible=true return q:TweenSize(UDim2.new(0,330,0,350),Enum.
|
noCon = popup.DeclineButton.MouseButton1Click:connect(function()
|
||||||
EasingDirection.Out,Enum.EasingStyle.Quart,1,true)end,function()return q:
|
popup.Visible = false
|
||||||
TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,
|
toPlayer:RevokeFriendship(fromPlayer)
|
||||||
true,i())end)end)if u==false then script.Parent:FindFirstChild'Popup'.Visible=
|
friendRequestBlacklist[fromPlayer] = true
|
||||||
true q.AcceptButton.Text='Leave'q.DeclineButton.Text='Stay'q:TweenSize(UDim2.
|
print("pop up blacklist")
|
||||||
new(0,330,0,350),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true)end
|
if yesCon ~= nil then
|
||||||
return true 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
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,90 @@
|
||||||
local a a=function(b,c,d)if not(d~=nil)then d=c c=nil end local e=a(b)if c then
|
local New
|
||||||
e.Name=c end local f for g,h in pairs(d)do if type(g)=='string'then if g==
|
New = function(className, name, props)
|
||||||
'Parent'then f=h else e[g]=h end elseif type(g)=='number'and type(h)=='userdata'
|
if not (props ~= nil) then
|
||||||
then h.Parent=e end end e.Parent=f return e end local b=a('Frame','Popup',{
|
props = name
|
||||||
Position=UDim2.new(0.5,-165,0.5,-175),Size=UDim2.new(0,330,0,350),Style=Enum.
|
name = nil
|
||||||
FrameStyle.RobloxRound,ZIndex=4,Visible=false,Parent=script.Parent,a('TextLabel'
|
end
|
||||||
,'PopupText',{Size=UDim2.new(1,0,0.8,0),Font=Enum.Font.ArialBold,FontSize=Enum.
|
local obj = New(className)
|
||||||
FontSize.Size36,BackgroundTransparency=1,Text="Hello I'm a popup",TextColor3=
|
if name then
|
||||||
Color3.new(0.9725490196078431,0.9725490196078431,0.9725490196078431),TextWrap=
|
obj.Name = name
|
||||||
true,ZIndex=5}),a('TextButton','AcceptButton',{Position=UDim2.new(0,20,0,270),
|
end
|
||||||
Size=UDim2.new(0,100,0,50),Font=Enum.Font.ArialBold,FontSize=Enum.FontSize.
|
local parent
|
||||||
Size24,Style=Enum.ButtonStyle.RobloxButton,TextColor3=Color3.new(
|
for k, v in pairs(props) do
|
||||||
0.9725490196078431,0.9725490196078431,0.9725490196078431),Text='Yes',ZIndex=5}),
|
if type(k) == "string" then
|
||||||
a('ImageLabel','PopupImage',{BackgroundTransparency=1,Position=UDim2.new(0.5,-
|
if k == "Parent" then
|
||||||
140,0,0),Size=UDim2.new(0,280,0,280),ZIndex=3,a('ImageLabel','Backing',{
|
parent = v
|
||||||
BackgroundTransparency=1,Size=UDim2.new(1,0,1,0),Image=
|
else
|
||||||
'http://www.roblox.com/asset/?id=47574181',ZIndex=2})})})local c=b.AcceptButton
|
obj[k] = v
|
||||||
do local d=b:clone()d.Name='Darken'd.Size=UDim2.new(1,16,1,16)d.Position=UDim2.
|
end
|
||||||
new(0,-8,0,-8)d.ZIndex=1 d.Parent=b end do local d=c:clone()d.Name=
|
elseif type(k) == "number" and type(v) == "userdata" then
|
||||||
'DeclineButton'd.Position=UDim2.new(1,-120,0,270)d.Text='No'd.Parent=b end do
|
v.Parent = obj
|
||||||
local d=c:clone()d.Name='OKButton'd.Text='OK'd.Position=UDim2.new(0.5,-50,0,270)
|
end
|
||||||
d.Visible=false d.Parent=b end return script:remove()
|
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()
|
||||||
|
|
|
||||||
|
|
@ -1,229 +1,757 @@
|
||||||
if game.CoreGui.Version<3 then return end local a a=function(b,c,d)if not(d~=nil
|
if game.CoreGui.Version < 3 then
|
||||||
)then d=c c=nil end local e=Instance.new(b)if c then e.Name=c end local f for g,
|
return
|
||||||
h in pairs(d)do if type(g)=='string'then if g=='Parent'then f=h else e[g]=h end
|
end
|
||||||
elseif type(g)=='number'and type(h)=='userdata'then h.Parent=e end end e.Parent=
|
local New
|
||||||
f return e end local b,c=script.Parent,nil c=function(d,e)while not d:
|
New = function(className, name, props)
|
||||||
FindFirstChild(e)do d.ChildAdded:wait()end end local d d=function(e,f)while not
|
if not (props ~= nil) then
|
||||||
e[f]do e.Changed:wait()end end local e e=function()local f=false pcall(function(
|
props = name
|
||||||
)f=Game:GetService'UserInputService'.TouchEnabled end)return f end local f f=
|
name = nil
|
||||||
function()if b.AbsoluteSize.Y<=320 then return true else return false end end c(
|
end
|
||||||
game,'Players')d(game.Players,'LocalPlayer')local g=a('Frame','CurrentLoadout',{
|
local obj = Instance.new(className)
|
||||||
Position=UDim2.new(0.5,-300,1,-85),Size=UDim2.new(0,600,0,54),
|
if name then
|
||||||
BackgroundTransparency=1,RobloxLocked=true,Parent=b,a('BoolValue','Debounce',{
|
obj.Name = name
|
||||||
RobloxLocked=true}),a('ImageLabel','Background',{Size=UDim2.new(1.2,0,1.2,0),
|
end
|
||||||
Image='http://www.roblox.com/asset/?id=96536002',BackgroundTransparency=1,
|
local parent
|
||||||
Position=UDim2.new(-0.1,0,-0.1,0),ZIndex=0,Visible=false,a('ImageLabel',{Size=
|
for k, v in pairs(props) do
|
||||||
UDim2.new(1,0,0.025,1),Position=UDim2.new(0,0,0,0),Image=
|
if type(k) == "string" then
|
||||||
'http://www.roblox.com/asset/?id=97662207',BackgroundTransparency=1})})})c(b,
|
if k == "Parent" then
|
||||||
'ControlFrame')a('ImageButton','BackpackButton',{RobloxLocked=true,Visible=false
|
parent = v
|
||||||
,BackgroundTransparency=1,Image='http://www.roblox.com/asset/?id=97617958',
|
else
|
||||||
Position=UDim2.new(0.5,-60,1,-108),Size=UDim2.new(0,120,0,18),Parent=b.
|
obj[k] = v
|
||||||
ControlFrame})local h=9 if f()then h=3 g.Size=UDim2.new(0,180,0,54)g.Position=
|
end
|
||||||
UDim2.new(0.5,-90,1,-85)end for i=0,h do local j=a('Frame',{Name='Slot'..
|
elseif type(k) == "number" and type(v) == "userdata" then
|
||||||
tostring(i),RobloxLocked=true,BackgroundColor3=Color3.new(0,0,0),
|
v.Parent = obj
|
||||||
BackgroundTransparency=1,BorderColor3=Color3.new(1,1,1),ZIndex=4,Position=UDim2.
|
end
|
||||||
new((function()if i==0 then return 0.9,0,0,0 else return(i-1)*0.1,(i-1)*6,0,0
|
end
|
||||||
end end)()),Size=UDim2.new(0,54,1,0),Parent=g})if b.AbsoluteSize.Y<=320 then j.
|
obj.Parent = parent
|
||||||
Position=UDim2.new(0,(i-1)*60,0,-50)print('Well got here',j,j.Position.X.Scale,j
|
return obj
|
||||||
.Position.X.Offset)if i==0 then j:Destroy()end end end local i=a('ImageButton',
|
end
|
||||||
'TempSlot',{Active=true,Size=UDim2.new(1,0,1,0),BackgroundTransparency=1,Style=
|
local gui = script.Parent
|
||||||
'Custom',Visible=false,RobloxLocked=true,ZIndex=3,Parent=g,a('ImageLabel',
|
local waitForChild
|
||||||
'Background',{BackgroundTransparency=1,Image=
|
waitForChild = function(instance, name)
|
||||||
'http://www.roblox.com/asset/?id=97613075',Size=UDim2.new(1,0,1,0)}),a(
|
while not instance:FindFirstChild(name) do
|
||||||
'ObjectValue','GearReference',{RobloxLocked=true}),a('TextLabel','ToolTipLabel',
|
instance.ChildAdded:wait()
|
||||||
{RobloxLocked=true,Text='',BackgroundTransparency=0.5,BorderSizePixel=0,Visible=
|
end
|
||||||
false,TextColor3=Color3.new(1,1,1),BackgroundColor3=Color3.new(0,0,0),
|
end
|
||||||
TextStrokeTransparency=0,Font=Enum.Font.ArialBold,FontSize=Enum.FontSize.Size14,
|
local waitForProperty
|
||||||
Size=UDim2.new(1,60,0,20),Position=UDim2.new(0,-30,0,-30)}),a('BoolValue','Kill'
|
waitForProperty = function(instance, property)
|
||||||
,{RobloxLocked=true}),a('TextLabel','GearText',{RobloxLocked=true,
|
while not instance[property] do
|
||||||
BackgroundTransparency=1,Font=Enum.Font.Arial,FontSize=Enum.FontSize.Size14,
|
instance.Changed:wait()
|
||||||
Position=UDim2.new(0,-8,0,-8),Size=UDim2.new(1,16,1,16),Text='',TextColor3=
|
end
|
||||||
Color3.new(1,1,1),TextWrap=true,ZIndex=5}),a('ImageLabel','GearImage',{
|
end
|
||||||
BackgroundTransparency=1,Position=UDim2.new(0,0,0,0),Size=UDim2.new(1,0,1,0),
|
local IsTouchDevice
|
||||||
ZIndex=5,RobloxLocked=true})})local j=a('TextLabel','SlotNumber',{
|
IsTouchDevice = function()
|
||||||
BackgroundTransparency=1,BorderSizePixel=0,Font=Enum.Font.ArialBold,FontSize=
|
local touchEnabled = false
|
||||||
Enum.FontSize.Size18,Position=UDim2.new(0,0,0,0),Size=UDim2.new(0,10,0,15),
|
pcall(function()
|
||||||
TextColor3=Color3.new(1,1,1),TextTransparency=0,TextXAlignment=Enum.
|
touchEnabled = Game:GetService("UserInputService").TouchEnabled
|
||||||
TextXAlignment.Left,TextYAlignment=Enum.TextYAlignment.Bottom,RobloxLocked=true,
|
end)
|
||||||
Parent=i,ZIndex=5})if e()then j.Visible=false end local k do local l=j:Clone()l.
|
return touchEnabled
|
||||||
Name='SlotNumberDownShadow'l.TextColor3=Color3.new(0,0,0)l.Position=UDim2.new(0,
|
end
|
||||||
1,0,-1)l.Parent=i l.ZIndex=2 k=l end do local l=k:Clone()l.Name=
|
local IsPhone
|
||||||
'SlotNumberUpShadow'l.Position=UDim2.new(0,-1,0,-1)l.Parent=i end local l=a(
|
IsPhone = function()
|
||||||
'Frame','Backpack',{RobloxLocked=true,Visible=false,Position=UDim2.new(0.5,0,0.5
|
if gui.AbsoluteSize.Y <= 320 then
|
||||||
,0),BackgroundColor3=Color3.new(0.12549019607843137,0.12549019607843137,
|
return true
|
||||||
0.12549019607843137),BackgroundTransparency=0,BorderSizePixel=0,Parent=b,Active=
|
else
|
||||||
true,a('BoolValue','SwapSlot',{RobloxLocked=true,a('IntValue','Slot',{
|
return false
|
||||||
RobloxLocked=true}),a('ObjectValue','GearButton',{RobloxLocked=true})}),a(
|
end
|
||||||
'Frame','SearchFrame',{RobloxLocked=true,BackgroundTransparency=1,Position=UDim2
|
end
|
||||||
.new(1,-220,0,2),Size=UDim2.new(0,220,0,24),a('ImageButton','SearchButton',{
|
waitForChild(game, "Players")
|
||||||
RobloxLocked=true,Size=UDim2.new(0,25,0,25),BackgroundTransparency=1,Image=
|
waitForProperty(game.Players, "LocalPlayer")
|
||||||
'rbxasset://textures/ui/SearchIcon.png'}),a('TextButton','ResetButton',{
|
local CurrentLoadout = New("Frame", "CurrentLoadout", {
|
||||||
RobloxLocked=true,Visible=false,Position=UDim2.new(1,-26,0,3),Size=UDim2.new(0,
|
Position = UDim2.new(0.5, -300, 1, -85),
|
||||||
20,0,20),Style=Enum.ButtonStyle.RobloxButtonDefault,Text='X',TextColor3=Color3.
|
Size = UDim2.new(0, 600, 0, 54),
|
||||||
new(1,1,1),Font=Enum.Font.ArialBold,FontSize=Enum.FontSize.Size18,ZIndex=3}),a(
|
BackgroundTransparency = 1,
|
||||||
'TextButton','SearchBoxFrame',{RobloxLocked=true,Position=UDim2.new(0,25,0,0),
|
RobloxLocked = true,
|
||||||
Size=UDim2.new(1,-28,0,26),Text='',Style=Enum.ButtonStyle.RobloxButton,a(
|
Parent = gui,
|
||||||
'TextBox','SearchBox',{RobloxLocked=true,BackgroundTransparency=1,Font=Enum.Font
|
New("BoolValue", "Debounce", {
|
||||||
.ArialBold,FontSize=Enum.FontSize.Size12,Position=UDim2.new(0,-5,0,-5),Size=
|
RobloxLocked = true
|
||||||
UDim2.new(1,10,1,10),TextColor3=Color3.new(1,1,1),TextXAlignment=Enum.
|
}),
|
||||||
TextXAlignment.Left,ZIndex=2,TextWrap=true,Text='Search...'})})})})local m=a(
|
New("ImageLabel", "Background", {
|
||||||
'Frame','Tabs',{Visible=false,Active=false,RobloxLocked=true,BackgroundColor3=
|
Size = UDim2.new(1.2, 0, 1.2, 0),
|
||||||
Color3.new(0,0,0),BackgroundTransparency=0.08,BorderSizePixel=0,Position=UDim2.
|
Image = "http://www.roblox.com/asset/?id=96536002",
|
||||||
new(0,0,-0.1,-4),Size=UDim2.new(1,0,0.1,4),Parent=l,a('Frame','TabLine',{
|
BackgroundTransparency = 1,
|
||||||
RobloxLocked=true,BackgroundColor3=Color3.new(0.20784313725490197,
|
Position = UDim2.new(-0.1, 0, -0.1, 0),
|
||||||
0.20784313725490197,0.20784313725490197),BorderSizePixel=0,Position=UDim2.new(0,
|
ZIndex = 0.0,
|
||||||
5,1,-4),Size=UDim2.new(1,-10,0,4),ZIndex=2}),a('TextButton','InventoryButton',{
|
Visible = false,
|
||||||
RobloxLocked=true,Size=UDim2.new(0,60,0,30),Position=UDim2.new(0,7,1,-31),
|
New("ImageLabel", {
|
||||||
BackgroundColor3=Color3.new(1,1,1),BorderColor3=Color3.new(1,1,1),Font=Enum.Font
|
Size = UDim2.new(1, 0, 0.025, 1),
|
||||||
.ArialBold,FontSize=Enum.FontSize.Size18,Text='Gear',AutoButtonColor=false,
|
Position = UDim2.new(0, 0, 0, 0),
|
||||||
TextColor3=Color3.new(0,0,0),Selected=true,Active=true,ZIndex=3}),a('TextButton'
|
Image = "http://www.roblox.com/asset/?id=97662207",
|
||||||
,'CloseButton',{RobloxLocked=true,Font=Enum.Font.ArialBold,FontSize=Enum.
|
BackgroundTransparency = 1
|
||||||
FontSize.Size24,Position=UDim2.new(1,-33,0,4),Size=UDim2.new(0,30,0,30),Style=
|
})
|
||||||
Enum.ButtonStyle.RobloxButton,Text='',TextColor3=Color3.new(1,1,1),Modal=true,a(
|
})
|
||||||
'ImageLabel','XImage',{RobloxLocked=true,Image=(function()game:GetService
|
})
|
||||||
'ContentProvider':Preload'http://www.roblox.com/asset/?id=75547445'return
|
waitForChild(gui, "ControlFrame")
|
||||||
'http://www.roblox.com/asset/?id=75547445'end)(),BackgroundTransparency=1,
|
New("ImageButton", "BackpackButton", {
|
||||||
Position=UDim2.new(-0.25,-1,-0.25,-1),Size=UDim2.new(1.5,2,1.5,2),ZIndex=2})})})
|
RobloxLocked = true,
|
||||||
if game.CoreGui.Version>=8 then a('TextButton','WardrobeButton',{RobloxLocked=
|
Visible = false,
|
||||||
true,Size=UDim2.new(0,90,0,30),Position=UDim2.new(0,77,1,-31),BackgroundColor3=
|
BackgroundTransparency = 1,
|
||||||
Color3.new(0,0,0),BorderColor3=Color3.new(1,1,1),Font=Enum.Font.ArialBold,
|
Image = "http://www.roblox.com/asset/?id=97617958",
|
||||||
FontSize=Enum.FontSize.Size18,Text='Wardrobe',AutoButtonColor=false,TextColor3=
|
Position = UDim2.new(0.5, -60, 1, -108),
|
||||||
Color3.new(1,1,1),Selected=false,Active=true,Parent=m})end local n=a('Frame',
|
Size = UDim2.new(0, 120, 0, 18),
|
||||||
'Gear',{RobloxLocked=true,BackgroundTransparency=1,Size=UDim2.new(1,0,1,0),
|
Parent = gui.ControlFrame
|
||||||
ClipsDescendants=true,Parent=l,a('Frame','AssetsList',{RobloxLocked=true,
|
})
|
||||||
BackgroundTransparency=1,Size=UDim2.new(0.2,0,1,0),Style=Enum.FrameStyle.
|
local NumSlots = 9
|
||||||
RobloxSquare,Visible=false}),a('Frame','GearGrid',{RobloxLocked=true,Size=UDim2.
|
if IsPhone() then
|
||||||
new(0.95,0,1,0),BackgroundTransparency=1,a('ImageButton','GearButton',{
|
NumSlots = 3
|
||||||
RobloxLocked=true,Visible=false,Size=UDim2.new(0,54,0,54),Style='Custom',
|
CurrentLoadout.Size = UDim2.new(0, 180, 0, 54)
|
||||||
BackgroundTransparency=1,a('ImageLabel','Background',{BackgroundTransparency=1,
|
CurrentLoadout.Position = UDim2.new(0.5, -90, 1, -85)
|
||||||
Image='http://www.roblox.com/asset/?id=97613075',Size=UDim2.new(1,0,1,0)}),a(
|
end
|
||||||
'ObjectValue','GearReference',{RobloxLocked=true}),a('Frame','GreyOutButton',{
|
for i = 0, NumSlots do
|
||||||
RobloxLocked=true,BackgroundTransparency=0.5,Size=UDim2.new(1,0,1,0),Active=true
|
local slotFrame = New("Frame", {
|
||||||
,Visible=false,ZIndex=3}),a('TextLabel','GearText',{RobloxLocked=true,
|
Name = "Slot" .. tostring(i),
|
||||||
BackgroundTransparency=1,Font=Enum.Font.Arial,FontSize=Enum.FontSize.Size14,
|
RobloxLocked = true,
|
||||||
Position=UDim2.new(0,-8,0,-8),Size=UDim2.new(1,16,1,16),Text='',ZIndex=2,
|
BackgroundColor3 = Color3.new(0, 0, 0),
|
||||||
TextColor3=Color3.new(1,1,1),TextWrap=true})})})})local o,p=a('Frame',
|
BackgroundTransparency = 1,
|
||||||
'GearGridScrollingArea',{RobloxLocked=true,Position=UDim2.new(1,-19,0,35),Size=
|
BorderColor3 = Color3.new(1, 1, 1),
|
||||||
UDim2.new(0,17,1,-45),BackgroundTransparency=1,Parent=n}),a('Frame',
|
ZIndex = 4.0,
|
||||||
'GearLoadouts',{RobloxLocked=true,BackgroundTransparency=1,Position=UDim2.new(
|
Position = UDim2.new((function()
|
||||||
0.7,23,0.5,1),Size=UDim2.new(0.3,-23,0.5,-1),Parent=n,Visible=false,a('Frame',
|
if i == 0 then
|
||||||
'LoadoutsList',{RobloxLocked=true,Position=UDim2.new(0,0,0.15,2),Size=UDim2.new(
|
return 0.9, 0, 0, 0
|
||||||
1,-17,0.85,-2),Style=Enum.FrameStyle.RobloxSquare}),a('Frame',
|
else
|
||||||
'GearLoadoutsHeader',{RobloxLocked=true,BackgroundColor3=Color3.new(0,0,0),
|
return (i - 1) * 0.1, (i - 1) * 6, 0, 0
|
||||||
BackgroundTransparency=0.2,BorderColor3=Color3.new(1,0,0),Size=UDim2.new(1,2,
|
end
|
||||||
0.15,-1),a('TextLabel','LoadoutsHeaderText',{RobloxLocked=true,
|
end)()),
|
||||||
BackgroundTransparency=1,Font=Enum.Font.ArialBold,FontSize=Enum.FontSize.Size18,
|
Size = UDim2.new(0, 54, 1, 0),
|
||||||
Size=UDim2.new(1,0,1,0),Text='Loadouts',TextColor3=Color3.new(1,1,1)})})})do
|
Parent = CurrentLoadout
|
||||||
local q=o:Clone()q.Name='GearLoadoutsScrollingArea'q.RobloxLocked=true q.
|
})
|
||||||
Position=UDim2.new(1,-15,0.15,2)q.Size=UDim2.new(0,17,0.85,-2)q.Parent=p end
|
if gui.AbsoluteSize.Y <= 320 then
|
||||||
local q,r,s=a('Frame','GearPreview',{RobloxLocked=true,Position=UDim2.new(0.7,23
|
slotFrame.Position = UDim2.new(0, (i - 1) * 60, 0, -50)
|
||||||
,0,0),Size=UDim2.new(0.3,-28,0.5,-1),BackgroundTransparency=1,ZIndex=7,Parent=n,
|
print("Well got here", slotFrame, slotFrame.Position.X.Scale, slotFrame.Position.X.Offset)
|
||||||
a('Frame','GearStats',{RobloxLocked=true,BackgroundTransparency=1,Position=UDim2
|
if i == 0 then
|
||||||
.new(0,0,0.75,0),Size=UDim2.new(1,0,0.25,0),ZIndex=8,a('TextLabel','GearName',{
|
slotFrame:Destroy()
|
||||||
RobloxLocked=true,BackgroundTransparency=1,Font=Enum.Font.ArialBold,FontSize=
|
end
|
||||||
Enum.FontSize.Size18,Position=UDim2.new(0,-3,0,0),Size=UDim2.new(1,6,1,5),Text=
|
end
|
||||||
'',TextColor3=Color3.new(1,1,1),TextWrap=true,ZIndex=9})}),a('ImageLabel',
|
end
|
||||||
'GearImage',{RobloxLocked=true,Image='',BackgroundTransparency=1,Position=UDim2.
|
local TempSlot = New("ImageButton", "TempSlot", {
|
||||||
new(0.125,0,0,0),Size=UDim2.new(0.75,0,0.75,0),ZIndex=8,a('Frame','GearIcons',{
|
Active = true,
|
||||||
BackgroundColor3=Color3.new(0,0,0),BackgroundTransparency=0.5,BorderSizePixel=0,
|
Size = UDim2.new(1, 0, 1, 0),
|
||||||
RobloxLocked=true,Position=UDim2.new(0.4,2,0.85,-2),Size=UDim2.new(0.6,0,0.15,0)
|
BackgroundTransparency = 1,
|
||||||
,Visible=false,ZIndex=9,a('ImageLabel','GenreImage',{RobloxLocked=true,
|
Style = "Custom",
|
||||||
BackgroundColor3=Color3.new(0.4,0.6,1),BackgroundTransparency=0.5,
|
Visible = false,
|
||||||
BorderSizePixel=0,Size=UDim2.new(0.25,0,1,0)})})})}),nil,nil do local t=q.
|
RobloxLocked = true,
|
||||||
GearImage r,s=t.GearIcons,t.GearIcons.GenreImage end do local t=s:Clone()t.Name=
|
ZIndex = 3.0,
|
||||||
'AttributeOneImage't.RobloxLocked=true t.BackgroundColor3=Color3.new(1,0.2,0)t.
|
Parent = CurrentLoadout,
|
||||||
Position=UDim2.new(0.25,0,0,0)t.Parent=r end do local t=s:Clone()t.Name=
|
New("ImageLabel", "Background", {
|
||||||
'AttributeTwoImage't.RobloxLocked=true t.BackgroundColor3=Color3.new(0.6,1,0.6)t
|
BackgroundTransparency = 1,
|
||||||
.Position=UDim2.new(0.5,0,0,0)t.Parent=r end do local t=s:Clone()t.Name=
|
Image = "http://www.roblox.com/asset/?id=97613075",
|
||||||
'AttributeThreeImage't.RobloxLocked=true t.BackgroundColor3=Color3.new(0,0.5,0.5
|
Size = UDim2.new(1, 0, 1, 0)
|
||||||
)t.Position=UDim2.new(0.75,0,0,0)t.Parent=r end if game.CoreGui.Version<8 then
|
}),
|
||||||
script:remove()return end local t t=function(u,v)return a('Frame',tostring(u),{
|
New("ObjectValue", "GearReference", {
|
||||||
RobloxLocked=true,Size=UDim2.new(1,0,1,-70),Position=UDim2.new(0,0,0,20),
|
RobloxLocked = true
|
||||||
BackgroundTransparency=1,Parent=v,Visible=false})end local u u=function(v,w,x,y,
|
}),
|
||||||
z)return a('ImageLabel',tostring(v),{RobloxLocked=true,Image=w,Size=x,
|
New("TextLabel", "ToolTipLabel", {
|
||||||
BackgroundTransparency=1,Position=y,Parent=z})end local v v=function(w,x,y,z,A)
|
RobloxLocked = true,
|
||||||
local B=a('ImageButton',tostring(w),{RobloxLocked=true,Size=x,Position=y})if A
|
Text = "",
|
||||||
then B.Style=A else B.BackgroundColor3=Color3.new(0,0,0)B.BorderColor3=Color3.
|
BackgroundTransparency = 0.5,
|
||||||
new(1,1,1)end B.Parent=z return B end local w w=function(x,y,z,A)return a(
|
BorderSizePixel = 0,
|
||||||
'TextLabel',{Name=x,RobloxLocked=true,BackgroundTransparency=1,Size=UDim2.new(0,
|
Visible = false,
|
||||||
32,0,14),Font=Enum.Font.Arial,TextColor3=Color3.new(1,1,1),FontSize=Enum.
|
TextColor3 = Color3.new(1, 1, 1),
|
||||||
FontSize.Size14,Text=y,Position=z,Parent=A})end local x=a('Frame','Wardrobe',{
|
BackgroundColor3 = Color3.new(0, 0, 0),
|
||||||
RobloxLocked=true,BackgroundTransparency=1,Visible=false,Size=UDim2.new(1,0,1,0)
|
TextStrokeTransparency = 0,
|
||||||
,Parent=l,a('Frame','AssetList',{RobloxLocked=true,Position=UDim2.new(0,4,0,5),
|
Font = Enum.Font.ArialBold,
|
||||||
Size=UDim2.new(0,85,1,-5),BackgroundTransparency=1,Visible=true}),a('TextButton'
|
FontSize = Enum.FontSize.Size14,
|
||||||
,'PreviewButton',{RobloxLocked=true,Text='Rotate',BackgroundColor3=Color3.new(0,
|
Size = UDim2.new(1, 60, 0, 20),
|
||||||
0,0),BackgroundTransparency=0.5,BorderColor3=Color3.new(1,1,1),Position=UDim2.
|
Position = UDim2.new(0, -30, 0, -30)
|
||||||
new(1.2,-62,1,-50),Size=UDim2.new(0,125,0,50),Font=Enum.Font.ArialBold,FontSize=
|
}),
|
||||||
Enum.FontSize.Size24,TextColor3=Color3.new(1,1,1),TextWrapped=true,
|
New("BoolValue", "Kill", {
|
||||||
TextStrokeTransparency=0})})local y=a('Frame','PreviewAssetFrame',{RobloxLocked=
|
RobloxLocked = true
|
||||||
true,BackgroundTransparency=1,Position=UDim2.new(1,-240,0,30),Size=UDim2.new(0,
|
}),
|
||||||
250,0,250),Parent=x})local z=a('TextButton','PreviewAssetBacking',{RobloxLocked=
|
New("TextLabel", "GearText", {
|
||||||
true,Active=false,Text='',AutoButtonColor=false,Size=UDim2.new(1,0,1,0),Style=
|
RobloxLocked = true,
|
||||||
Enum.ButtonStyle.RobloxButton,Visible=false,ZIndex=9,Parent=y,a('ImageLabel',
|
BackgroundTransparency = 1,
|
||||||
'PreviewAssetImage',{RobloxLocked=true,BackgroundTransparency=0.8,Position=UDim2
|
Font = Enum.Font.Arial,
|
||||||
.new(0.5,-100,0,0),Size=UDim2.new(0,200,0,200),BorderSizePixel=0,ZIndex=10})})
|
FontSize = Enum.FontSize.Size14,
|
||||||
local A=a('TextLabel','AssetNameLabel',{RobloxLocked=true,BackgroundTransparency
|
Position = UDim2.new(0, -8, 0, -8),
|
||||||
=1,Position=UDim2.new(0,0,1,-20),Size=UDim2.new(0.5,0,0,24),ZIndex=10,Font=Enum.
|
Size = UDim2.new(1, 16, 1, 16),
|
||||||
Font.Arial,Text='',TextColor3=Color3.new(1,1,1),TextScaled=true,Parent=z})do
|
Text = "",
|
||||||
local B=A:Clone()B.Name='AssetTypeLabel'B.RobloxLocked=true B.TextScaled=false B
|
TextColor3 = Color3.new(1, 1, 1),
|
||||||
.FontSize=Enum.FontSize.Size18 B.Position=UDim2.new(0.5,3,1,-20)B.Parent=z end
|
TextWrap = true,
|
||||||
local B=a('Frame','CharacterPane',{RobloxLocked=true,Position=UDim2.new(1,-220,0
|
ZIndex = 5.0
|
||||||
,32),Size=UDim2.new(0,220,1,-40),BackgroundTransparency=1,Visible=true,Parent=x,
|
}),
|
||||||
a('TextLabel','CategoryLabel',{RobloxLocked=true,BackgroundTransparency=1,Font=
|
New("ImageLabel", "GearImage", {
|
||||||
Enum.Font.ArialBold,FontSize=Enum.FontSize.Size18,Position=UDim2.new(0,0,0,-7),
|
BackgroundTransparency = 1,
|
||||||
Size=UDim2.new(1,0,0,20),TextXAlignment=Enum.TextXAlignment.Center,Text='All',
|
Position = UDim2.new(0, 0, 0, 0),
|
||||||
TextColor3=Color3.new(1,1,1)}),a('TextButton','SaveButton',{RobloxLocked=true,
|
Size = UDim2.new(1, 0, 1, 0),
|
||||||
Size=UDim2.new(0.6,0,0,50),Position=UDim2.new(0.2,0,1,-50),Style=Enum.
|
ZIndex = 5.0,
|
||||||
ButtonStyle.RobloxButton,Selected=false,Font=Enum.Font.ArialBold,FontSize=Enum.
|
RobloxLocked = true
|
||||||
FontSize.Size18,Text='Save',TextColor3=Color3.new(1,1,1)})})local C=t(
|
})
|
||||||
'FacesFrame',B)game:GetService'ContentProvider':Preload
|
})
|
||||||
'http://www.roblox.com/asset/?id=75460621'u('FaceZone',
|
local SlotNumber = New("TextLabel", "SlotNumber", {
|
||||||
'http://www.roblox.com/asset/?id=75460621',UDim2.new(0,157,0,137),UDim2.new(0.5,
|
BackgroundTransparency = 1,
|
||||||
-78,0.5,-68),C)v('Face',UDim2.new(0,64,0,64),UDim2.new(0.5,-32,0.5,-135),C)local
|
BorderSizePixel = 0,
|
||||||
D=t('HeadsFrame',B)u('FaceZone','http://www.roblox.com/asset/?id=75460621',UDim2
|
Font = Enum.Font.ArialBold,
|
||||||
.new(0,157,0,137),UDim2.new(0.5,-78,0.5,-68),D)v('Head',UDim2.new(0,64,0,64),
|
FontSize = Enum.FontSize.Size18,
|
||||||
UDim2.new(0.5,-32,0.5,-135),D)local E=t('HatsFrame',B)game:GetService
|
Position = UDim2.new(0, 0, 0, 0),
|
||||||
'ContentProvider':Preload'http://www.roblox.com/asset/?id=75457888'local F=u(
|
Size = UDim2.new(0, 10, 0, 15),
|
||||||
'HatsZone','http://www.roblox.com/asset/?id=75457888',UDim2.new(0,186,0,184),
|
TextColor3 = Color3.new(1, 1, 1),
|
||||||
UDim2.new(0.5,-93,0.5,-100),E)v('Hat1Button',UDim2.new(0,64,0,64),UDim2.new(0,-1
|
TextTransparency = 0,
|
||||||
,0,-1),F,Enum.ButtonStyle.RobloxButton)v('Hat2Button',UDim2.new(0,64,0,64),UDim2
|
TextXAlignment = Enum.TextXAlignment.Left,
|
||||||
.new(0,63,0,-1),F,Enum.ButtonStyle.RobloxButton)v('Hat3Button',UDim2.new(0,64,0,
|
TextYAlignment = Enum.TextYAlignment.Bottom,
|
||||||
64),UDim2.new(0,127,0,-1),F,Enum.ButtonStyle.RobloxButton)local G=t('PantsFrame'
|
RobloxLocked = true,
|
||||||
,B)game:GetService'ContentProvider':Preload
|
Parent = TempSlot,
|
||||||
'http://www.roblox.com/asset/?id=75457920'u('PantsZone',
|
ZIndex = 5
|
||||||
'http://www.roblox.com/asset/?id=75457920',UDim2.new(0,121,0,99),UDim2.new(0.5,-
|
})
|
||||||
60,0.5,-100),G)local H=a('Frame','PantFrame',{RobloxLocked=true,Size=UDim2.new(0
|
if IsTouchDevice() then
|
||||||
,25,0,56),Position=UDim2.new(0.5,-26,0.5,0),BackgroundColor3=Color3.new(0,0,0),
|
SlotNumber.Visible = false
|
||||||
BorderColor3=Color3.new(1,1,1),Parent=G})do local I=H:Clone()I.Position=UDim2.
|
end
|
||||||
new(0.5,3,0.5,0)I.RobloxLocked=true I.Parent=G end a('ImageButton',
|
local SlotNumberDownShadow
|
||||||
'CurrentPants',{RobloxLocked=true,BackgroundTransparency=1,ZIndex=2,Position=
|
do
|
||||||
UDim2.new(0.5,-31,0.5,-4),Size=UDim2.new(0,54,0,59),Parent=G})local I=t(
|
local _with_0 = SlotNumber:Clone()
|
||||||
'PackagesFrame',B)local J=v('TorsoMeshButton',UDim2.new(0,64,0,64),UDim2.new(0.5
|
_with_0.Name = "SlotNumberDownShadow"
|
||||||
,-32,0.5,-110),I,Enum.ButtonStyle.RobloxButton)w('TorsoLabel','Torso',UDim2.new(
|
_with_0.TextColor3 = Color3.new(0, 0, 0)
|
||||||
0.5,-16,0,-25),J)local K=v('LeftLegMeshButton',UDim2.new(0,64,0,64),UDim2.new(
|
_with_0.Position = UDim2.new(0, 1, 0, -1)
|
||||||
0.5,0,0.5,-25),I,Enum.ButtonStyle.RobloxButton)w('LeftLegLabel','Left Leg',UDim2
|
_with_0.Parent = TempSlot
|
||||||
.new(0.5,-16,0,-25),K)local L=v('RightLegMeshButton',UDim2.new(0,64,0,64),UDim2.
|
_with_0.ZIndex = 2
|
||||||
new(0.5,-64,0.5,-25),I,Enum.ButtonStyle.RobloxButton)w('RightLegLabel',
|
SlotNumberDownShadow = _with_0
|
||||||
'Right Leg',UDim2.new(0.5,-16,0,-25),L)local M=v('RightArmMeshButton',UDim2.new(
|
end
|
||||||
0,64,0,64),UDim2.new(0.5,-96,0.5,-110),I,Enum.ButtonStyle.RobloxButton)w(
|
do
|
||||||
'RightArmLabel','Right Arm',UDim2.new(0.5,-16,0,-25),M)local N=v(
|
local _with_0 = SlotNumberDownShadow:Clone()
|
||||||
'LeftArmMeshButton',UDim2.new(0,64,0,64),UDim2.new(0.5,32,0.5,-110),I,Enum.
|
_with_0.Name = "SlotNumberUpShadow"
|
||||||
ButtonStyle.RobloxButton)w('LeftArmLabel','Left Arm',UDim2.new(0.5,-16,0,-25),N)
|
_with_0.Position = UDim2.new(0, -1, 0, -1)
|
||||||
local O=t('T-ShirtsFrame',B)game:GetService'ContentProvider':Preload
|
_with_0.Parent = TempSlot
|
||||||
'http://www.roblox.com/asset/?id=75460642'u('TShirtZone',
|
end
|
||||||
'http://www.roblox.com/asset/?id=75460642',UDim2.new(0,121,0,154),UDim2.new(0.5,
|
local Backpack = New("Frame", "Backpack", {
|
||||||
-60,0.5,-100),O)v('TShirtButton',UDim2.new(0,64,0,64),UDim2.new(0.5,-32,0.5,-64)
|
RobloxLocked = true,
|
||||||
,O)local P=t('ShirtsFrame',B)u('ShirtZone',
|
Visible = false,
|
||||||
'http://www.roblox.com/asset/?id=75460642',UDim2.new(0,121,0,154),UDim2.new(0.5,
|
Position = UDim2.new(0.5, 0, 0.5, 0),
|
||||||
-60,0.5,-100),P)v('ShirtButton',UDim2.new(0,64,0,64),UDim2.new(0.5,-32,0.5,-64),
|
BackgroundColor3 = Color3.new(32 / 255, 32 / 255, 32 / 255),
|
||||||
P)local Q=t('ColorFrame',B)game:GetService'ContentProvider':Preload
|
BackgroundTransparency = 0.0,
|
||||||
'http://www.roblox.com/asset/?id=76049888'local R=u('ColorZone',
|
BorderSizePixel = 0,
|
||||||
'http://www.roblox.com/asset/?id=76049888',UDim2.new(0,120,0,150),UDim2.new(0.5,
|
Parent = gui,
|
||||||
-60,0.5,-100),Q)v('Head',UDim2.new(0.26,0,0.19,0),UDim2.new(0.37,0,0.02,0),R).
|
Active = true,
|
||||||
AutoButtonColor=false v('LeftArm',UDim2.new(0.19,0,0.36,0),UDim2.new(0.78,0,0.26
|
New("BoolValue", "SwapSlot", {
|
||||||
,0),R).AutoButtonColor=false v('RightArm',UDim2.new(0.19,0,0.36,0),UDim2.new(
|
RobloxLocked = true,
|
||||||
0.025,0,0.26,0),R).AutoButtonColor=false v('Torso',UDim2.new(0.43,0,0.36,0),
|
New("IntValue", "Slot", {
|
||||||
UDim2.new(0.28,0,0.26,0),R).AutoButtonColor=false v('RightLeg',UDim2.new(0.19,0,
|
RobloxLocked = true
|
||||||
0.31,0),UDim2.new(0.275,0,0.67,0),R).AutoButtonColor=false v('LeftLeg',UDim2.
|
}),
|
||||||
new(0.19,0,0.31,0),UDim2.new(0.525,0,0.67,0),R).AutoButtonColor=false return
|
New("ObjectValue", "GearButton", {
|
||||||
script:Destroy()
|
RobloxLocked = true
|
||||||
|
})
|
||||||
|
}),
|
||||||
|
New("Frame", "SearchFrame", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Position = UDim2.new(1, -220, 0, 2),
|
||||||
|
Size = UDim2.new(0, 220, 0, 24),
|
||||||
|
New("ImageButton", "SearchButton", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
Size = UDim2.new(0, 25, 0, 25),
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Image = "rbxasset://textures/ui/SearchIcon.png"
|
||||||
|
}),
|
||||||
|
New("TextButton", "ResetButton", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
Visible = false,
|
||||||
|
Position = UDim2.new(1, -26, 0, 3),
|
||||||
|
Size = UDim2.new(0, 20, 0, 20),
|
||||||
|
Style = Enum.ButtonStyle.RobloxButtonDefault,
|
||||||
|
Text = "X",
|
||||||
|
TextColor3 = Color3.new(1, 1, 1),
|
||||||
|
Font = Enum.Font.ArialBold,
|
||||||
|
FontSize = Enum.FontSize.Size18,
|
||||||
|
ZIndex = 3
|
||||||
|
}),
|
||||||
|
New("TextButton", "SearchBoxFrame", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
Position = UDim2.new(0, 25, 0, 0),
|
||||||
|
Size = UDim2.new(1, -28, 0, 26),
|
||||||
|
Text = "",
|
||||||
|
Style = Enum.ButtonStyle.RobloxButton,
|
||||||
|
New("TextBox", "SearchBox", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Font = Enum.Font.ArialBold,
|
||||||
|
FontSize = Enum.FontSize.Size12,
|
||||||
|
Position = UDim2.new(0, -5, 0, -5),
|
||||||
|
Size = UDim2.new(1, 10, 1, 10),
|
||||||
|
TextColor3 = Color3.new(1, 1, 1),
|
||||||
|
TextXAlignment = Enum.TextXAlignment.Left,
|
||||||
|
ZIndex = 2,
|
||||||
|
TextWrap = true,
|
||||||
|
Text = "Search..."
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
local Tabs = New("Frame", "Tabs", {
|
||||||
|
Visible = false,
|
||||||
|
Active = false,
|
||||||
|
RobloxLocked = true,
|
||||||
|
BackgroundColor3 = Color3.new(0, 0, 0),
|
||||||
|
BackgroundTransparency = 0.08,
|
||||||
|
BorderSizePixel = 0,
|
||||||
|
Position = UDim2.new(0, 0, -0.1, -4),
|
||||||
|
Size = UDim2.new(1, 0, 0.1, 4),
|
||||||
|
Parent = Backpack,
|
||||||
|
New("Frame", "TabLine", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
BackgroundColor3 = Color3.new(53 / 255, 53 / 255, 53 / 255),
|
||||||
|
BorderSizePixel = 0,
|
||||||
|
Position = UDim2.new(0, 5, 1, -4),
|
||||||
|
Size = UDim2.new(1, -10, 0, 4),
|
||||||
|
ZIndex = 2
|
||||||
|
}),
|
||||||
|
New("TextButton", "InventoryButton", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
Size = UDim2.new(0, 60, 0, 30),
|
||||||
|
Position = UDim2.new(0, 7, 1, -31),
|
||||||
|
BackgroundColor3 = Color3.new(1, 1, 1),
|
||||||
|
BorderColor3 = Color3.new(1, 1, 1),
|
||||||
|
Font = Enum.Font.ArialBold,
|
||||||
|
FontSize = Enum.FontSize.Size18,
|
||||||
|
Text = "Gear",
|
||||||
|
AutoButtonColor = false,
|
||||||
|
TextColor3 = Color3.new(0, 0, 0),
|
||||||
|
Selected = true,
|
||||||
|
Active = true,
|
||||||
|
ZIndex = 3
|
||||||
|
}),
|
||||||
|
New("TextButton", "CloseButton", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
Font = Enum.Font.ArialBold,
|
||||||
|
FontSize = Enum.FontSize.Size24,
|
||||||
|
Position = UDim2.new(1, -33, 0, 4),
|
||||||
|
Size = UDim2.new(0, 30, 0, 30),
|
||||||
|
Style = Enum.ButtonStyle.RobloxButton,
|
||||||
|
Text = "",
|
||||||
|
TextColor3 = Color3.new(1, 1, 1),
|
||||||
|
Modal = true,
|
||||||
|
New("ImageLabel", "XImage", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
Image = (function()
|
||||||
|
game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=75547445")
|
||||||
|
return "http://www.roblox.com/asset/?id=75547445"
|
||||||
|
end)(),
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Position = UDim2.new(-0.25, -1, -0.25, -1),
|
||||||
|
Size = UDim2.new(1.5, 2, 1.5, 2),
|
||||||
|
ZIndex = 2
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
if game.CoreGui.Version >= 8 then
|
||||||
|
New("TextButton", "WardrobeButton", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
Size = UDim2.new(0, 90, 0, 30),
|
||||||
|
Position = UDim2.new(0, 77, 1, -31),
|
||||||
|
BackgroundColor3 = Color3.new(0, 0, 0),
|
||||||
|
BorderColor3 = Color3.new(1, 1, 1),
|
||||||
|
Font = Enum.Font.ArialBold,
|
||||||
|
FontSize = Enum.FontSize.Size18,
|
||||||
|
Text = "Wardrobe",
|
||||||
|
AutoButtonColor = false,
|
||||||
|
TextColor3 = Color3.new(1, 1, 1),
|
||||||
|
Selected = false,
|
||||||
|
Active = true,
|
||||||
|
Parent = Tabs
|
||||||
|
})
|
||||||
|
end
|
||||||
|
local Gear = New("Frame", "Gear", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Size = UDim2.new(1, 0, 1, 0),
|
||||||
|
ClipsDescendants = true,
|
||||||
|
Parent = Backpack,
|
||||||
|
New("Frame", "AssetsList", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Size = UDim2.new(0.2, 0, 1, 0),
|
||||||
|
Style = Enum.FrameStyle.RobloxSquare,
|
||||||
|
Visible = false
|
||||||
|
}),
|
||||||
|
New("Frame", "GearGrid", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
Size = UDim2.new(0.95, 0, 1, 0),
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
New("ImageButton", "GearButton", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
Visible = false,
|
||||||
|
Size = UDim2.new(0, 54, 0, 54),
|
||||||
|
Style = "Custom",
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
New("ImageLabel", "Background", {
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Image = "http://www.roblox.com/asset/?id=97613075",
|
||||||
|
Size = UDim2.new(1, 0, 1, 0)
|
||||||
|
}),
|
||||||
|
New("ObjectValue", "GearReference", {
|
||||||
|
RobloxLocked = true
|
||||||
|
}),
|
||||||
|
New("Frame", "GreyOutButton", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
BackgroundTransparency = 0.5,
|
||||||
|
Size = UDim2.new(1, 0, 1, 0),
|
||||||
|
Active = true,
|
||||||
|
Visible = false,
|
||||||
|
ZIndex = 3
|
||||||
|
}),
|
||||||
|
New("TextLabel", "GearText", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Font = Enum.Font.Arial,
|
||||||
|
FontSize = Enum.FontSize.Size14,
|
||||||
|
Position = UDim2.new(0, -8, 0, -8),
|
||||||
|
Size = UDim2.new(1, 16, 1, 16),
|
||||||
|
Text = "",
|
||||||
|
ZIndex = 2,
|
||||||
|
TextColor3 = Color3.new(1, 1, 1),
|
||||||
|
TextWrap = true
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
local GearGridScrollingArea = New("Frame", "GearGridScrollingArea", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
Position = UDim2.new(1, -19, 0, 35),
|
||||||
|
Size = UDim2.new(0, 17, 1, -45),
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Parent = Gear
|
||||||
|
})
|
||||||
|
local GearLoadouts = New("Frame", "GearLoadouts", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Position = UDim2.new(0.7, 23, 0.5, 1),
|
||||||
|
Size = UDim2.new(0.3, -23, 0.5, -1),
|
||||||
|
Parent = Gear,
|
||||||
|
Visible = false,
|
||||||
|
New("Frame", "LoadoutsList", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
Position = UDim2.new(0, 0, 0.15, 2),
|
||||||
|
Size = UDim2.new(1, -17, 0.85, -2),
|
||||||
|
Style = Enum.FrameStyle.RobloxSquare
|
||||||
|
}),
|
||||||
|
New("Frame", "GearLoadoutsHeader", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
BackgroundColor3 = Color3.new(0, 0, 0),
|
||||||
|
BackgroundTransparency = 0.2,
|
||||||
|
BorderColor3 = Color3.new(1, 0, 0),
|
||||||
|
Size = UDim2.new(1, 2, 0.15, -1),
|
||||||
|
New("TextLabel", "LoadoutsHeaderText", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Font = Enum.Font.ArialBold,
|
||||||
|
FontSize = Enum.FontSize.Size18,
|
||||||
|
Size = UDim2.new(1, 0, 1, 0),
|
||||||
|
Text = "Loadouts",
|
||||||
|
TextColor3 = Color3.new(1, 1, 1)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
do
|
||||||
|
local _with_0 = GearGridScrollingArea:Clone()
|
||||||
|
_with_0.Name = "GearLoadoutsScrollingArea"
|
||||||
|
_with_0.RobloxLocked = true
|
||||||
|
_with_0.Position = UDim2.new(1, -15, 0.15, 2)
|
||||||
|
_with_0.Size = UDim2.new(0, 17, 0.85, -2)
|
||||||
|
_with_0.Parent = GearLoadouts
|
||||||
|
end
|
||||||
|
local GearPreview = New("Frame", "GearPreview", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
Position = UDim2.new(0.7, 23, 0, 0),
|
||||||
|
Size = UDim2.new(0.3, -28, 0.5, -1),
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
ZIndex = 7,
|
||||||
|
Parent = Gear,
|
||||||
|
New("Frame", "GearStats", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Position = UDim2.new(0, 0, 0.75, 0),
|
||||||
|
Size = UDim2.new(1, 0, 0.25, 0),
|
||||||
|
ZIndex = 8,
|
||||||
|
New("TextLabel", "GearName", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Font = Enum.Font.ArialBold,
|
||||||
|
FontSize = Enum.FontSize.Size18,
|
||||||
|
Position = UDim2.new(0, -3, 0, 0),
|
||||||
|
Size = UDim2.new(1, 6, 1, 5),
|
||||||
|
Text = "",
|
||||||
|
TextColor3 = Color3.new(1, 1, 1),
|
||||||
|
TextWrap = true,
|
||||||
|
ZIndex = 9
|
||||||
|
})
|
||||||
|
}),
|
||||||
|
New("ImageLabel", "GearImage", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
Image = "",
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Position = UDim2.new(0.125, 0, 0, 0),
|
||||||
|
Size = UDim2.new(0.75, 0, 0.75, 0),
|
||||||
|
ZIndex = 8,
|
||||||
|
New("Frame", "GearIcons", {
|
||||||
|
BackgroundColor3 = Color3.new(0, 0, 0),
|
||||||
|
BackgroundTransparency = 0.5,
|
||||||
|
BorderSizePixel = 0,
|
||||||
|
RobloxLocked = true,
|
||||||
|
Position = UDim2.new(0.4, 2, 0.85, -2),
|
||||||
|
Size = UDim2.new(0.6, 0, 0.15, 0),
|
||||||
|
Visible = false,
|
||||||
|
ZIndex = 9,
|
||||||
|
New("ImageLabel", "GenreImage", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
BackgroundColor3 = Color3.new(102 / 255, 153 / 255, 1),
|
||||||
|
BackgroundTransparency = 0.5,
|
||||||
|
BorderSizePixel = 0,
|
||||||
|
Size = UDim2.new(0.25, 0, 1, 0)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
local GearIcons, GenreImage
|
||||||
|
do
|
||||||
|
local _obj_0 = GearPreview.GearImage
|
||||||
|
GearIcons, GenreImage = _obj_0.GearIcons, _obj_0.GearIcons.GenreImage
|
||||||
|
end
|
||||||
|
do
|
||||||
|
local _with_0 = GenreImage:Clone()
|
||||||
|
_with_0.Name = "AttributeOneImage"
|
||||||
|
_with_0.RobloxLocked = true
|
||||||
|
_with_0.BackgroundColor3 = Color3.new(1, 51 / 255, 0)
|
||||||
|
_with_0.Position = UDim2.new(0.25, 0, 0, 0)
|
||||||
|
_with_0.Parent = GearIcons
|
||||||
|
end
|
||||||
|
do
|
||||||
|
local _with_0 = GenreImage:Clone()
|
||||||
|
_with_0.Name = "AttributeTwoImage"
|
||||||
|
_with_0.RobloxLocked = true
|
||||||
|
_with_0.BackgroundColor3 = Color3.new(153 / 255, 1, 153 / 255)
|
||||||
|
_with_0.Position = UDim2.new(0.5, 0, 0, 0)
|
||||||
|
_with_0.Parent = GearIcons
|
||||||
|
end
|
||||||
|
do
|
||||||
|
local _with_0 = GenreImage:Clone()
|
||||||
|
_with_0.Name = "AttributeThreeImage"
|
||||||
|
_with_0.RobloxLocked = true
|
||||||
|
_with_0.BackgroundColor3 = Color3.new(0, 0.5, 0.5)
|
||||||
|
_with_0.Position = UDim2.new(0.75, 0, 0, 0)
|
||||||
|
_with_0.Parent = GearIcons
|
||||||
|
end
|
||||||
|
if game.CoreGui.Version < 8 then
|
||||||
|
script:remove()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local makeCharFrame
|
||||||
|
makeCharFrame = function(frameName, parent)
|
||||||
|
return New("Frame", tostring(frameName), {
|
||||||
|
RobloxLocked = true,
|
||||||
|
Size = UDim2.new(1, 0, 1, -70),
|
||||||
|
Position = UDim2.new(0, 0, 0, 20),
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Parent = parent,
|
||||||
|
Visible = false
|
||||||
|
})
|
||||||
|
end
|
||||||
|
local makeZone
|
||||||
|
makeZone = function(zoneName, image, size, position, parent)
|
||||||
|
return New("ImageLabel", tostring(zoneName), {
|
||||||
|
RobloxLocked = true,
|
||||||
|
Image = image,
|
||||||
|
Size = size,
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Position = position,
|
||||||
|
Parent = parent
|
||||||
|
})
|
||||||
|
end
|
||||||
|
local makeStyledButton
|
||||||
|
makeStyledButton = function(buttonName, size, position, parent, buttonStyle)
|
||||||
|
local button = New("ImageButton", tostring(buttonName), {
|
||||||
|
RobloxLocked = true,
|
||||||
|
Size = size,
|
||||||
|
Position = position
|
||||||
|
})
|
||||||
|
if buttonStyle then
|
||||||
|
button.Style = buttonStyle
|
||||||
|
else
|
||||||
|
button.BackgroundColor3 = Color3.new(0, 0, 0)
|
||||||
|
button.BorderColor3 = Color3.new(1, 1, 1)
|
||||||
|
end
|
||||||
|
button.Parent = parent
|
||||||
|
return button
|
||||||
|
end
|
||||||
|
local makeTextLabel
|
||||||
|
makeTextLabel = function(TextLabelName, text, position, parent)
|
||||||
|
return New("TextLabel", {
|
||||||
|
Name = TextLabelName,
|
||||||
|
RobloxLocked = true,
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Size = UDim2.new(0, 32, 0, 14),
|
||||||
|
Font = Enum.Font.Arial,
|
||||||
|
TextColor3 = Color3.new(1, 1, 1),
|
||||||
|
FontSize = Enum.FontSize.Size14,
|
||||||
|
Text = text,
|
||||||
|
Position = position,
|
||||||
|
Parent = parent
|
||||||
|
})
|
||||||
|
end
|
||||||
|
local Wardrobe = New("Frame", "Wardrobe", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Visible = false,
|
||||||
|
Size = UDim2.new(1, 0, 1, 0),
|
||||||
|
Parent = Backpack,
|
||||||
|
New("Frame", "AssetList", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
Position = UDim2.new(0, 4, 0, 5),
|
||||||
|
Size = UDim2.new(0, 85, 1, -5),
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Visible = true
|
||||||
|
}),
|
||||||
|
New("TextButton", "PreviewButton", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
Text = "Rotate",
|
||||||
|
BackgroundColor3 = Color3.new(0, 0, 0),
|
||||||
|
BackgroundTransparency = 0.5,
|
||||||
|
BorderColor3 = Color3.new(1, 1, 1),
|
||||||
|
Position = UDim2.new(1.2, -62, 1, -50),
|
||||||
|
Size = UDim2.new(0, 125, 0, 50),
|
||||||
|
Font = Enum.Font.ArialBold,
|
||||||
|
FontSize = Enum.FontSize.Size24,
|
||||||
|
TextColor3 = Color3.new(1, 1, 1),
|
||||||
|
TextWrapped = true,
|
||||||
|
TextStrokeTransparency = 0
|
||||||
|
})
|
||||||
|
})
|
||||||
|
local PreviewAssetFrame = New("Frame", "PreviewAssetFrame", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Position = UDim2.new(1, -240, 0, 30),
|
||||||
|
Size = UDim2.new(0, 250, 0, 250),
|
||||||
|
Parent = Wardrobe
|
||||||
|
})
|
||||||
|
local PreviewAssetBacking = New("TextButton", "PreviewAssetBacking", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
Active = false,
|
||||||
|
Text = "",
|
||||||
|
AutoButtonColor = false,
|
||||||
|
Size = UDim2.new(1, 0, 1, 0),
|
||||||
|
Style = Enum.ButtonStyle.RobloxButton,
|
||||||
|
Visible = false,
|
||||||
|
ZIndex = 9,
|
||||||
|
Parent = PreviewAssetFrame,
|
||||||
|
New("ImageLabel", "PreviewAssetImage", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
BackgroundTransparency = 0.8,
|
||||||
|
Position = UDim2.new(0.5, -100, 0, 0),
|
||||||
|
Size = UDim2.new(0, 200, 0, 200),
|
||||||
|
BorderSizePixel = 0,
|
||||||
|
ZIndex = 10
|
||||||
|
})
|
||||||
|
})
|
||||||
|
local AssetNameLabel = New("TextLabel", "AssetNameLabel", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Position = UDim2.new(0, 0, 1, -20),
|
||||||
|
Size = UDim2.new(0.5, 0, 0, 24),
|
||||||
|
ZIndex = 10,
|
||||||
|
Font = Enum.Font.Arial,
|
||||||
|
Text = "",
|
||||||
|
TextColor3 = Color3.new(1, 1, 1),
|
||||||
|
TextScaled = true,
|
||||||
|
Parent = PreviewAssetBacking
|
||||||
|
})
|
||||||
|
do
|
||||||
|
local _with_0 = AssetNameLabel:Clone()
|
||||||
|
_with_0.Name = "AssetTypeLabel"
|
||||||
|
_with_0.RobloxLocked = true
|
||||||
|
_with_0.TextScaled = false
|
||||||
|
_with_0.FontSize = Enum.FontSize.Size18
|
||||||
|
_with_0.Position = UDim2.new(0.5, 3, 1, -20)
|
||||||
|
_with_0.Parent = PreviewAssetBacking
|
||||||
|
end
|
||||||
|
local CharacterPane = New("Frame", "CharacterPane", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
Position = UDim2.new(1, -220, 0, 32),
|
||||||
|
Size = UDim2.new(0, 220, 1, -40),
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Visible = true,
|
||||||
|
Parent = Wardrobe,
|
||||||
|
New("TextLabel", "CategoryLabel", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
Font = Enum.Font.ArialBold,
|
||||||
|
FontSize = Enum.FontSize.Size18,
|
||||||
|
Position = UDim2.new(0, 0, 0, -7),
|
||||||
|
Size = UDim2.new(1, 0, 0, 20),
|
||||||
|
TextXAlignment = Enum.TextXAlignment.Center,
|
||||||
|
Text = "All",
|
||||||
|
TextColor3 = Color3.new(1, 1, 1)
|
||||||
|
}),
|
||||||
|
New("TextButton", "SaveButton", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
Size = UDim2.new(0.6, 0, 0, 50),
|
||||||
|
Position = UDim2.new(0.2, 0, 1, -50),
|
||||||
|
Style = Enum.ButtonStyle.RobloxButton,
|
||||||
|
Selected = false,
|
||||||
|
Font = Enum.Font.ArialBold,
|
||||||
|
FontSize = Enum.FontSize.Size18,
|
||||||
|
Text = "Save",
|
||||||
|
TextColor3 = Color3.new(1, 1, 1)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
local FaceFrame = makeCharFrame("FacesFrame", CharacterPane)
|
||||||
|
game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=75460621")
|
||||||
|
makeZone("FaceZone", "http://www.roblox.com/asset/?id=75460621", UDim2.new(0, 157, 0, 137), UDim2.new(0.5, -78, 0.5, -68), FaceFrame)
|
||||||
|
makeStyledButton("Face", UDim2.new(0, 64, 0, 64), UDim2.new(0.5, -32, 0.5, -135), FaceFrame)
|
||||||
|
local HeadFrame = makeCharFrame("HeadsFrame", CharacterPane)
|
||||||
|
makeZone("FaceZone", "http://www.roblox.com/asset/?id=75460621", UDim2.new(0, 157, 0, 137), UDim2.new(0.5, -78, 0.5, -68), HeadFrame)
|
||||||
|
makeStyledButton("Head", UDim2.new(0, 64, 0, 64), UDim2.new(0.5, -32, 0.5, -135), HeadFrame)
|
||||||
|
local HatsFrame = makeCharFrame("HatsFrame", CharacterPane)
|
||||||
|
game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=75457888")
|
||||||
|
local HatsZone = makeZone("HatsZone", "http://www.roblox.com/asset/?id=75457888", UDim2.new(0, 186, 0, 184), UDim2.new(0.5, -93, 0.5, -100), HatsFrame)
|
||||||
|
makeStyledButton("Hat1Button", UDim2.new(0, 64, 0, 64), UDim2.new(0, -1, 0, -1), HatsZone, Enum.ButtonStyle.RobloxButton)
|
||||||
|
makeStyledButton("Hat2Button", UDim2.new(0, 64, 0, 64), UDim2.new(0, 63, 0, -1), HatsZone, Enum.ButtonStyle.RobloxButton)
|
||||||
|
makeStyledButton("Hat3Button", UDim2.new(0, 64, 0, 64), UDim2.new(0, 127, 0, -1), HatsZone, Enum.ButtonStyle.RobloxButton)
|
||||||
|
local PantsFrame = makeCharFrame("PantsFrame", CharacterPane)
|
||||||
|
game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=75457920")
|
||||||
|
makeZone("PantsZone", "http://www.roblox.com/asset/?id=75457920", UDim2.new(0, 121, 0, 99), UDim2.new(0.5, -60, 0.5, -100), PantsFrame)
|
||||||
|
local pantFrame = New("Frame", "PantFrame", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
Size = UDim2.new(0, 25, 0, 56),
|
||||||
|
Position = UDim2.new(0.5, -26, 0.5, 0),
|
||||||
|
BackgroundColor3 = Color3.new(0, 0, 0),
|
||||||
|
BorderColor3 = Color3.new(1, 1, 1),
|
||||||
|
Parent = PantsFrame
|
||||||
|
})
|
||||||
|
do
|
||||||
|
local _with_0 = pantFrame:Clone()
|
||||||
|
_with_0.Position = UDim2.new(0.5, 3, 0.5, 0)
|
||||||
|
_with_0.RobloxLocked = true
|
||||||
|
_with_0.Parent = PantsFrame
|
||||||
|
end
|
||||||
|
New("ImageButton", "CurrentPants", {
|
||||||
|
RobloxLocked = true,
|
||||||
|
BackgroundTransparency = 1,
|
||||||
|
ZIndex = 2,
|
||||||
|
Position = UDim2.new(0.5, -31, 0.5, -4),
|
||||||
|
Size = UDim2.new(0, 54, 0, 59),
|
||||||
|
Parent = PantsFrame
|
||||||
|
})
|
||||||
|
local MeshFrame = makeCharFrame("PackagesFrame", CharacterPane)
|
||||||
|
local torsoButton = makeStyledButton("TorsoMeshButton", UDim2.new(0, 64, 0, 64), UDim2.new(0.5, -32, 0.5, -110), MeshFrame, Enum.ButtonStyle.RobloxButton)
|
||||||
|
makeTextLabel("TorsoLabel", "Torso", UDim2.new(0.5, -16, 0, -25), torsoButton)
|
||||||
|
local leftLegButton = makeStyledButton("LeftLegMeshButton", UDim2.new(0, 64, 0, 64), UDim2.new(0.5, 0, 0.5, -25), MeshFrame, Enum.ButtonStyle.RobloxButton)
|
||||||
|
makeTextLabel("LeftLegLabel", "Left Leg", UDim2.new(0.5, -16, 0, -25), leftLegButton)
|
||||||
|
local rightLegButton = makeStyledButton("RightLegMeshButton", UDim2.new(0, 64, 0, 64), UDim2.new(0.5, -64, 0.5, -25), MeshFrame, Enum.ButtonStyle.RobloxButton)
|
||||||
|
makeTextLabel("RightLegLabel", "Right Leg", UDim2.new(0.5, -16, 0, -25), rightLegButton)
|
||||||
|
local rightArmButton = makeStyledButton("RightArmMeshButton", UDim2.new(0, 64, 0, 64), UDim2.new(0.5, -96, 0.5, -110), MeshFrame, Enum.ButtonStyle.RobloxButton)
|
||||||
|
makeTextLabel("RightArmLabel", "Right Arm", UDim2.new(0.5, -16, 0, -25), rightArmButton)
|
||||||
|
local leftArmButton = makeStyledButton("LeftArmMeshButton", UDim2.new(0, 64, 0, 64), UDim2.new(0.5, 32, 0.5, -110), MeshFrame, Enum.ButtonStyle.RobloxButton)
|
||||||
|
makeTextLabel("LeftArmLabel", "Left Arm", UDim2.new(0.5, -16, 0, -25), leftArmButton)
|
||||||
|
local TShirtFrame = makeCharFrame("T-ShirtsFrame", CharacterPane)
|
||||||
|
game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=75460642")
|
||||||
|
makeZone("TShirtZone", "http://www.roblox.com/asset/?id=75460642", UDim2.new(0, 121, 0, 154), UDim2.new(0.5, -60, 0.5, -100), TShirtFrame)
|
||||||
|
makeStyledButton("TShirtButton", UDim2.new(0, 64, 0, 64), UDim2.new(0.5, -32, 0.5, -64), TShirtFrame)
|
||||||
|
local ShirtFrame = makeCharFrame("ShirtsFrame", CharacterPane)
|
||||||
|
makeZone("ShirtZone", "http://www.roblox.com/asset/?id=75460642", UDim2.new(0, 121, 0, 154), UDim2.new(0.5, -60, 0.5, -100), ShirtFrame)
|
||||||
|
makeStyledButton("ShirtButton", UDim2.new(0, 64, 0, 64), UDim2.new(0.5, -32, 0.5, -64), ShirtFrame)
|
||||||
|
local ColorFrame = makeCharFrame("ColorFrame", CharacterPane)
|
||||||
|
game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=76049888")
|
||||||
|
local ColorZone = makeZone("ColorZone", "http://www.roblox.com/asset/?id=76049888", UDim2.new(0, 120, 0, 150), UDim2.new(0.5, -60, 0.5, -100), ColorFrame)
|
||||||
|
makeStyledButton("Head", UDim2.new(0.26, 0, 0.19, 0), UDim2.new(0.37, 0, 0.02, 0), ColorZone).AutoButtonColor = false
|
||||||
|
makeStyledButton("LeftArm", UDim2.new(0.19, 0, 0.36, 0), UDim2.new(0.78, 0, 0.26, 0), ColorZone).AutoButtonColor = false
|
||||||
|
makeStyledButton("RightArm", UDim2.new(0.19, 0, 0.36, 0), UDim2.new(0.025, 0, 0.26, 0), ColorZone).AutoButtonColor = false
|
||||||
|
makeStyledButton("Torso", UDim2.new(0.43, 0, 0.36, 0), UDim2.new(0.28, 0, 0.26, 0), ColorZone).AutoButtonColor = false
|
||||||
|
makeStyledButton("RightLeg", UDim2.new(0.19, 0, 0.31, 0), UDim2.new(0.275, 0, 0.67, 0), ColorZone).AutoButtonColor = false
|
||||||
|
makeStyledButton("LeftLeg", UDim2.new(0.19, 0, 0.31, 0), UDim2.new(0.525, 0, 0.67, 0), ColorZone).AutoButtonColor = false
|
||||||
|
return script:Destroy()
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,164 +1,730 @@
|
||||||
local a,b={},nil b=function(c,d,e)if not(e~=nil)then e=d d=nil end local f=
|
local t = { }
|
||||||
Instance.new(c)if d then f.Name=d end local g for h,i in pairs(e)do if type(h)==
|
local New
|
||||||
'string'then if h=='Parent'then g=i else f[h]=i end elseif type(h)=='number'and
|
New = function(className, name, props)
|
||||||
type(i)=='userdata'then i.Parent=f end end f.Parent=g return f end local c,d=
|
if not (props ~= nil) then
|
||||||
assert,nil d=function()return d end local e={buffer={}}e.New=function(f)local g=
|
props = name
|
||||||
setmetatable({},f)f.__index=f g.buffer={}return g end e.Append=function(f,g)do
|
name = nil
|
||||||
local h=f.buffer h[#h+1]=g end end e.ToString=function(f)return table.concat(f.
|
end
|
||||||
buffer)end local f={backslashes={['\b']='\\b',['\t']='\\t',['\n']='\\n',['\f']=
|
local obj = Instance.new(className)
|
||||||
'\\f',['\r']='\\r',['"']='\\"',['\\']='\\\\',['/']='\\/'}}f.New=function(g)local
|
if name then
|
||||||
h=setmetatable({},g)h.writer=e:New()g.__index=g return h end f.Append=function(g
|
obj.Name = name
|
||||||
,h)return g.writer:Append(h)end f.ToString=function(g)return g.writer:ToString()
|
end
|
||||||
end f.Write=function(g,h)local i=type(h)if'nil'==i then return g:WriteNil()
|
local parent
|
||||||
elseif'boolean'==i or'number'==i then return g:WriteString(h)elseif'string'==i
|
for k, v in pairs(props) do
|
||||||
then return g:ParseString(h)elseif'table'==i then return g:WriteTable(h)elseif
|
if type(k) == "string" then
|
||||||
'function'==i then return g:WriteFunction(h)elseif'thread'==i or'userdata'==i
|
if k == "Parent" then
|
||||||
then return g:WriteError(h)end end f.WriteNil=function(g)return g:Append'null'
|
parent = v
|
||||||
end f.WriteString=function(g,h)return g:Append(tostring(h))end f.ParseString=
|
else
|
||||||
function(g,h)g:Append'"'g:Append(string.gsub(h,'[%z%c\\"/]',function(i)local j=g
|
obj[k] = v
|
||||||
.backslashes[i]if j then return j end return string.format('\\u%.4X',string.
|
end
|
||||||
byte(i))end))return g:Append'"'end f.IsArray=function(g,h)local i,j=0,nil j=
|
elseif type(k) == "number" and type(v) == "userdata" then
|
||||||
function(k)if type(k)=='number'and k>0 and math.floor(k)==k then return true end
|
v.Parent = obj
|
||||||
return false end for k,l in pairs(h)do if not j(k)then return false,'{','}'else
|
end
|
||||||
i=math.max(i,k)end end return true,'[',']',i end f.WriteTable=function(g,h)local
|
end
|
||||||
i,j,k,l=g:IsArray(h)g:Append(j)if i then for m=1,l do g:Write(h[m])if m<l then g
|
obj.Parent = parent
|
||||||
:Append','end end else local m=true for n,o in pairs(h)do if not m then g:Append
|
return obj
|
||||||
','end m=false g:ParseString(n)g:Append':'g:Write(o)end end return g:Append(k)
|
end
|
||||||
end f.WriteError=function(g,h)return error(string.format(
|
local assert = assert
|
||||||
'Encoding of %s unsupported',tostring(h)))end f.WriteFunction=function(g,h)if h
|
local Null
|
||||||
==d then return g:WriteNil()else return g:WriteError(h)end end local g={s='',i=0
|
Null = function()
|
||||||
}g.New=function(h,i)local j=setmetatable({},h)h.__index=h j.s=i or j.s return j
|
return Null
|
||||||
end g.Peek=function(h)local i=h.i+1 if i<=#h.s then return string.sub(h.s,i,i)
|
end
|
||||||
end return nil end g.Next=function(h)h.i=h.i+1 if h.i<=#h.s then return string.
|
local StringBuilder = {
|
||||||
sub(h.s,h.i,h.i)end return nil end g.All=function(h)return h.s end local h={
|
buffer = { }
|
||||||
escapes={['t']='\t',['n']='\n',['f']='\f',['r']='\r',['b']='\b'}}h.New=function(
|
}
|
||||||
i,j)local k=setmetatable({},i)k.reader=g:New(j)i.__index=i return k end h.Read=
|
StringBuilder.New = function(self)
|
||||||
function(i)i:SkipWhiteSpace()local j=i:Peek()if not(j~=nil)then return error(
|
local o = setmetatable({ }, self)
|
||||||
string.format("Nil string: '%s'",i:All()))elseif j=='{'then return i:ReadObject(
|
self.__index = self
|
||||||
)elseif j=='['then return i:ReadArray()elseif j=='"'then return i:ReadString()
|
o.buffer = { }
|
||||||
elseif string.find(j,'[%+%-%d]')then return i:ReadNumber()elseif j=='t'then
|
return o
|
||||||
return i:ReadTrue()elseif j=='f'then return i:ReadFalse()elseif j=='n'then
|
end
|
||||||
return i:ReadNull()elseif j=='/'then i:ReadComment()return i:Read()else return
|
StringBuilder.Append = function(self, s)
|
||||||
nil end end h.ReadTrue=function(i)i:TestReservedWord{'t','r','u','e'}return true
|
do
|
||||||
end h.ReadFalse=function(i)i:TestReservedWord{'f','a','l','s','e'}return false
|
local _obj_0 = self.buffer
|
||||||
end h.ReadNull=function(i)i:TestReservedWord{'n','u','l','l'}return nil end h.
|
_obj_0[#_obj_0 + 1] = s
|
||||||
TestReservedWord=function(i,j)for k,l in ipairs(j)do if i:Next()~=l then error(
|
end
|
||||||
string.format("Error reading '%s': %s",table.concat(j),i:All()))end end end h.
|
end
|
||||||
ReadNumber=function(i)local j,k=i:Next(),i:Peek()while(k~=nil)and string.find(k,
|
StringBuilder.ToString = function(self)
|
||||||
'[%+%-%d%.eE]')do j=j..i:Next()k=i:Peek()end j=tonumber(j)if not(j~=nil)then
|
return table.concat(self.buffer)
|
||||||
return error(string.format("Invalid number: '%s'",j))else return j end end h.
|
end
|
||||||
ReadString=function(i)local j=''c(i:Next()=='"')while i:Peek()~='"'do local k=i:
|
local JsonWriter = {
|
||||||
Next()if k=='\\'then k=i:Next()if i.escapes[k]then k=i.escapes[k]end end j=j..k
|
backslashes = {
|
||||||
end c(i:Next()=='"')local k k=function(l)return string.char(tonumber(l,16))end
|
["\b"] = "\\b",
|
||||||
return string.gsub(j,'u%x%x(%x%x)',k)end h.ReadComment=function(i)c(i:Next()==
|
["\t"] = "\\t",
|
||||||
'/')local j=i:Next()if j=='/'then return i:ReadSingleLineComment()elseif j=='*'
|
["\n"] = "\\n",
|
||||||
then return i:ReadBlockComment()else return error(string.format(
|
["\f"] = "\\f",
|
||||||
'Invalid comment: %s',i:All()))end end h.ReadBlockComment=function(i)local j=
|
["\r"] = "\\r",
|
||||||
false while not j do local k=i:Next()if k=='*'and i:Peek()=='/'then j=true end
|
['"'] = '\\"',
|
||||||
if not j and k=='/'and i:Peek()=='*'then error(string.format(
|
["\\"] = "\\\\",
|
||||||
"Invalid comment: %s, '/*' illegal.",i:All()))end end return i:Next()end h.
|
["/"] = "\\/"
|
||||||
ReadSingleLineComment=function(i)local j=i:Next()while j~='\r'and j~='\n'do j=i:
|
}
|
||||||
Next()end end h.ReadArray=function(i)local j={}c(i:Next()=='[')local k=false if
|
}
|
||||||
i:Peek()==']'then k=true end while not k do local l=i:Read()j[#j+1]=l i:
|
JsonWriter.New = function(self)
|
||||||
SkipWhiteSpace()if i:Peek()==']'then k=true end if not k then local m=i:Next()if
|
local o = setmetatable({ }, self)
|
||||||
m~=','then error(string.format("Invalid array: '%s' due to: '%s'",i:All(),m))end
|
o.writer = StringBuilder:New()
|
||||||
end end c(']'==i:Next())return j end h.ReadObject=function(i)local j={}c(i:Next(
|
self.__index = self
|
||||||
)=='{')local k=false if i:Peek()=='}'then k=true end while not k do local l=i:
|
return o
|
||||||
Read()if type(l)~='string'then error(string.format(
|
end
|
||||||
'Invalid non-string object key: %s',l))end i:SkipWhiteSpace()local m=i:Next()if
|
JsonWriter.Append = function(self, s)
|
||||||
m~=':'then error(string.format("Invalid object: '%s' due to: '%s'",i:All(),m))
|
return self.writer:Append(s)
|
||||||
end i:SkipWhiteSpace()local n=i:Read()j[l]=n i:SkipWhiteSpace()if i:Peek()=='}'
|
end
|
||||||
then k=true end if not k then m=i:Next()if m~=','then error(string.format(
|
JsonWriter.ToString = function(self)
|
||||||
"Invalid array: '%s' near: '%s'",i:All(),m))end end end c(i:Next()=='}')return j
|
return self.writer:ToString()
|
||||||
end h.SkipWhiteSpace=function(i)local j=i:Peek()while(j~=nil)and string.find(j,
|
end
|
||||||
'[%s/]')do if j=='/'then i:ReadComment()else i:Next()end j=i:Peek()end end h.
|
JsonWriter.Write = function(self, o)
|
||||||
Peek=function(i)return i.reader:Peek()end h.Next=function(i)return i.reader:
|
local _exp_0 = type(o)
|
||||||
Next()end h.All=function(i)return i.reader:All()end local i i=function(j)local k
|
if "nil" == _exp_0 then
|
||||||
=f:New()k:Write(j)k:ToString()return k end local j j=function(k)local l=h:New(k)
|
return self:WriteNil()
|
||||||
l:Read()return l end a.DecodeJSON=function(k)pcall(function()return warn
|
elseif "boolean" == _exp_0 or "number" == _exp_0 then
|
||||||
[[RbxUtility.DecodeJSON is deprecated, please use Game:GetService("HttpService"):JSONDecode() instead.]]
|
return self:WriteString(o)
|
||||||
end)if type(k)=='string'then return j(k)end print
|
elseif "string" == _exp_0 then
|
||||||
'RbxUtil.DecodeJSON expects string argument!'return nil end a.EncodeJSON=
|
return self:ParseString(o)
|
||||||
function(k)pcall(function()return warn
|
elseif "table" == _exp_0 then
|
||||||
[[RbxUtility.EncodeJSON is deprecated, please use Game:GetService("HttpService"):JSONEncode() instead.]]
|
return self:WriteTable(o)
|
||||||
end)return i(k)end a.MakeWedge=function(k,l,m,n)return game:GetService'Terrain':
|
elseif "function" == _exp_0 then
|
||||||
AutoWedgeCell(k,l,m)end a.SelectTerrainRegion=function(k,l,m,n)local o=game.
|
return self:WriteFunction(o)
|
||||||
Workspace:FindFirstChild'Terrain'if not o then return end c(k)c(l)if not type(k)
|
elseif "thread" == _exp_0 or "userdata" == _exp_0 then
|
||||||
=='Region3'then error(
|
return self:WriteError(o)
|
||||||
[[regionToSelect (first arg), should be of type Region3, but is type]],type(k))
|
end
|
||||||
end if not type(l)=='BrickColor'then error(
|
end
|
||||||
[[color (second arg), should be of type BrickColor, but is type]],type(l))end
|
JsonWriter.WriteNil = function(self)
|
||||||
local p,q,r,s,t,u,v,w,x,y,z,A,B,C=o.GetCell,o.WorldToCellPreferSolid,o.
|
return self:Append("null")
|
||||||
CellCenterToWorld,Enum.CellMaterial.Empty,b('Model','SelectionContainer',{
|
end
|
||||||
Archivable=false,Parent=(function()if n then return n else return game.Workspace
|
JsonWriter.WriteString = function(self, o)
|
||||||
end end)()}),nil,nil,0,nil,{},{},b('Part','SelectionPart',{Transparency=1,
|
return self:Append(tostring(o))
|
||||||
Anchored=true,Locked=true,CanCollide=false,Size=Vector3.new(4.2,4.2,4.2)}),
|
end
|
||||||
Instance.new'SelectionBox',nil C=function(D)local E,F if#z>0 then E=z[1]['part']
|
JsonWriter.ParseString = function(self, s)
|
||||||
F=z[1]['box']table.remove(z,1)F.Visible=true else E=A:Clone()E.Archivable=false
|
self:Append('"')
|
||||||
F=B:Clone()F.Archivable=false F.Adornee=E F.Parent=t F.Adornee=E F.Parent=t end
|
self:Append(string.gsub(s, '[%z%c\\"/]', function(n)
|
||||||
if D then F.Color=D end return E,F end local D D=function()for E,F in pairs(y)do
|
local c = self.backslashes[n]
|
||||||
if F.KeepAlive~=v then F.SelectionBox.Visible=false table.insert(z,{part=F.
|
if c then
|
||||||
SelectionPart,box=F.SelectionBox})y[E]=nil end end end local E E=function()w=w+1
|
return c
|
||||||
if w>1000000 then w=0 end return w end local F F=function(G,H)local I,J=G.CFrame
|
end
|
||||||
.p-G.Size/2+Vector3.new(2,2,2),G.CFrame.p+G.Size/2-Vector3.new(2,2,2)local K,L=
|
return string.format("\\u%.4X", string.byte(n))
|
||||||
q(o,I),q(o,J)v=E()for M=K.y,L.y do for N=K.z,L.z do for O=K.x,L.x do local P=p(o
|
end))
|
||||||
,O,M,N)if P~=s then local Q,R,S=r(o,O,M,N),Vector3int16.new(O,M,N),false for T,U
|
return self:Append('"')
|
||||||
in pairs(y)do if T==R then U.KeepAlive=v if H then U.SelectionBox.Color=H end S=
|
end
|
||||||
true break end end if not S then local V,W V,W=C(H)V.Size=Vector3.new(4,4,4)V.
|
JsonWriter.IsArray = function(self, t)
|
||||||
CFrame=CFrame.new(Q)local X={SelectionPart=V,SelectionBox=W,KeepAlive=v}y[R]=X
|
local count = 0
|
||||||
end end end end end return D()end x=k if m then local G,H G,H=C(l)G.Size=k.Size
|
local isindex
|
||||||
G.CFrame=k.CFrame y.SelectionPart=G y.SelectionBox=H u=function(I,J)if I and I~=
|
isindex = function(k)
|
||||||
x then x=I G.Size=I.Size G.CFrame=I.CFrame end if J then H.Color=J end end else
|
if type(k) == "number" and k > 0 and math.floor(k) == k then
|
||||||
F(k,l)u=function(G,H)if G and G~=x then x=G return F(G,H)end end end local G G=
|
return true
|
||||||
function()u=nil if t~=nil then t:Destroy()end y=nil end return u,G end a.
|
end
|
||||||
CreateSignal=function()local k,l,m={},Instance.new'BindableEvent',{}k.connect=
|
return false
|
||||||
function(n,o)if n~=k then error('connect must be called with `:`, not `.`',2)end
|
end
|
||||||
if type(o)~='function'then error(
|
for k, _ in pairs(t) do
|
||||||
'Argument #1 of connect must be a function, got a '..tostring(type(o)),2)end
|
if not isindex(k) then
|
||||||
local p=l.Event:connect(o)m[p]=true local q={}q.disconnect=function(r)p:
|
return false, "{", "}"
|
||||||
disconnect()m[p]=nil end q.Disconnect=q.disconnect return q end k.disconnect=
|
else
|
||||||
function(n)if n~=k then error('disconnect must be called with `:`, not `.`',2)
|
count = math.max(count, k)
|
||||||
end for o,p in pairs(m)do o:disconnect()m[o]=nil end end k.wait=function(n)if n
|
end
|
||||||
~=k then error('wait must be called with `:`, not `.`',2)end return l.Event:
|
end
|
||||||
wait()end k.fire=function(n,...)if n~=k then error(
|
return true, "[", "]", count
|
||||||
'fire must be called with `:`, not `.`',2)end return l:Fire(...)end k.Connect=k.
|
end
|
||||||
connect k.Disconnect=k.disconnect k.Wait=k.wait k.Fire=k.fire return k end local
|
JsonWriter.WriteTable = function(self, t)
|
||||||
k k=function(l)if type(l)~='string'then error(
|
local ba, st, et, n = self:IsArray(t)
|
||||||
'Argument of Create must be a string',2)end return function(m)m=m or{}local n,o,
|
self:Append(st)
|
||||||
p=Instance.new(l),nil,nil for q,r in pairs(m)do if type(q)=='string'then if q==
|
if ba then
|
||||||
'Parent'then o=r else n[q]=r end elseif type(q)=='number'then if type(r)~=
|
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
|
||||||
..tostring(type(r)),2)end r.Parent=n elseif type(q)=='table'and q.__eventname
|
self:Append(",")
|
||||||
then if type(r)~='function'then error(
|
end
|
||||||
"Bad entry in Create body: Key `[Create.E'"..tostring(q.__eventname)..
|
end
|
||||||
"']` must have a function value, got: "..tostring(r),2)end n[q.__eventname]:
|
else
|
||||||
connect(r)elseif q==a.Create then if type(r)~='function'then error(
|
local first = true
|
||||||
[[Bad entry in Create body: Key `[Create]` should be paired with a constructor function, got: ]]
|
for k, v in pairs(t) do
|
||||||
..tostring(r),2)elseif p then error(
|
if not first then
|
||||||
[[Bad entry in Create body: Only one constructor function is allowed]],2)end p=r
|
self:Append(",")
|
||||||
else error('Bad entry ('..tostring(q)..' => '..tostring(r)..') in Create body',2
|
end
|
||||||
)end end if p~=nil then p(n)end if o then n.Parent=o end return n end end a.
|
first = false
|
||||||
Create=setmetatable({},{['__call']=function(l,...)return k(...)end})a.Create.E=
|
self:ParseString(k)
|
||||||
function(l)return{__eventname=l}end a.Help=function(l)if'DecodeJSON'==l or a.
|
self:Append(":")
|
||||||
DecodeJSON==l then return
|
self:Write(v)
|
||||||
[[Function DecodeJSON. Arguments: (string). Side effect: returns a table with all parsed JSON values]]
|
end
|
||||||
elseif'EncodeJSON'==l or a.EncodeJSON==l then return
|
end
|
||||||
[[Function EncodeJSON. Arguments: (table). Side effect: returns a string composed of argument table in JSON data format]]
|
return self:Append(et)
|
||||||
elseif'MakeWedge'==l or a.MakeWedge==l then return
|
end
|
||||||
[[Function MakeWedge. Arguments: (x, y, z, [default material]). Description: Makes a wedge at location x, y, z. Sets cell x, y, z to default material if parameter is provided, if not sets cell x, y, z to be whatever material it previously was. Returns true if made a wedge, false if the cell remains a block ]]
|
JsonWriter.WriteError = function(self, o)
|
||||||
elseif'SelectTerrainRegion'==l or a.SelectTerrainRegion==l then return
|
return error(string.format("Encoding of %s unsupported", tostring(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]]
|
end
|
||||||
elseif'CreateSignal'==l or a.CreateSignal==l then return
|
JsonWriter.WriteFunction = function(self, o)
|
||||||
[[Function CreateSignal. Arguments: None. Returns: The newly created Signal object. This object is identical to the RBXScriptSignal class used for events in Objects, but is a Lua-side object so it can be used to create custom events inLua code. Methods of the Signal object: :connect, :wait, :fire, :disconnect. For more info you can pass the method name to the Help function, or view the wiki page for this library. EG: Help('Signal:connect').]]
|
if o == Null then
|
||||||
elseif'Signal:connect'==l then return
|
return self:WriteNil()
|
||||||
[[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|.]]
|
else
|
||||||
elseif'Signal:wait'==l then return
|
return self:WriteError(o)
|
||||||
[[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.]]
|
end
|
||||||
elseif'Signal:fire'==l 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.]]
|
local StringReader = {
|
||||||
elseif'Signal:disconnect'==l then return
|
s = "",
|
||||||
[[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.]]
|
i = 0
|
||||||
elseif'Create'==l 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.]]
|
StringReader.New = function(self, s)
|
||||||
end end return a
|
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
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,21 @@
|
||||||
local a,b,c=3569749,game:GetService'ScriptContext',0 while not(b or c>2)do c=c+1
|
local deepakTestingPlace = 3569749
|
||||||
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 return b
|
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
|
|
@ -1,86 +1,389 @@
|
||||||
if game.CoreGui.Version<7 then return end local a a=function(b,c)while not b:
|
if game.CoreGui.Version < 7 then
|
||||||
FindFirstChild(c)do b.ChildAdded:wait()end return b:FindFirstChild(c)end local b
|
return
|
||||||
b=function(c,d)while not c[d]do c.Changed:wait()end end a(game,'Players')if#game
|
end
|
||||||
.Players:GetChildren()<1 then game.Players.ChildAdded:wait()end b(game.Players,
|
local waitForChild
|
||||||
'LocalPlayer')local c=script.Parent a(c,'Gear')local d=script.Parent.Parent
|
waitForChild = function(instance, name)
|
||||||
assert(d:IsA'ScreenGui')a(c,'Tabs')a(c.Tabs,'CloseButton')local e=c.Tabs.
|
while not instance:FindFirstChild(name) do
|
||||||
CloseButton a(c.Tabs,'InventoryButton')local f,g=c.Tabs.InventoryButton,nil if
|
instance.ChildAdded:wait()
|
||||||
game.CoreGui.Version>=8 then a(c.Tabs,'WardrobeButton')g=c.Tabs.WardrobeButton
|
end
|
||||||
end a(c.Parent,'ControlFrame')local h,i,j=a(c.Parent.ControlFrame,
|
return instance:FindFirstChild(name)
|
||||||
'BackpackButton'),'gear',a(c,'SearchFrame')a(c.SearchFrame,'SearchBoxFrame')
|
end
|
||||||
local k,l,m,n=a(c.SearchFrame.SearchBoxFrame,'SearchBox'),a(c.SearchFrame,
|
local waitForProperty
|
||||||
'SearchButton'),a(c.SearchFrame,'ResetButton'),a(Game.CoreGui,'RobloxGui')local
|
waitForProperty = function(instance, property)
|
||||||
o=a(n,'CurrentLoadout')local p,q,r,s,t,u,v,w,x,y,z,A=a(o,'Background'),true,true
|
while not instance[property] do
|
||||||
,false,true,false,nil,0.25,'Search...','~','`',UDim2.new(0,600,0,400)if n.
|
instance.Changed:wait()
|
||||||
AbsoluteSize.Y<=320 then A=UDim2.new(0,200,0,140)end local B B=function(C)
|
end
|
||||||
assert(C,'eventName is nil')assert(tostring(C),'eventName is not a string')local
|
end
|
||||||
D=Instance.new'BindableEvent'D.Name=tostring(C)D.Parent=script return D end
|
waitForChild(game, "Players")
|
||||||
local C C=function(D,E)assert(D,'funcName is nil')assert(tostring(D),
|
if #game.Players:GetChildren() < 1 then
|
||||||
'funcName is not a string')assert(E,'invokeFunc is nil')assert(type(E)==
|
game.Players.ChildAdded:wait()
|
||||||
'function',"invokeFunc should be of type 'function'")local F=Instance.new
|
end
|
||||||
'BindableFunction'F.Name=tostring(D)F.OnInvoke=E F.Parent=script return F end
|
waitForProperty(game.Players, "LocalPlayer")
|
||||||
local D,E,F,G,H,I=B'ResizeEvent',B'BackpackOpenEvent',B'BackpackCloseEvent',B
|
local backpack = script.Parent
|
||||||
'TabClickedEvent',B'SearchRequestedEvent',nil I=function()m.Visible=false k.Text
|
waitForChild(backpack, "Gear")
|
||||||
=x end local J J=function()I()return H:Fire()end local K K=function()c.Visible=
|
local screen = script.Parent.Parent
|
||||||
false t=false end local L L=function()if v then v:disconnect()end b(game.Players
|
assert(screen:IsA("ScreenGui"))
|
||||||
.LocalPlayer,'Character')a(game.Players.LocalPlayer.Character,'Humanoid')v=game.
|
waitForChild(backpack, "Tabs")
|
||||||
Players.LocalPlayer.Character.Humanoid.Died:connect(K)end local M M=function()s=
|
waitForChild(backpack.Tabs, "CloseButton")
|
||||||
false r=false h.Selected=false J()F:Fire(i)c.Tabs.Visible=false j.Visible=false
|
local closeButton = backpack.Tabs.CloseButton
|
||||||
c:TweenSizeAndPosition(UDim2.new(0,A.X.Offset,0,0),UDim2.new(0.5,-A.X.Offset/2,1
|
waitForChild(backpack.Tabs, "InventoryButton")
|
||||||
,-85),Enum.EasingDirection.Out,Enum.EasingStyle.Quad,w,true,function()game.
|
local inventoryButton = backpack.Tabs.InventoryButton
|
||||||
GuiService:RemoveCenterDialog(c)c.Visible=false h.Selected=false end)return
|
local wardrobeButton
|
||||||
delay(w,function()game.GuiService:RemoveCenterDialog(c)c.Visible=false h.
|
if game.CoreGui.Version >= 8 then
|
||||||
Selected=false r=true q=true end)end local N N=function()game.GuiService:
|
waitForChild(backpack.Tabs, "WardrobeButton")
|
||||||
AddCenterDialog(c,Enum.CenterDialogType.PlayerInitiatedDialog,function()c.
|
wardrobeButton = backpack.Tabs.WardrobeButton
|
||||||
Visible=true h.Selected=true end,function()c.Visible=false h.Selected=false end)
|
end
|
||||||
c.Visible=true h.Selected=true c:TweenSizeAndPosition(A,UDim2.new(0.5,-A.X.
|
waitForChild(backpack.Parent, "ControlFrame")
|
||||||
Offset/2,1,-A.Y.Offset-88),Enum.EasingDirection.Out,Enum.EasingStyle.Quad,w,true
|
local backpackButton = waitForChild(backpack.Parent.ControlFrame, "BackpackButton")
|
||||||
)return delay(w,function()c.Tabs.Visible=false j.Visible=true E:Fire(i)q=true r=
|
local currentTab = "gear"
|
||||||
true h.Image='http://www.roblox.com/asset/?id=97644093'h.Position=UDim2.new(0.5,
|
local searchFrame = waitForChild(backpack, "SearchFrame")
|
||||||
-60,1,-A.Y.Offset-103)end)end local O O=function()if not game.Players.
|
waitForChild(backpack.SearchFrame, "SearchBoxFrame")
|
||||||
LocalPlayer then return end if not game.Players.LocalPlayer['Character']then
|
local searchBox = waitForChild(backpack.SearchFrame.SearchBoxFrame, "SearchBox")
|
||||||
return end if not q then return end if not r then return end r=false q=false s=
|
local searchButton = waitForChild(backpack.SearchFrame, "SearchButton")
|
||||||
not s if s then p.Image='http://www.roblox.com/asset/?id=97623721'p.Position=
|
local resetButton = waitForChild(backpack.SearchFrame, "ResetButton")
|
||||||
UDim2.new(-3E-2,0,-0.17,0)p.Size=UDim2.new(1.05,0,1.25,0)p.ZIndex=2 p.Visible=
|
local robloxGui = waitForChild(Game.CoreGui, "RobloxGui")
|
||||||
true return N()else h.Position=UDim2.new(0.5,-60,1,-44)p.Visible=false h.
|
local currentLoadout = waitForChild(robloxGui, "CurrentLoadout")
|
||||||
Selected=false h.Image='http://www.roblox.com/asset/?id=97617958'p.Image=
|
local loadoutBackground = waitForChild(currentLoadout, "Background")
|
||||||
'http://www.roblox.com/asset/?id=96536002'p.Position=UDim2.new(-0.1,0,-0.1,0)p.
|
local canToggle = true
|
||||||
Size=UDim2.new(1.2,0,1.2,0)M()local P=o:GetChildren()for Q=1,#P do if P[Q]and P[
|
local readyForNextEvent = true
|
||||||
Q]:IsA'Frame'then local R=P[Q]if#R:GetChildren()>0 then h.Position=UDim2.new(0.5
|
local backpackIsOpen = false
|
||||||
,-60,1,-108)h.Visible=true p.Visible=true if R:GetChildren()[1]:IsA'ImageButton'
|
local active = true
|
||||||
then local S=R:GetChildren()[1]S.Active=true S.Draggable=false end end end end
|
local disabledByDeveloper = false
|
||||||
end end local P P=function()L()t=true c.Visible=s if s then return O()end end
|
local humanoidDiedCon
|
||||||
local Q Q=function()if s then return O()end end local R R=function(S)assert(S)
|
local guiTweenSpeed = 0.25
|
||||||
assert(S:IsA'TextButton')S.BackgroundColor3=Color3.new(1,1,1)S.TextColor3=Color3
|
local searchDefaultText = "Search..."
|
||||||
.new(0,0,0)S.Selected=true S.ZIndex=3 return S end local S S=function(T)assert(T
|
local tilde = "~"
|
||||||
)assert(T:IsA'TextButton')T.BackgroundColor3=Color3.new(0,0,0)T.TextColor3=
|
local backquote = "`"
|
||||||
Color3.new(1,1,1)T.Selected=false T.ZIndex=1 return T end local T T=function(U)
|
local backpackSize = UDim2.new(0, 600, 0, 400)
|
||||||
assert(U)if U=='gear'then R(f)return S(g)elseif U=='wardrobe'then R(g)return S(f
|
if robloxGui.AbsoluteSize.Y <= 320 then
|
||||||
)end end local U U=function(V)assert(V)assert(V:IsA'TextButton')if V.Selected
|
backpackSize = UDim2.new(0, 200, 0, 140)
|
||||||
then return end V.BackgroundColor3=Color3.new(0,0,0)end local V V=function(W)
|
end
|
||||||
assert(W)assert(W:IsA'TextButton')if W.Selected then return end W.
|
local createPublicEvent
|
||||||
BackgroundColor3=Color3.new(0.15294117647058825,0.15294117647058825,
|
createPublicEvent = function(eventName)
|
||||||
0.15294117647058825)end local W W=function(X)assert(X)X=string.lower(X)i=X T(X)G
|
assert(eventName, "eventName is nil")
|
||||||
:Fire(X)return J()end local X X=function(Y)return Y:gsub('^%s*(.-)%s*$','%1')end
|
assert(tostring(eventName), "eventName is not a string")
|
||||||
local Y Y=function()local Z=k.Text if Z==''then J()return end Z=X(Z)m.Visible=
|
local _with_0 = Instance.new("BindableEvent")
|
||||||
true return H:Fire(Z)end local Z Z=function()r=true end local _ _=function(aa,ab
|
_with_0.Name = tostring(eventName)
|
||||||
)if aa==Enum.CoreGuiType.Backpack or aa==Enum.CoreGuiType.All then t=ab u=not ab
|
_with_0.Parent = script
|
||||||
do local ac=game:GetService'GuiService'if u then pcall(function()ac:RemoveKey(y)
|
return _with_0
|
||||||
return ac:RemoveKey(z)end)else ac:AddKey(y)ac:AddKey(z)end end J()j.Visible=ab
|
end
|
||||||
and s o.Visible=ab c.Visible=ab h.Visible=ab end end C('CloseBackpack',M)C(
|
local createPublicFunction
|
||||||
'BackpackReady',Z)pcall(function()_(Enum.CoreGuiType.Backpack,Game.StarterGui:
|
createPublicFunction = function(funcName, invokeFunc)
|
||||||
GetCoreGuiEnabled(Enum.CoreGuiType.Backpack))return Game.StarterGui.
|
assert(funcName, "funcName is nil")
|
||||||
CoreGuiChangedSignal:connect(_)end)f.MouseButton1Click:connect(function()return
|
assert(tostring(funcName), "funcName is not a string")
|
||||||
W'gear'end)f.MouseEnter:connect(function()return V(f)end)f.MouseLeave:connect(
|
assert(invokeFunc, "invokeFunc is nil")
|
||||||
function()return U(f)end)if game.CoreGui.Version>=8 then g.MouseButton1Click:
|
assert(type(invokeFunc) == "function", "invokeFunc should be of type 'function'")
|
||||||
connect(function()return W'wardrobe'end)g.MouseEnter:connect(function()return V(
|
local _with_0 = Instance.new("BindableFunction")
|
||||||
g)end)g.MouseLeave:connect(function()return U(g)end)end e.MouseButton1Click:
|
_with_0.Name = tostring(funcName)
|
||||||
connect(Q)d.Changed:connect(function(aa)if aa=='AbsoluteSize'then return D:Fire(
|
_with_0.OnInvoke = invokeFunc
|
||||||
d.AbsoluteSize)end end)do local aa=game:GetService'GuiService'aa:AddKey(y)aa:
|
_with_0.Parent = script
|
||||||
AddKey(z)aa.KeyPressed:connect(function(ab)if not t or u then return end if ab==
|
return _with_0
|
||||||
y or ab==z then return O()end end)end h.MouseButton1Click:connect(function()if
|
end
|
||||||
not t or u then return end return O()end)if game.Players.LocalPlayer['Character'
|
local resizeEvent = createPublicEvent("ResizeEvent")
|
||||||
]then P()end game.Players.LocalPlayer.CharacterAdded:connect(P)k.FocusLost:
|
local backpackOpenEvent = createPublicEvent("BackpackOpenEvent")
|
||||||
connect(function(aa)if aa or k.Text~=''then return Y()elseif k.Text==''then
|
local backpackCloseEvent = createPublicEvent("BackpackCloseEvent")
|
||||||
return J()end end)l.MouseButton1Click:connect(Y)m.MouseButton1Click:connect(J)if
|
local tabClickedEvent = createPublicEvent("TabClickedEvent")
|
||||||
j and n.AbsoluteSize.Y<=320 then j.RobloxLocked=false return j:Destroy()end
|
local searchRequestedEvent = createPublicEvent("SearchRequestedEvent")
|
||||||
|
local resetSearchBoxGui
|
||||||
|
resetSearchBoxGui = function()
|
||||||
|
resetButton.Visible = false
|
||||||
|
searchBox.Text = searchDefaultText
|
||||||
|
end
|
||||||
|
local resetSearch
|
||||||
|
resetSearch = function()
|
||||||
|
resetSearchBoxGui()
|
||||||
|
return searchRequestedEvent:Fire()
|
||||||
|
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
Loading…
Reference in New Issue