Improve formatting of corescripts
This commit is contained in:
parent
443ca3f3fe
commit
0baec01a44
|
|
@ -69,7 +69,7 @@ CurrencyType.Robux then if(ak~=nil)and ak~=0 then g=ak f=Enum.CurrencyType.Robux
|
|||
else g=al f=Enum.CurrencyType.Tix end elseif f==Enum.CurrencyType.Tix then if(al
|
||||
~=nil)and al~=0 then g=al f=Enum.CurrencyType.Tix else g=ak f=Enum.CurrencyType.
|
||||
Robux end else return false end if not(g~=nil)then return false end return true
|
||||
end local ak ak=function()local al,am,an am,an=pcall(function()al=game:
|
||||
end local ak ak=function()local al local am,an=pcall(function()al=game:
|
||||
HttpGetAsync(tostring(W())..'currency/balance')end)if not am then print(
|
||||
'Get player balance failed because',an)return nil end if al==''then return nil
|
||||
end al=X().DecodeJSON(al)return al end local al al=function(am)if Enum.
|
||||
|
|
@ -99,10 +99,10 @@ then d=X().DecodeJSON(at)end else as=pcall(function()d=game:GetService
|
|||
nil,nil,true,ar end if not m then if not e then print
|
||||
'current asset id is nil, this should always have a value'return false end if e
|
||||
<=0 then print[[current asset id is negative, this should always be positive]]
|
||||
return false end local at,au at,au=pcall(function()ap=game:HttpGetAsync(W()..
|
||||
return false end local at as,at=pcall(function()ap=game:HttpGetAsync(W()..
|
||||
'ownership/hasAsset?userId='..tostring(game.Players.LocalPlayer.userId)..
|
||||
'&assetId='..tostring(e))end)if not at then print(
|
||||
'could not tell if player owns asset because',au)return false end if ap==true or
|
||||
'&assetId='..tostring(e))end)if not as then print(
|
||||
'could not tell if player owns asset because',at)return false end if ap==true or
|
||||
ap=='true'then ar='You already own this item.'return true,nil,nil,true,ar end
|
||||
end q.BodyFrame.AfterBalanceButton.Visible=true if type(d)~='table'then d=X().
|
||||
DecodeJSON(d)end if not d then ar=
|
||||
|
|
@ -114,8 +114,8 @@ tonumber(d['PriceInRobux']),tonumber(d['PriceInTickets']))then ar=
|
|||
return true,nil,nil,true,ar end local at=ak()if not at then ar=
|
||||
'Could not retrieve your balance. Please try again later.'return true,nil,nil,
|
||||
true,ar end if tonumber(d['MinimumMembershipLevel'])>al(game.Players.LocalPlayer
|
||||
.MembershipType)then aq=true end local au,av au,av=an(at,aq)if aq then q.
|
||||
BodyFrame.AfterBalanceButton.Active=true return true,av,aq,false end if d[
|
||||
.MembershipType)then aq=true end local au,av=an(at,aq)if aq then q.BodyFrame.
|
||||
AfterBalanceButton.Active=true return true,av,aq,false end if d[
|
||||
'ContentRatingTypeId']==1 then if game.Players.LocalPlayer:GetUnder13()then ar=
|
||||
[[Your account is under 13 so purchase of this item is not allowed.]]return true
|
||||
,nil,nil,true,ar end end if(d['IsLimited']==true or d['IsLimitedUnique']==true)
|
||||
|
|
@ -124,18 +124,18 @@ and(d['Remaining']==''or d['Remaining']==0 or not(d['Remaining']~=nil))then ar=
|
|||
return true,nil,nil,true,ar end if not au then ar=
|
||||
[[Could not update your balance. Please check back after some time.]]return true
|
||||
,nil,nil,true,ar end q.BodyFrame.AfterBalanceButton.Active=true return true,av
|
||||
end local ap ap=function(aq)if k then local ar,as ar,as=ao()if ar and as then
|
||||
local at=1000 while(at>0 or aq)and as and k and ar do wait(0.1)ar,as=ao()at=at-1
|
||||
end end if ar and not as then return ab(q.BodyFrame.BuyButton,q.BodyFrame.
|
||||
CancelButton,q.BodyFrame.AfterBalanceButton)end end end local aq aq=function()
|
||||
return Game:GetService'GuiService':OpenBrowserWindow(tostring(c)..
|
||||
end local ap ap=function(aq)if k then local ar,as=ao()if ar and as then local at
|
||||
=1000 while(at>0 or aq)and as and k and ar do wait(0.1)ar,as=ao()at=at-1 end end
|
||||
if ar and not as then return ab(q.BodyFrame.BuyButton,q.BodyFrame.CancelButton,q
|
||||
.BodyFrame.AfterBalanceButton)end end end local aq aq=function()return Game:
|
||||
GetService'GuiService':OpenBrowserWindow(tostring(c)..
|
||||
'Upgrades/BuildersClubMemberships.aspx')end local ar ar=function()return ad(
|
||||
false)end local as as=function()local at,au,av,aw,ax at,au,av,aw,ax=ao()if at
|
||||
then ai()if aw and ax then q.BodyFrame.ItemPreview.ItemDescription.Text=ax q.
|
||||
BodyFrame.AfterBalanceButton.Visible=false end game.GuiService:AddCenterDialog(q
|
||||
,Enum.CenterDialogType.ModalDialog,function()q.Visible=true if ae()then ab(q.
|
||||
BodyFrame.FreeButton,q.BodyFrame.CancelButton,q.BodyFrame.AfterBalanceButton)
|
||||
elseif av then q.BodyFrame.AfterBalanceButton.Text=
|
||||
false)end local as as=function()local at,au,av,aw,ax=ao()if at then ai()if aw
|
||||
and ax then q.BodyFrame.ItemPreview.ItemDescription.Text=ax q.BodyFrame.
|
||||
AfterBalanceButton.Visible=false end game.GuiService:AddCenterDialog(q,Enum.
|
||||
CenterDialogType.ModalDialog,function()q.Visible=true if ae()then ab(q.BodyFrame
|
||||
.FreeButton,q.BodyFrame.CancelButton,q.BodyFrame.AfterBalanceButton)elseif av
|
||||
then q.BodyFrame.AfterBalanceButton.Text=
|
||||
[[You require an upgrade to your Builders Club membership to purchase this item. Click here to upgrade.]]
|
||||
if not l then l=q.BodyFrame.AfterBalanceButton.MouseButton1Click:connect(
|
||||
function()if q.BodyFrame.AfterBalanceButton.Text==
|
||||
|
|
@ -167,8 +167,8 @@ Enum.CurrencyType.Tix then return 2 end end local ay ay=function(az)aw()local aA
|
|||
tostring(ax(f))..'&expectedUnitPrice='..tostring(g)..'&placeId='..tostring(Game.
|
||||
PlaceId)else aC=W()..'marketplace/purchase?productId='..tostring(i)..
|
||||
'¤cyTypeId='..tostring(ax(f))..'&purchasePrice='..tostring(g)..
|
||||
'&locationType=Game'..'&locationId='..tostring(Game.PlaceId)end local aD,aE aD,
|
||||
aE=pcall(function()aB=game:HttpPostAsync(aC,'RobloxPurchaseRequest')end)print(
|
||||
'&locationType=Game'..'&locationId='..tostring(Game.PlaceId)end local aD,aE=
|
||||
pcall(function()aB=game:HttpPostAsync(aC,'RobloxPurchaseRequest')end)print(
|
||||
'doAcceptPurchase success from ypcall is ',aD,'reason is',aE)if(tick()-aA)<1
|
||||
then wait(1)end if aB=='none'or not(aB~=nil)or aB==''then print(
|
||||
'did not get a proper response from web on purchase of',e,i)au()return end aB=X(
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ ChildAdded:wait()end end local c c=function(d,e)while not d[e]do d.Changed:wait(
|
|||
Parent:FindFirstChild'ControlFrame'else d=script.Parent end local e,f,g,h,i,j,k,
|
||||
l,m,n,o,p,q,r,s,t,u=nil,nil,nil,0.2,'http://www.roblox.com/asset?id=54071825',
|
||||
'http://www.roblox.com/Asset?id=45915798',game:GetService'CoreGui'.Version>=5,10
|
||||
,false,nil,{},{},nil,UserSettings().GameSettings:InStudioMode(),false,nil,nil t,
|
||||
u=pcall(function()return not game.GuiService.IsWindows end)s=t and u local v v=
|
||||
function(w,x,y)return Color3.new(w/255,x/255,y/255)end local w w=function(x)x.
|
||||
,false,nil,{},{},nil,UserSettings().GameSettings:InStudioMode(),false,pcall(
|
||||
function()return not game.GuiService.IsWindows end)s=t and u local v v=function(
|
||||
w,x,y)return Color3.new(w/255,x/255,y/255)end local w w=function(x)x.
|
||||
RobloxLocked=true local y=x:GetChildren()if y then for z,A in ipairs(y)do w(A)
|
||||
end end end local x x=function(y)y.Settings:TweenPosition(UDim2.new(0.5,-262,-
|
||||
0.5,-200),Enum.EasingDirection.InOut,Enum.EasingStyle.Sine,h,true)return delay(h
|
||||
|
|
@ -421,7 +421,7 @@ delay(0,function()local N=0 while M do local O=0 while O<8 do if O==N or O==((N+
|
|||
Image='http://www.roblox.com/Asset?id=45880710'end O=O+1 end N=(N+1)%8 wait(0.2)
|
||||
end end)local N=game:SaveToRoblox()if not N then N=game:SaveToRoblox()end an.
|
||||
Visible=false M=false if N then game:FinishShutdown(false)return ad()else am.
|
||||
Visible=true end end af=function()am.Visible=false game:FinishShutdown(true)
|
||||
Visible=true end end ae=function()am.Visible=false game:FinishShutdown(true)
|
||||
return ad()end ag=function()aj.Visible=false am.Visible=false game:
|
||||
FinishShutdown(false)return ad()end ah=function()aj.Visible=false am.Visible=
|
||||
false return ad()end ad=function()aj.Visible=true am.Visible=false an.Visible=
|
||||
|
|
|
|||
|
|
@ -581,9 +581,9 @@ not an then bX()else ca()end for co,cp in ipairs(ao)do if not(cp.Parent~=nil)
|
|||
then cp:TweenPosition(UDim2.new(0.5,0,((#ao-co)*cp.Size.Y.Scale),0),'Out',
|
||||
'Linear',c,true)end end if not M.Value and#ao>ag then bz()end bb()bL()bz()bN()aF
|
||||
=false end game.GuiService:AddKey'\t'local co=time()game.GuiService.KeyPressed:
|
||||
connect(function(cp)if cp=='\t'then m'caught tab key'local cq,cr cq,cr=pcall(
|
||||
function()return game.GuiService.IsModalDialog end)if cq==false or(cq and cr==
|
||||
false)then if time()-co>0.4 then co=time()if O.Value then if not N.Value then r:
|
||||
connect(function(cp)if cp=='\t'then m'caught tab key'local cq,cr=pcall(function(
|
||||
)return game.GuiService.IsModalDialog end)if cq==false or(cq and cr==false)then
|
||||
if time()-co>0.4 then co=time()if O.Value then if not N.Value then r:
|
||||
TweenPosition(UDim2.new(0,0,0,0),'Out','Linear',c*1.2,true)N.Value=true else r:
|
||||
TweenPosition(UDim2.new(ax.X.Scale,ax.X.Offset-10,0,0),'Out','Linear',c*1.2,true
|
||||
)N.Value=false M.Value=true end else return by()end end end end end)local cp cp=
|
||||
|
|
@ -601,5 +601,5 @@ function()return cp(cx)end)end game.Teams.ChildAdded:connect(cs)game.Teams.
|
|||
ChildRemoved:connect(ct)o.ChildAdded:connect(cq)a6()P.Value=true bg()wait(2)aS=
|
||||
not not game.Workspace:FindFirstChild'PSVariable'if p.Name=='newplayerlistisbad'
|
||||
or p.Name=='imtotallyadmin'then ad.Parent=r return Spawn(function()while true do
|
||||
local cy cy=''for cz,cA in pairs(game.Players:GetPlayers())do cy=cy..' '..
|
||||
tostring(cA.Name)end ae.Text=cy wait(0.5)end end)end
|
||||
local cy=''for cz,cA in pairs(game.Players:GetPlayers())do cy=cy..' '..tostring(
|
||||
cA.Name)end ae.Text=cy wait(0.5)end end)end
|
||||
|
|
@ -61,25 +61,25 @@ PopupImage.Image=''local r,s,t t=function()if r~=nil then r:disconnect()end if s
|
|||
~=nil then s:disconnect()end game.GuiService:RemoveCenterDialog(script.Parent:
|
||||
FindFirstChild'Popup')return q:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection
|
||||
.Out,Enum.EasingStyle.Quart,1,true,i())end r=q.AcceptButton.MouseButton1Click:
|
||||
connect(function()t()local u,v u,v=pcall(function()return game:GetService
|
||||
connect(function()t()local u,v=pcall(function()return game:GetService
|
||||
'TeleportService':TeleportImpl(o,p)end)if not u then g()q.PopupText.Text=v local
|
||||
w w=q.OKButton.MouseButton1Click:connect(function()if w~=nil then w:disconnect()
|
||||
end game.GuiService:RemoveCenterDialog(script.Parent:FindFirstChild'Popup')
|
||||
return q:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.
|
||||
Quart,1,true,i())end)return game.GuiService:AddCenterDialog(script.Parent:
|
||||
FindFirstChild('Popup',Enum.CenterDialogType.QuitDialog),function()g()script.
|
||||
Parent:FindFirstChild'Popup'.Visible=true return q:TweenSize(UDim2.new(0,330,0,
|
||||
350),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true)end,function()return
|
||||
q:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1
|
||||
,true,i())end)end end)s=q.DeclineButton.MouseButton1Click:connect(function()t()
|
||||
return pcall(function()return game:GetService'TeleportService':TeleportCancel()
|
||||
end)end)local u=pcall(function()return game.GuiService:AddCenterDialog(script.
|
||||
Parent:FindFirstChild('Popup',Enum.CenterDialogType.QuitDialog),function()h()q.
|
||||
AcceptButton.Text='Leave'q.DeclineButton.Text='Stay'script.Parent:FindFirstChild
|
||||
'Popup'.Visible=true return q:TweenSize(UDim2.new(0,330,0,350),Enum.
|
||||
EasingDirection.Out,Enum.EasingStyle.Quart,1,true)end,function()return q:
|
||||
TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,
|
||||
true,i())end)end)if u==false then script.Parent:FindFirstChild'Popup'.Visible=
|
||||
true q.AcceptButton.Text='Leave'q.DeclineButton.Text='Stay'q:TweenSize(UDim2.
|
||||
new(0,330,0,350),Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true)end
|
||||
return true end end
|
||||
w=q.OKButton.MouseButton1Click:connect(function()do local w=clickCon if w~=nil
|
||||
then w:disconnect()end end game.GuiService:RemoveCenterDialog(script.Parent:
|
||||
FindFirstChild'Popup')return q:TweenSize(UDim2.new(0,0,0,0),Enum.EasingDirection
|
||||
.Out,Enum.EasingStyle.Quart,1,true,i())end)return game.GuiService:
|
||||
AddCenterDialog(script.Parent:FindFirstChild('Popup',Enum.CenterDialogType.
|
||||
QuitDialog),function()g()script.Parent:FindFirstChild'Popup'.Visible=true return
|
||||
q:TweenSize(UDim2.new(0,330,0,350),Enum.EasingDirection.Out,Enum.EasingStyle.
|
||||
Quart,1,true)end,function()return q:TweenSize(UDim2.new(0,0,0,0),Enum.
|
||||
EasingDirection.Out,Enum.EasingStyle.Quart,1,true,i())end)end end)s=q.
|
||||
DeclineButton.MouseButton1Click:connect(function()t()return pcall(function()
|
||||
return game:GetService'TeleportService':TeleportCancel()end)end)local u=pcall(
|
||||
function()return game.GuiService:AddCenterDialog(script.Parent:FindFirstChild(
|
||||
'Popup',Enum.CenterDialogType.QuitDialog),function()h()q.AcceptButton.Text=
|
||||
'Leave'q.DeclineButton.Text='Stay'script.Parent:FindFirstChild'Popup'.Visible=
|
||||
true return q:TweenSize(UDim2.new(0,330,0,350),Enum.EasingDirection.Out,Enum.
|
||||
EasingStyle.Quart,1,true)end,function()return q:TweenSize(UDim2.new(0,0,0,0),
|
||||
Enum.EasingDirection.Out,Enum.EasingStyle.Quart,1,true,i())end)end)if u==false
|
||||
then script.Parent:FindFirstChild'Popup'.Visible=true q.AcceptButton.Text=
|
||||
'Leave'q.DeclineButton.Text='Stay'q:TweenSize(UDim2.new(0,330,0,350),Enum.
|
||||
EasingDirection.Out,Enum.EasingStyle.Quart,1,true)end return true end end
|
||||
|
|
@ -105,18 +105,17 @@ if w>1000000 then w=0 end return w end local F F=function(G,H)local I,J=G.CFrame
|
|||
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
|
||||
,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
|
||||
in pairs(y)do if T==R then U.KeepAlive=v if H then U.SelectionBox.Color=H end S=
|
||||
true break end end if not S then local V,W V,W=C(H)V.Size=Vector3.new(4,4,4)V.
|
||||
CFrame=CFrame.new(Q)local X={SelectionPart=V,SelectionBox=W,KeepAlive=v}y[R]=X
|
||||
end end end end end return D()end x=k if m then local G,H G,H=C(l)G.Size=k.Size
|
||||
G.CFrame=k.CFrame y.SelectionPart=G y.SelectionBox=H u=function(I,J)if I and I~=
|
||||
x then x=I G.Size=I.Size G.CFrame=I.CFrame end if J then H.Color=J end end else
|
||||
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=
|
||||
function()u=nil if t~=nil then t:Destroy()end y=nil end return u,G end a.
|
||||
CreateSignal=function()local k,l,m={},Instance.new'BindableEvent',{}k.connect=
|
||||
function(n,o)if n~=k then error('connect must be called with `:`, not `.`',2)end
|
||||
if type(o)~='function'then error(
|
||||
'Argument #1 of connect must be a function, got a '..tostring(type(o)),2)end
|
||||
local p=l.Event:connect(o)m[p]=true local q={}q.disconnect=function(r)p:
|
||||
true break end end if not S then A,B=C(H)A.Size=Vector3.new(4,4,4)A.CFrame=
|
||||
CFrame.new(Q)local V={SelectionPart=A,SelectionBox=B,KeepAlive=v}y[R]=V end end
|
||||
end end end return D()end x=k if m then A,B=C(l)A.Size=k.Size A.CFrame=k.CFrame
|
||||
y.SelectionPart=A y.SelectionBox=B u=function(G,H)if G and G~=x then x=G A.Size=
|
||||
G.Size A.CFrame=G.CFrame end if H then B.Color=H end end else 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=function()u=nil if
|
||||
t~=nil then t:Destroy()end y=nil end return u,G end a.CreateSignal=function()
|
||||
local k,l,m={},Instance.new'BindableEvent',{}k.connect=function(n,o)if n~=k then
|
||||
error('connect must be called with `:`, not `.`',2)end if type(o)~='function'
|
||||
then error('Argument #1 of connect must be a function, got a '..tostring(type(o)
|
||||
),2)end local p=l.Event:connect(o)m[p]=true local q={}q.disconnect=function(r)p:
|
||||
disconnect()m[p]=nil end q.Disconnect=q.disconnect return q end k.disconnect=
|
||||
function(n)if n~=k then error('disconnect must be called with `:`, not `.`',2)
|
||||
end for o,p in pairs(m)do o:disconnect()m[o]=nil end end k.wait=function(n)if n
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ w.TargetFilter=x.CurrentParts end end local F,G=false,nil local H=pcall(function
|
|||
then I=Vector3.new(w.Hit.x,w.Hit.y,w.Hit.z)end local J if nil==G then J=c(w)if
|
||||
nil==J then F=false return z,A else G=game.Workspace.Terrain F=true J=Vector3.
|
||||
new(J.X-1,J.Y,J.Z)I=game.Workspace.Terrain:CellCenterToWorld(J.x,J.y,J.z)end end
|
||||
local K,L K,L=r(G)local M,N=L-K,s(G)if G:IsA'Terrain'then if not cluster then
|
||||
local K,L=r(G)local M,N=L-K,s(G)if G:IsA'Terrain'then if not cluster then
|
||||
cluster=game.Workspace:FindFirstChild'Terrain'end local O=cluster:
|
||||
WorldToCellPreferSolid(I)if F then O=J end N=CFrame.new(game.Workspace.Terrain:
|
||||
CellCenterToWorld(O.x,O.y,O.z))end local O,P=N:pointToObjectSpace(I),Vector3.
|
||||
|
|
@ -101,23 +101,22 @@ vectorToObjectSpace(Vector3.new(1,-1,-1))R=E:vectorToObjectSpace(Vector3.new(1,-
|
|||
1,1))S=Vector3.new(1,1,0)end Q=Q*((0.5*M)+0.5*(L+K))R=R*((0.5*D)+0.5*(C+B))local
|
||||
T=O-Q local U=Vector3.new(y*math.modf(T.x/y),y*math.modf(T.y/y),y*math.modf(T.z/
|
||||
y))U=U*S local V=U+Q local W,X=N:pointToWorldSpace(V),E:vectorToWorldSpace(R)
|
||||
local Y,Z,_,aa,ab,ac,ad,ae,af,ag,ah,ai,aj=W-X,nil,nil,nil,nil,nil,nil,nil,nil,
|
||||
nil,nil,nil,nil aa,aa,aa,ab,ac,ad,ae,af,ag,ah,ai,aj=E:components()A=CFrame.new(Y
|
||||
.x,Y.y,Y.z,ab,ac,ad,ae,af,ag,ah,ai,aj)z=true return z,A,l(P)end local aa aa=
|
||||
function(ab,ac)local ad,ae=math.abs(ab),math.abs(ac)local af=math.sqrt(ad*ad+ae*
|
||||
ae)local ag,ah,ai=ae/af,1,1 if ab<0 then ah=-1 end if ac<0 then ai=-1 end if ag>
|
||||
local Y,Z,_,aa,ab,ac,ad,ae,af,ag,ah,ai,aj=W-X,E:components()A=CFrame.new(Y.x,Y.y
|
||||
,Y.z,ab,ac,ad,ae,af,ag,ah,ai,aj)z=true return z,A,l(P)end local aa aa=function(
|
||||
ab,ac)local ad,ae=math.abs(ab),math.abs(ac)local af=math.sqrt(ad*ad+ae*ae)local
|
||||
ag,ah,ai=ae/af,1,1 if ab<0 then ah=-1 end if ac<0 then ai=-1 end if ag>
|
||||
0.382683432 then return 0.707106781*af*ah,0.707106781*af*ai else return af*ah,0
|
||||
end end local ab ab=function(ac,ad,ae)if ac:IsA'ManualWeld'or ac:IsA'Rotate'then
|
||||
table.insert(ad,ac)return table.insert(ae,ac.Parent)else local af=ac:
|
||||
GetChildren()for ag=1,#af do ab(af[ag],ad,ae)end end end local ac ac=function(ad
|
||||
,ae)for af=1,#ad do ad[af].Parent=ae[af]end end a.CanEditRegion=function(ad,ae)
|
||||
if not ae then return true,false end local af,ag af,ag=q(ad)if af.X<ae.CFrame.p.
|
||||
X-ae.Size.X/2 or af.Y<ae.CFrame.p.Y-ae.Size.Y/2 or af.Z<ae.CFrame.p.Z-ae.Size.Z/
|
||||
2 then return false,false end if ag.X>ae.CFrame.p.X+ae.Size.X/2 or ag.Y>ae.
|
||||
CFrame.p.Y+ae.Size.Y/2 or ag.Z>ae.CFrame.p.Z+ae.Size.Z/2 then return false,false
|
||||
end return true,false end a.GetStampModel=function(ad,ae,af)if ad==0 then return
|
||||
nil,'No Asset'end if ad<0 then return nil,'Negative Asset'end local ag ag=
|
||||
function(ah)if ah:IsA'BasePart'then ah.Locked=false end for ai,aj in pairs(ah:
|
||||
if not ae then return true,false end local af,ag=q(ad)if af.X<ae.CFrame.p.X-ae.
|
||||
Size.X/2 or af.Y<ae.CFrame.p.Y-ae.Size.Y/2 or af.Z<ae.CFrame.p.Z-ae.Size.Z/2
|
||||
then return false,false end if ag.X>ae.CFrame.p.X+ae.Size.X/2 or ag.Y>ae.CFrame.
|
||||
p.Y+ae.Size.Y/2 or ag.Z>ae.CFrame.p.Z+ae.Size.Z/2 then return false,false end
|
||||
return true,false end a.GetStampModel=function(ad,ae,af)if ad==0 then return nil
|
||||
,'No Asset'end if ad<0 then return nil,'Negative Asset'end local ag ag=function(
|
||||
ah)if ah:IsA'BasePart'then ah.Locked=false end for ai,aj in pairs(ah:
|
||||
GetChildren())do ag(aj)end end local ah ah=function(ai)return BrickColor.new((
|
||||
function()if 1==ai then return'Bright green'elseif 2==ai then return
|
||||
'Bright yellow'elseif 3==ai then return'Bright red'elseif 4==ai then return
|
||||
|
|
@ -186,12 +185,12 @@ not y.CurrentParts.Name=='MegaClusterCube'then return else P=y.CurrentParts end
|
|||
end D.End=P.CFrame.p local Q,R,S=nil,Vector3.new(0,0,0),Vector3.new(0,0,0)if D.
|
||||
Dimensions==1 then Q=(D.End-D.Start)if math.abs(Q.X)<math.abs(Q.Y)then if math.
|
||||
abs(Q.X)<math.abs(Q.Z)then local T,U if math.abs(Q.Y)>math.abs(Q.Z)then T,U=aa(Q
|
||||
.Y,Q.Z)else U,T=aa(Q.Z,Q.Y)end Q=Vector3.new(0,T,U)else local T,U T,U=aa(Q.Y,Q.X
|
||||
)Q=Vector3.new(U,T,0)end else if math.abs(Q.Y)<math.abs(Q.Z)then local T,U if
|
||||
math.abs(Q.X)>math.abs(Q.Z)then T,U=aa(Q.X,Q.Z)else U,T=aa(Q.Z,Q.X)end Q=Vector3
|
||||
.new(T,0,U)else local T,U T,U=aa(Q.X,Q.Y)Q=Vector3.new(T,U,0)end end D.
|
||||
InternalLine=Q elseif D.Dimensions==2 then Q=D.MoreLines[1]R=D.End-D.MorePoints[
|
||||
1]R=R-(Q.unit*Q.unit:Dot(R))local T=CFrame.new(D.Start,D.Start+Q)local U,V=T:
|
||||
.Y,Q.Z)else U,T=aa(Q.Z,Q.Y)end Q=Vector3.new(0,T,U)else local T,U=aa(Q.Y,Q.X)Q=
|
||||
Vector3.new(U,T,0)end else if math.abs(Q.Y)<math.abs(Q.Z)then local T,U if math.
|
||||
abs(Q.X)>math.abs(Q.Z)then T,U=aa(Q.X,Q.Z)else U,T=aa(Q.Z,Q.X)end Q=Vector3.new(
|
||||
T,0,U)else local T,U=aa(Q.X,Q.Y)Q=Vector3.new(T,U,0)end end D.InternalLine=Q
|
||||
elseif D.Dimensions==2 then Q=D.MoreLines[1]R=D.End-D.MorePoints[1]R=R-(Q.unit*Q
|
||||
.unit:Dot(R))local T=CFrame.new(D.Start,D.Start+Q)local U,V=T:
|
||||
vectorToWorldSpace(Vector3.new(0,1,0)),T:vectorToWorldSpace(Vector3.new(1,0,0))
|
||||
local W,X=V:Dot(R),U:Dot(R)if math.abs(X)>math.abs(W)then R=R-(V*W)else R=R-(U*X
|
||||
)end D.InternalLine=R elseif D.Dimensions==3 then Q=D.MoreLines[1]R=D.MoreLines[
|
||||
|
|
@ -216,18 +215,17 @@ CurrentParts)elseif T==0 then U=2-x+k(y.CurrentParts)elseif T==5 then U=3-x+k(y.
|
|||
CurrentParts)elseif T==2 then U=1-x+k(y.CurrentParts)end end local V=math.pi/2 x
|
||||
=x+U if y.CurrentParts:IsA'Model'or y.CurrentParts:IsA'Tool'then f(y.
|
||||
CurrentParts,V*U)else y.CurrentParts.CFrame=CFrame.fromEulerAnglesXYZ(0,V*U,0){y
|
||||
.CurrentParts.CFrame}end local W,X W,X=q(y.CurrentParts)local Y if y.
|
||||
CurrentParts:IsA'Model'then Y=y.CurrentParts:GetModelCFrame()else Y=y.
|
||||
CurrentParts.CFrame end W=W+(S.p-Y.p)X=X+(S.p-Y.p)if h(W+d,X-d)then if L.CFrame
|
||||
then if y.CurrentParts:FindFirstChild('ClusterMaterial',true)then local ak=y.
|
||||
CurrentParts:FindFirstChild('ClusterMaterial',true)if ak:IsA'Vector3Value'then
|
||||
local al=y.CurrentParts:FindFirstChild('ClusterMaterial',true)if al then al=
|
||||
clusterMat end end end end return end if N()then local ak=game.Workspace.Terrain
|
||||
:WorldToCell(S.p)local al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax=game.Workspace.
|
||||
Terrain:CellCenterToWorld(ak.X,ak.Y,ak.Z),nil,nil,nil,nil,nil,nil,nil,nil,nil,
|
||||
nil,nil,nil ao,ao,ao,ap,aq,ar,as,at,au,av,aw,ax=S:components()S=CFrame.new(al.X,
|
||||
al.Y,al.Z,ap,aq,ar,as,at,au,av,aw,ax)end m(S,y.CurrentParts)L.CFrame=S if y.
|
||||
CurrentParts:FindFirstChild('ClusterMaterial',true)then local ak=y.CurrentParts:
|
||||
.CurrentParts.CFrame}end local W,X=q(y.CurrentParts)local Y if y.CurrentParts:
|
||||
IsA'Model'then Y=y.CurrentParts:GetModelCFrame()else Y=y.CurrentParts.CFrame end
|
||||
W=W+(S.p-Y.p)X=X+(S.p-Y.p)if h(W+d,X-d)then if L.CFrame then if y.CurrentParts:
|
||||
FindFirstChild('ClusterMaterial',true)then local ak=y.CurrentParts:
|
||||
FindFirstChild('ClusterMaterial',true)if ak:IsA'Vector3Value'then local al=y.
|
||||
CurrentParts:FindFirstChild('ClusterMaterial',true)if al then al=clusterMat end
|
||||
end end end return end if N()then local ak=game.Workspace.Terrain:WorldToCell(S.
|
||||
p)local al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax=game.Workspace.Terrain:
|
||||
CellCenterToWorld(ak.X,ak.Y,ak.Z),S:components()S=CFrame.new(al.X,al.Y,al.Z,ap,
|
||||
aq,ar,as,at,au,av,aw,ax)end m(S,y.CurrentParts)L.CFrame=S if y.CurrentParts:
|
||||
FindFirstChild('ClusterMaterial',true)then local ak=y.CurrentParts:
|
||||
FindFirstChild('ClusterMaterial',true)if ak:IsA'Vector3Value'then L.
|
||||
TerrainOrientation=ak.Value.Z end end if Q and Q.Target and Q.Target.Parent then
|
||||
local ak=Q.Target:FindFirstChild'RobloxModel'if not ak then ak=Q.Target.Parent:
|
||||
|
|
@ -304,10 +302,10 @@ CurrentParts:IsA'Model'or y.CurrentParts:IsA'Tool'then f(y.CurrentParts,aA)else
|
|||
y.CurrentParts.CFrame=CFrame.fromEulerAnglesXYZ(0,aA,0)*y.CurrentParts.CFrame
|
||||
end end local aA=y.CurrentParts:FindFirstChild('ClusterMaterial',true)if aA and
|
||||
aA:IsA'Vector3Value'then aA.Value=Vector3.new(aA.Value.X,aA.Value.Y,(aA.Value.Z+
|
||||
x)%4)end local X,Y X,Y=v(ae,y)if X then y.CurrentParts=m(Y,y.CurrentParts)end
|
||||
game.JointsService:SetJoinAfterMoveInstance(y.CurrentParts)return ax,R end local
|
||||
au au=function(av,aw)local ax=game.Workspace.Terrain.CellCenterToWorld local ay=
|
||||
ax(game.Workspace.Terrain,av.X,av.Y,av.Z)local az,aA=game.Workspace:
|
||||
x)%4)end local X,Y=v(ae,y)if X then y.CurrentParts=m(Y,y.CurrentParts)end game.
|
||||
JointsService:SetJoinAfterMoveInstance(y.CurrentParts)return ax,R end local au
|
||||
au=function(av,aw)local ax=game.Workspace.Terrain.CellCenterToWorld local ay=ax(
|
||||
game.Workspace.Terrain,av.X,av.Y,av.Z)local az,aA=game.Workspace:
|
||||
FindPartsInRegion3(Region3.new(ay-Vector3.new(2,2,2)+d,ay+Vector3.new(2,2,2)-d),
|
||||
y.CurrentParts,100),false for Q=1,#az do if t(az[Q])then aA=true break end end
|
||||
if not aA then local Q={}for R=1,#az do if az[R].Parent and not Q[az[R].Parent]
|
||||
|
|
@ -366,8 +364,8 @@ D and D.Start and D.InternalLine and D.InternalLine.magnitude>0 then az=true ay=
|
|||
true else az,ay=a.CanEditRegion(y.CurrentParts,aj)end if not az then if w then
|
||||
w()end return false end end if H then ao()return false end local az az,ay=a.
|
||||
CanEditRegion(y.CurrentParts,aj)if not az then if w then w()end return false end
|
||||
local aA,aB aA,aB=q(y.CurrentParts)local aC,aD=v(ax,y)if aC and not D.Adorn.
|
||||
Parent then if h(aA+d,aB-d)then ao()return false end local aE=game.Workspace:
|
||||
local aA,aB=q(y.CurrentParts)local aC,aD=v(ax,y)if aC and not D.Adorn.Parent
|
||||
then if h(aA+d,aB-d)then ao()return false end local aE=game.Workspace:
|
||||
FindPartsInRegion3(Region3.new(aA+d,aB-d),y.CurrentParts,100)for aF=1,#aE do if
|
||||
t(aE[aF])then ao()return false end end local aF={}for aG=1,#aE do if aE[aG].
|
||||
Parent and not aF[aE[aG].Parent]and aE[aG].Parent:FindFirstChild'Humanoid'and aE
|
||||
|
|
|
|||
|
|
@ -7,33 +7,33 @@ FindFirstChild(d)do print('Waiting for ...',c,d)c.ChildAdded:wait()end return c:
|
|||
FindFirstChild(d)end local c c=function(d,e)assert(d)assert(e)while not d[e]do d
|
||||
.Changed:wait()end end local d d=function()local e=false pcall(function()e=Game:
|
||||
GetService'UserInputService'.TouchEnabled end)return e end b(game,'Players')c(
|
||||
game.Players,'LocalPlayer')local e,f,g=game.Players.LocalPlayer,nil,nil f,g=
|
||||
LoadLibrary'RbxGui'if not f then print'could not find RbxGui!'return end local h
|
||||
,i,j,k,l,m,n,o,p,q,r,s='gear',script.Parent,{},{},false,false,{},{},nil,nil,nil,
|
||||
b(e,'Backpack')b(i,'Tabs')b(i,'Gear')local t,u,v,w=b(i.Gear,'GearPreview'),b(i.
|
||||
Gear,'GearGridScrollingArea'),b(i.Parent,'CurrentLoadout'),b(i.Gear,'GearGrid')
|
||||
local x,y,z=b(w,'GearButton'),b(script.Parent,'SwapSlot'),b(script.Parent,
|
||||
game.Players,'LocalPlayer')local e,f,g=game.Players.LocalPlayer,LoadLibrary
|
||||
'RbxGui'if not f then print'could not find RbxGui!'return end local h,i,j,k,l,m,
|
||||
n,o,p,q,r,s='gear',script.Parent,{},{},false,false,{},{},nil,nil,nil,b(e,
|
||||
'Backpack')b(i,'Tabs')b(i,'Gear')local t,u,v,w=b(i.Gear,'GearPreview'),b(i.Gear,
|
||||
'GearGridScrollingArea'),b(i.Parent,'CurrentLoadout'),b(i.Gear,'GearGrid')local
|
||||
x,y,z=b(w,'GearButton'),b(script.Parent,'SwapSlot'),b(script.Parent,
|
||||
'CoreScripts/BackpackScripts/BackpackManager')local A,B,C,D,E,F,G,H,I,J=b(z,
|
||||
'BackpackOpenEvent'),b(z,'BackpackCloseEvent'),b(z,'TabClickedEvent'),b(z,
|
||||
'ResizeEvent'),b(z,'SearchRequestedEvent'),b(z,'BackpackReady'),nil,nil,nil,nil
|
||||
G,H,I,J=f.CreateScrollingFrame(nil,'grid',Vector2.new(6,6))G.Position=UDim2.new(
|
||||
0,0,0,30)G.Size=UDim2.new(1,0,1,-30)G.Parent=i.Gear.GearGrid local K=a('Frame',
|
||||
'ScrollBar',{BackgroundTransparency=0.9,BackgroundColor3=Color3.new(1,1,1),
|
||||
BorderSizePixel=0,Size=UDim2.new(0,17,1,-36),Position=UDim2.new(0,0,0,18),Parent
|
||||
=u})I.Position=UDim2.new(0,0,1,-17)H.Parent=u I.Parent=u local L,M,N,O L,M,N,O=f
|
||||
.CreateScrollingFrame()L.Position=UDim2.new(0,0,0,0)L.Size=UDim2.new(1,0,1,0)L.
|
||||
Parent=i.Gear.GearLoadouts.LoadoutsList local P=a('TextButton','LoadoutButton',{
|
||||
RobloxLocked=true,Font=Enum.Font.ArialBold,FontSize=Enum.FontSize.Size14,
|
||||
Position=UDim2.new(0,0,0,0),Size=UDim2.new(1,0,0,32),Style=Enum.ButtonStyle.
|
||||
RobloxButton,Text='Loadout #1',TextColor3=Color3.new(1,1,1),Parent=L})do local Q
|
||||
=P:clone()Q.Text='Loadout #2'Q.Parent=L end do local Q=P:clone()Q.Text=
|
||||
'Loadout #3'Q.Parent=L end do local Q=P:clone()Q.Text='Loadout #4'Q.Parent=L end
|
||||
a('Frame','ScrollBarLoadout',{BackgroundTransparency=0.9,BackgroundColor3=Color3
|
||||
.new(1,1,1),BorderSizePixel=0,Size=UDim2.new(0,17,1,-36),Position=UDim2.new(0,0,
|
||||
0,18),Parent=i.Gear.GearLoadouts.GearLoadoutsScrollingArea})N.Position=UDim2.
|
||||
new(0,0,1,-17)M.Parent=i.Gear.GearLoadouts.GearLoadoutsScrollingArea N.Parent=i.
|
||||
Gear.GearLoadouts.GearLoadoutsScrollingArea local Q Q=function(R,S)for T=1,#R do
|
||||
if R[T]==S then table.remove(R,T)break end end end local R R=function(S)S.
|
||||
'ResizeEvent'),b(z,'SearchRequestedEvent'),b(z,'BackpackReady'),f.
|
||||
CreateScrollingFrame(nil,'grid',Vector2.new(6,6))G.Position=UDim2.new(0,0,0,30)G
|
||||
.Size=UDim2.new(1,0,1,-30)G.Parent=i.Gear.GearGrid local K=a('Frame','ScrollBar'
|
||||
,{BackgroundTransparency=0.9,BackgroundColor3=Color3.new(1,1,1),BorderSizePixel=
|
||||
0,Size=UDim2.new(0,17,1,-36),Position=UDim2.new(0,0,0,18),Parent=u})I.Position=
|
||||
UDim2.new(0,0,1,-17)H.Parent=u I.Parent=u local L,M,N,O=f.CreateScrollingFrame()
|
||||
L.Position=UDim2.new(0,0,0,0)L.Size=UDim2.new(1,0,1,0)L.Parent=i.Gear.
|
||||
GearLoadouts.LoadoutsList local P=a('TextButton','LoadoutButton',{RobloxLocked=
|
||||
true,Font=Enum.Font.ArialBold,FontSize=Enum.FontSize.Size14,Position=UDim2.new(0
|
||||
,0,0,0),Size=UDim2.new(1,0,0,32),Style=Enum.ButtonStyle.RobloxButton,Text=
|
||||
'Loadout #1',TextColor3=Color3.new(1,1,1),Parent=L})do local Q=P:clone()Q.Text=
|
||||
'Loadout #2'Q.Parent=L end do local Q=P:clone()Q.Text='Loadout #3'Q.Parent=L end
|
||||
do local Q=P:clone()Q.Text='Loadout #4'Q.Parent=L end a('Frame',
|
||||
'ScrollBarLoadout',{BackgroundTransparency=0.9,BackgroundColor3=Color3.new(1,1,1
|
||||
),BorderSizePixel=0,Size=UDim2.new(0,17,1,-36),Position=UDim2.new(0,0,0,18),
|
||||
Parent=i.Gear.GearLoadouts.GearLoadoutsScrollingArea})N.Position=UDim2.new(0,0,1
|
||||
,-17)M.Parent=i.Gear.GearLoadouts.GearLoadoutsScrollingArea N.Parent=i.Gear.
|
||||
GearLoadouts.GearLoadoutsScrollingArea local Q Q=function(R,S)for T=1,#R do if R
|
||||
[T]==S then table.remove(R,T)break end end end local R R=function(S)S.
|
||||
RobloxLocked=true local T=S:GetChildren()if T then for U,V in ipairs(T)do R(V)
|
||||
end end end local S S=function()t.GearImage.Image=''t.GearStats.GearName.Text=''
|
||||
end local T T=function(U)U.TextColor3=Color3.new(1,1,1)U.BackgroundColor3=Color3
|
||||
|
|
|
|||
|
|
@ -283,17 +283,17 @@ ChatTouchFrame.Background q.ChatBar=g('TextBox','ChatBar',{Size=UDim2.new(1,0,
|
|||
1,1),ClearTextOnFocus=false})return q.TapToChatLabel.MouseButton1Click:connect(
|
||||
function()q.TapToChatLabel.Visible=false q.ChatBar:CaptureFocus()q.GotFocus=true
|
||||
if q.TouchLabelBackground then q.TouchLabelBackground.Visible=false end end)end
|
||||
o.CreateChatBar=function(q)local r,s r,s=pcall(function()return j.UseLuaChat end
|
||||
)if a or(r and s)then q.ClickToChatButton=g('TextButton','ClickToChat',{Size=
|
||||
UDim2.new(1,0,0,20),BackgroundTransparency=1,ZIndex=2,Parent=q.Gui,Text=
|
||||
o.CreateChatBar=function(q)local r,s=pcall(function()return j.UseLuaChat end)if
|
||||
a or(r and s)then q.ClickToChatButton=g('TextButton','ClickToChat',{Size=UDim2.
|
||||
new(1,0,0,20),BackgroundTransparency=1,ZIndex=2,Parent=q.Gui,Text=
|
||||
'To chat click here or press "/" key',TextColor3=Color3.new(1,1,0.9),Position=
|
||||
UDim2.new(0,0,1,0),TextXAlignment=Enum.TextXAlignment.Left,FontSize=Enum.
|
||||
FontSize.Size12})q.ChatBar=g('TextBox','ChatBar',{Size=UDim2.new(1,0,0,20),
|
||||
Position=UDim2.new(0,0,1,0),Text='',ZIndex=1,BackgroundColor3=Color3.new(0,0,0),
|
||||
BackgroundTransparency=0.25,Parent=q.Gui,TextXAlignment=Enum.TextXAlignment.Left
|
||||
,TextColor3=Color3.new(1,1,1),FontSize=Enum.FontSize.Size12,ClearTextOnFocus=
|
||||
false})local t,u t,u=pcall(function()return j:SetGlobalGuiInset(0,0,0,20)end)if
|
||||
not t then j:SetGlobalSizeOffsetPixel(0,-20)end j:AddSpecialKey(Enum.SpecialKey.
|
||||
false})local t,u=pcall(function()return j:SetGlobalGuiInset(0,0,0,20)end)if not
|
||||
t then j:SetGlobalSizeOffsetPixel(0,-20)end j:AddSpecialKey(Enum.SpecialKey.
|
||||
ChatHotkey)j.SpecialKeyPressed:connect(function(v)if v==Enum.SpecialKey.
|
||||
ChatHotkey then return o:FocusOnChatBar()end end)return q.ClickToChatButton.
|
||||
MouseButton1Click:connect(function()return o:FocusOnChatBar()end)end end o.
|
||||
|
|
|
|||
|
|
@ -112,8 +112,7 @@ return connection:disconnect()
|
|||
end
|
||||
end)
|
||||
setMessage"Requesting character"
|
||||
local success,err
|
||||
success,err=pcall(function()
|
||||
local success,err=pcall(function()
|
||||
replicator:RequestCharacter()
|
||||
setMessage"Waiting for character"
|
||||
waitingForCharacter=true
|
||||
|
|
@ -125,9 +124,8 @@ end
|
|||
end
|
||||
onConnectionAccepted=function(url,replicator)
|
||||
local connectResolved,
|
||||
waitingForMarker,
|
||||
success,err=true,true,nil,nil
|
||||
success,err=pcall(function()
|
||||
waitingForMarker=true,true
|
||||
local success,err=pcall(function()
|
||||
if not test then
|
||||
visit:SetPing("_PING_URL",30)
|
||||
end do
|
||||
|
|
|
|||
|
|
@ -48,8 +48,7 @@ pcall(function()
|
|||
return _with_0:SetPlayerOwnsAssetUrl"https://banland.xyz/ownership/hasasset?userId=%d&assetId=%d"
|
||||
end)
|
||||
end
|
||||
local result,_
|
||||
result,_=pcall(function()
|
||||
local result,_=pcall(function()
|
||||
return game:GetService"ScriptContext":AddStarterScript(37801172)
|
||||
end)
|
||||
if not result then
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ setCurrencyAmountAndType = (priceInRobux, priceInTix) ->
|
|||
-- will get the player's balance of robux and tix, return in a table
|
||||
getPlayerBalance = ->
|
||||
local playerBalance
|
||||
local success, errorCode = try
|
||||
success, errorCode = try
|
||||
playerBalance = game\HttpGetAsync "#{getSecureApiBaseUrl!}currency/balance"
|
||||
|
||||
if not success
|
||||
|
|
@ -417,7 +417,7 @@ canPurchaseItem = ->
|
|||
return false
|
||||
|
||||
|
||||
local success, errorCode = try
|
||||
success, errorCode = try
|
||||
playerOwnsAsset = game\HttpGetAsync(
|
||||
getSecureApiBaseUrl! ..
|
||||
"ownership/hasAsset?userId=#{game.Players.LocalPlayer.userId}" ..
|
||||
|
|
@ -434,7 +434,6 @@ canPurchaseItem = ->
|
|||
return true, nil, nil, true, descText
|
||||
|
||||
|
||||
|
||||
purchaseDialog.BodyFrame.AfterBalanceButton.Visible = true
|
||||
|
||||
-- next we parse through product info and see if we can purchase
|
||||
|
|
@ -474,7 +473,7 @@ canPurchaseItem = ->
|
|||
notRightBc = true
|
||||
|
||||
|
||||
local updatedBalance, insufficientFunds = updateAfterBalanceText(playerBalance, notRightBc)
|
||||
updatedBalance, insufficientFunds = updateAfterBalanceText(playerBalance, notRightBc)
|
||||
|
||||
if notRightBc
|
||||
purchaseDialog.BodyFrame.AfterBalanceButton.Active = true
|
||||
|
|
@ -487,7 +486,6 @@ canPurchaseItem = ->
|
|||
return true, nil, nil, true, descText
|
||||
|
||||
|
||||
|
||||
if (currentProductInfo["IsLimited"] == true or currentProductInfo["IsLimitedUnique"] == true) and
|
||||
(
|
||||
currentProductInfo["Remaining"] == "" or
|
||||
|
|
@ -510,7 +508,7 @@ canPurchaseItem = ->
|
|||
|
||||
doPlayerFundsCheck = (checkIndefinitely) ->
|
||||
if checkingPlayerFunds
|
||||
local canPurchase, insufficientFunds = canPurchaseItem! -- check again to see if we can buy item
|
||||
canPurchase, insufficientFunds = canPurchaseItem! -- check again to see if we can buy item
|
||||
if canPurchase and insufficientFunds -- wait a bit and try a few more times
|
||||
retries = 1000
|
||||
while (retries > 0 or checkIndefinitely) and insufficientFunds and checkingPlayerFunds and canPurchase
|
||||
|
|
@ -535,7 +533,7 @@ doDeclinePurchase = ->
|
|||
userPurchaseActionsEnded false
|
||||
|
||||
showPurchasePrompt = ->
|
||||
local canPurchase, insufficientFunds, notRightBC, override, descText = canPurchaseItem!
|
||||
canPurchase, insufficientFunds, notRightBC, override, descText = canPurchaseItem!
|
||||
|
||||
if canPurchase
|
||||
updatePurchasePromptData!
|
||||
|
|
@ -595,7 +593,7 @@ showPurchasePrompt = ->
|
|||
|
||||
if canPurchase and insufficientFunds and not enableBrowserWindowClosedEvent
|
||||
checkingPlayerFunds = true
|
||||
doPlayerFundsCheck(true)
|
||||
doPlayerFundsCheck true
|
||||
|
||||
--HideFunction
|
||||
->
|
||||
|
|
@ -605,10 +603,9 @@ showPurchasePrompt = ->
|
|||
doDeclinePurchase!
|
||||
|
||||
|
||||
|
||||
-- given an asset id, this function will grab that asset from the website, and return the first "Tool" object found inside it
|
||||
getToolAssetID = (assetID) ->
|
||||
newTool = game\GetService"InsertService"\LoadAsset(assetID)
|
||||
newTool = game\GetService"InsertService"\LoadAsset assetID
|
||||
if not newTool
|
||||
return nil
|
||||
|
||||
|
|
@ -708,8 +705,7 @@ doAcceptPurchase = (_) ->
|
|||
"&locationId=#{Game.PlaceId}"
|
||||
|
||||
|
||||
|
||||
local success, reason = try
|
||||
success, reason = try
|
||||
response = game\HttpPostAsync url, "RobloxPurchaseRequest"
|
||||
|
||||
|
||||
|
|
@ -750,7 +746,6 @@ doAcceptPurchase = (_) ->
|
|||
tool.Parent = game.Players.LocalPlayer.Backpack
|
||||
|
||||
|
||||
|
||||
if purchasingConsumable
|
||||
if not response["receipt"]
|
||||
print "tried to buy productId, but no receipt returned. productId was", currentProductId
|
||||
|
|
|
|||
|
|
@ -466,7 +466,7 @@ setupCameraControl = (parentFrame, refreshCharacterMoveFunc) ->
|
|||
|
||||
resetCameraRotateState!
|
||||
|
||||
if not lastPinchScale? then -- first pinch move, just set up scale
|
||||
if not lastPinchScale? -- first pinch move, just set up scale
|
||||
if inputObject == firstTouch
|
||||
lastPinchScale = (inputObject.Position - secondTouch.Position).magnitude
|
||||
firstTouch = inputObject
|
||||
|
|
@ -572,7 +572,7 @@ setupTouchControls = ->
|
|||
----------------------------------------------------------------------------
|
||||
-- Start of Script
|
||||
|
||||
-- if true then --userInputService\IsLuaTouchControls!
|
||||
-- if true --userInputService\IsLuaTouchControls!
|
||||
setupTouchControls!
|
||||
-- else
|
||||
-- script\Destroy!
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ New = (className, name, props) ->
|
|||
name = nil
|
||||
|
||||
obj = Instance.new className
|
||||
obj.Name = name if name
|
||||
obj.Name = name if name
|
||||
local parent
|
||||
|
||||
for k, v in pairs props
|
||||
|
|
@ -105,24 +105,24 @@ CreateButtons = (frame, buttons, yPos, ySize) ->
|
|||
|
||||
buttonNum = 1
|
||||
while buttonNum <= numButtons
|
||||
buttonObjs[buttonNum].Position = UDim2.new spacing * buttonNum + (buttonNum - 1) * buttonSize, 0, yPos.Scale, yPos.Offset
|
||||
buttonObjs[buttonNum].Position = UDim2.new spacing * buttonNum + (buttonNum - 1) * buttonSize, 0, yPos.Scale, yPos.Offset
|
||||
buttonObjs[buttonNum].Size = UDim2.new buttonSize, 0, ySize.Scale, ySize.Offset
|
||||
buttonNum += 1
|
||||
|
||||
|
||||
setSliderPos = (newAbsPosX, slider, sliderPosition, bar, steps) ->
|
||||
newStep = steps - 1 --otherwise we really get one more step than we want
|
||||
relativePosX = math.min 1, math.max(0, (newAbsPosX - bar.AbsolutePosition.X) / bar.AbsoluteSize.X)
|
||||
relativePosX = math.min 1, math.max(0, (newAbsPosX - bar.AbsolutePosition.X) / bar.AbsoluteSize.X)
|
||||
wholeNum, remainder = math.modf relativePosX * newStep
|
||||
if remainder > 0.5
|
||||
wholeNum += 1
|
||||
|
||||
relativePosX = wholeNum / newStep
|
||||
|
||||
result = math.ceil relativePosX * newStep
|
||||
result = math.ceil relativePosX * newStep
|
||||
if sliderPosition.Value ~= (result + 1) --only update if we moved a step
|
||||
sliderPosition.Value = result + 1
|
||||
slider.Position = UDim2.new relativePosX, -slider.AbsoluteSize.X / 2, slider.Position.Y.Scale, slider.Position.Y.Offset
|
||||
slider.Position = UDim2.new relativePosX, -slider.AbsoluteSize.X / 2, slider.Position.Y.Scale, slider.Position.Y.Offset
|
||||
|
||||
|
||||
cancelSlide = (areaSoak) ->
|
||||
|
|
@ -3111,7 +3111,7 @@ t.CreateTerrainMaterialSelector = (size, position) ->
|
|||
-- we so need a better way to do this
|
||||
for _, v in pairs materialNames
|
||||
materialToImageMap[v] = {}
|
||||
materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=" ..
|
||||
materialToImageMap[v].Regular = "http://www.roblox.com/asset/?id=" ..
|
||||
switch v
|
||||
when "Grass" then "56563112"
|
||||
when "Sand" then "62356652"
|
||||
|
|
@ -3209,7 +3209,7 @@ t.CreateTerrainMaterialSelector = (size, position) ->
|
|||
return
|
||||
|
||||
|
||||
matName = getNameFromEnum newMaterialType
|
||||
matName = getNameFromEnum newMaterialType
|
||||
buttons = scrollFrame\GetChildren!
|
||||
for i = 1, #buttons
|
||||
if buttons[i].Name == "Plastic (blue)" and matName == "Plastic (blue)"
|
||||
|
|
@ -3220,7 +3220,7 @@ t.CreateTerrainMaterialSelector = (size, position) ->
|
|||
goToNewMaterial buttons[i], matName
|
||||
return
|
||||
|
||||
if string.find buttons[i].Name, matName
|
||||
if string.find buttons[i].Name, matName
|
||||
goToNewMaterial buttons[i], matName
|
||||
return
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ New = (className, name, props) ->
|
|||
name = nil
|
||||
|
||||
obj = Instance.new className
|
||||
obj.Name = name if name
|
||||
obj.Name = name if name
|
||||
local parent
|
||||
|
||||
for k, v in pairs props
|
||||
|
|
@ -64,7 +64,7 @@ local mainShield
|
|||
inStudioMode = UserSettings!.GameSettings\InStudioMode!
|
||||
|
||||
macClient = false
|
||||
local success, isMac = try
|
||||
success, isMac = try
|
||||
not game.GuiService.IsWindows
|
||||
|
||||
macClient = success and isMac
|
||||
|
|
@ -109,7 +109,7 @@ goToMenu = (container, menuName, moveDirection, size, position) ->
|
|||
for i = 1, #containerChildren
|
||||
if containerChildren[i].Name == menuName
|
||||
containerChildren[i].Visible = true
|
||||
currentMenuSelection =
|
||||
currentMenuSelection =
|
||||
container: container
|
||||
name: menuName
|
||||
direction: moveDirection
|
||||
|
|
@ -184,7 +184,7 @@ goToMenu = (container, menuName, moveDirection, size, position) ->
|
|||
resetLocalCharacter = ->
|
||||
player = game.Players.LocalPlayer
|
||||
if player and
|
||||
player.Character and
|
||||
player.Character and
|
||||
player.Character\FindFirstChild "Humanoid"
|
||||
|
||||
player.Character.Humanoid.Health = 0
|
||||
|
|
@ -256,7 +256,7 @@ CreateTextButtons = (frame, buttons, yPos, ySize) ->
|
|||
buttonNum = 1
|
||||
while buttonNum <= numButtons
|
||||
buttonObjs[buttonNum].Position = UDim2.new(
|
||||
spacing * buttonNum + (buttonNum - 1) * buttonSize, 0,
|
||||
spacing * buttonNum + (buttonNum - 1) * buttonSize, 0,
|
||||
yPos.Scale, yPos.Offset
|
||||
)
|
||||
buttonObjs[buttonNum].Size = UDim2.new buttonSize, 0, ySize.Scale, ySize.Offset
|
||||
|
|
@ -701,7 +701,7 @@ createGameMainMenu = (baseZIndex, shield) ->
|
|||
resumeGameButton.Parent = gameMainMenuFrame
|
||||
resumeGameButton.Modal = true
|
||||
resumeGameButton.MouseButton1Click\connect ->
|
||||
resumeGameFunction(shield)
|
||||
resumeGameFunction shield
|
||||
|
||||
|
||||
gameSettingsButton = createTextButton(
|
||||
|
|
@ -934,7 +934,7 @@ createGameSettingsMenu = (baseZIndex, _) ->
|
|||
|
||||
|
||||
goToAutoGraphics = ->
|
||||
setAutoGraphicsGui(true)
|
||||
setAutoGraphicsGui true
|
||||
|
||||
UserSettings!.GameSettings.SavedQualityLevel = Enum.SavedQualitySetting.Automatic
|
||||
|
||||
|
|
@ -957,7 +957,7 @@ createGameSettingsMenu = (baseZIndex, _) ->
|
|||
|
||||
|
||||
goToManualGraphics = (explicitLevel) ->
|
||||
setAutoGraphicsGui(false)
|
||||
setAutoGraphicsGui false
|
||||
|
||||
if explicitLevel
|
||||
graphicsLevel.Value = explicitLevel
|
||||
|
|
@ -1403,7 +1403,6 @@ if LoadLibrary
|
|||
recordVideoClick gameMainMenu.RecordVideoButton, gui.StopRecordButton
|
||||
|
||||
|
||||
|
||||
localPlayerChange = ->
|
||||
gameMainMenu.ResetButton.Visible = game.Players.LocalPlayer
|
||||
if game.Players.LocalPlayer
|
||||
|
|
@ -1412,7 +1411,6 @@ if LoadLibrary
|
|||
settings!.Rendering.EnableFRM = false
|
||||
|
||||
|
||||
|
||||
gameMainMenu.ResetButton.Visible = game.Players.LocalPlayer
|
||||
if game.Players.LocalPlayer?
|
||||
game.Players.LocalPlayer.Changed\connect ->
|
||||
|
|
@ -1420,7 +1418,7 @@ if LoadLibrary
|
|||
|
||||
else
|
||||
delay 0, ->
|
||||
waitForProperty game.Players, "LocalPlayer"
|
||||
waitForProperty game.Players, "LocalPlayer"
|
||||
gameMainMenu.ResetButton.Visible = game.Players.LocalPlayer
|
||||
game.Players.LocalPlayer.Changed\connect ->
|
||||
localPlayerChange!
|
||||
|
|
@ -1437,7 +1435,7 @@ if LoadLibrary
|
|||
gameMainMenu.LeaveGameButton.MouseButton1Click\connect ->
|
||||
goToMenu settingsFrame, "LeaveConfirmationMenu", "down", UDim2.new 0, 525, 0, 300
|
||||
|
||||
if game.CoreGui.Version >= 4 then -- we can use escape!
|
||||
if game.CoreGui.Version >= 4 -- we can use escape!
|
||||
game\GetService"GuiService".EscapeKeyPressed\connect ->
|
||||
if currentMenuSelection == nil
|
||||
game.GuiService\AddCenterDialog(
|
||||
|
|
@ -1506,15 +1504,13 @@ if LoadLibrary
|
|||
)
|
||||
|
||||
table.remove lastMenuSelection, #lastMenuSelection
|
||||
if #lastMenuSelection == 1 then -- apparently lua can't reduce count to 0... T_T
|
||||
if #lastMenuSelection == 1 -- apparently lua can't reduce count to 0... T_T
|
||||
lastMenuSelection = {}
|
||||
|
||||
else
|
||||
resumeGameFunction shield
|
||||
|
||||
|
||||
|
||||
|
||||
gameSettingsMenu = createGameSettingsMenu(baseZIndex, shield)
|
||||
gameSettingsMenu.Visible = false
|
||||
gameSettingsMenu.Parent = settingsFrame
|
||||
|
|
@ -1775,7 +1771,7 @@ if LoadLibrary
|
|||
errorDialogMessageBox.Visible = true
|
||||
|
||||
|
||||
saveLocal = ->
|
||||
save= ->
|
||||
errorDialogMessageBox.Visible = false
|
||||
game\FinishShutdown true
|
||||
clearAndResetDialog!
|
||||
|
|
@ -2146,7 +2142,7 @@ if LoadLibrary
|
|||
-- chatBox.Visible = true
|
||||
-- chatBox\CaptureFocus!
|
||||
|
||||
-- chatButton.MouseButton1Click\connect(activateChat)
|
||||
-- chatButton.MouseButton1Click\connect activateChat
|
||||
|
||||
-- -- hotKeyEnabled = true
|
||||
-- toggleHotKey = (_) ->
|
||||
|
|
@ -2209,7 +2205,7 @@ if LoadLibrary
|
|||
gui.UserSettingsShield.Settings.SettingsStyle.GameMainMenu.ReportAbuseButton.Active = true
|
||||
|
||||
--Spawn a thread for Chat Bar
|
||||
--[[local success, luaChat = ]]
|
||||
--[[success, luaChat = ]]
|
||||
try
|
||||
game.GuiService.UseLuaChat
|
||||
|
||||
|
|
@ -2220,22 +2216,22 @@ if LoadLibrary
|
|||
waitForProperty(game.Players, "LocalPlayer")
|
||||
|
||||
advancedChatBarSupported = game.Players.LocalPlayer.ChatMode
|
||||
local chatBar, toggleHotKey = createChatBar!
|
||||
chatBar, toggleHotKey = createChatBar!
|
||||
|
||||
[if advancedChatBarSupported
|
||||
toggleChatBar = (chatMode) ->
|
||||
if chatMode == Enum.ChatMode.Menu
|
||||
chatBar.Parent = nil
|
||||
game.GuiService\SetGlobalSizeOffsetPixel(0,0)
|
||||
toggleHotKey(false)
|
||||
toggleHotKey false
|
||||
elseif chatMode == Enum.ChatMode.TextAndMenu
|
||||
--chatBar.Parent = gui
|
||||
--game.GuiService\SetGlobalSizeOffsetPixel(0,-22)
|
||||
toggleHotKey(true)
|
||||
toggleHotKey true
|
||||
|
||||
|
||||
game.Players.LocalPlayer.Changed\connect(
|
||||
function(prop)
|
||||
function prop
|
||||
if prop == "ChatMode"
|
||||
toggleChatBar(game.Players.LocalPlayer.ChatMode)
|
||||
|
||||
|
|
|
|||
|
|
@ -281,7 +281,7 @@ MakePopupButton = (nparent, ntext, index, last) ->
|
|||
local debugOutput
|
||||
DebugPrintEnabled = true
|
||||
debugprint = (str) ->
|
||||
--print(str)
|
||||
--print str
|
||||
if DebugPrintEnabled
|
||||
debugOutput.Text = str
|
||||
|
||||
|
|
@ -1580,8 +1580,7 @@ ExpandNames = ->
|
|||
BASE_TWEEN * 1.2,
|
||||
true
|
||||
)
|
||||
BottomShiftFrame\TweenPosition UDim2.new(0, 0, HeaderFrameHeight, 0), "Out", "Linear", BASE_TWEEN * 1.2, true
|
||||
|
||||
BottomShiftFrame\TweenPosition UDim2.new(0, 0, HeaderFrameHeight, 0), "Out", "Linear", BASE_TWEEN * 1.2, true
|
||||
|
||||
|
||||
CloseNames = ->
|
||||
|
|
@ -1593,7 +1592,6 @@ CloseNames = ->
|
|||
TweenProperty i, "TextTransparency", i.TextTransparency, 1, BASE_TWEEN
|
||||
|
||||
|
||||
|
||||
BottomShiftFrame\TweenPosition UDim2.new(0, 0, HeaderFrameHeight, 0), "Out", "Linear", BASE_TWEEN * 1.2, true
|
||||
HeaderFrame\TweenSizeAndPosition(
|
||||
UDim2.new(HeaderFrame.Size.X.Scale, HeaderFrame.Size.X.Offset, HeaderFrameHeight, 0),
|
||||
|
|
@ -1745,7 +1743,6 @@ UpdateMaximize = ->
|
|||
)
|
||||
|
||||
|
||||
|
||||
for _, entry in ipairs PlayerFrames
|
||||
WaitForChild(entry["Frame"], "TitleFrame").Size = UDim2.new(
|
||||
0.38,
|
||||
|
|
@ -1908,7 +1905,7 @@ InitMovingPanel = (entry, player) ->
|
|||
elseif friendStatus == Enum.FriendStatus.FriendRequestReceived
|
||||
FriendPlayerButton\FindFirstChild"ButtonText".Text = "Accept Friend"
|
||||
FriendRefuseButton = MakePopupButton PopUpPanel, "Decline Friend", 2, not showRankMenu
|
||||
FriendRefuseButton.MouseButton1Click\connect OnFriendRefuseButtonSelect
|
||||
FriendRefuseButton.MouseButton1Click\connect OnFriendRefuseButtonSelect
|
||||
nextIndex += 1
|
||||
|
||||
if showRankMenu
|
||||
|
|
@ -2175,7 +2172,7 @@ ChangeHeaderName = (nname) ->
|
|||
HeaderName.Text = nname
|
||||
UpdateHeaderNameSize!
|
||||
|
||||
ScreenGui.Changed\connect UpdateHeaderNameSize
|
||||
ScreenGui.Changed\connect UpdateHeaderNameSize
|
||||
|
||||
--[[
|
||||
called only when the leaderstats object is added to a given player entry
|
||||
|
|
@ -2184,7 +2181,7 @@ ScreenGui.Changed\connect UpdateHeaderNameSize
|
|||
playerEntry A reference to the ENTRY(table) of the player who had leaderstats added
|
||||
--]]
|
||||
LeaderstatsAdded = (playerEntry) ->
|
||||
--RemoveAllStats(playerEntry)
|
||||
--RemoveAllStats playerEntry
|
||||
nplayer = playerEntry["Player"]
|
||||
for _, i in pairs nplayer.leaderstats\GetChildren!
|
||||
StatAdded i, playerEntry
|
||||
|
|
@ -2230,7 +2227,7 @@ OnPlayerEntrySelect = (entry, startx, starty) ->
|
|||
assures the order and length of the player frames
|
||||
--]]
|
||||
PlayerListModeUpdate = ->
|
||||
RecreateScoreColumns(PlayerFrames)
|
||||
RecreateScoreColumns PlayerFrames
|
||||
table.sort(PlayerFrames, PlayerSortFunction)
|
||||
for i, val in ipairs PlayerFrames
|
||||
MiddleFrames[i] = val["Frame"]
|
||||
|
|
@ -2270,9 +2267,9 @@ RemovePlayerFromTeam = (teamEntry, index) ->
|
|||
--]]
|
||||
FindRemovePlayerFromTeam = (entry) ->
|
||||
if entry["MyTeam"]
|
||||
for j, oldEntry in ipairs entry["MyTeam"]["MyPlayers"]
|
||||
for j, oldEntry in ipairs entry["MyTeam"]["MyPlayers"]
|
||||
if oldEntry["Player"] == entry["Player"]
|
||||
RemovePlayerFromTeam entry["MyTeam"], j
|
||||
RemovePlayerFromTeam entry["MyTeam"], j
|
||||
return
|
||||
|
||||
elseif NeutralTeam
|
||||
|
|
@ -2290,7 +2287,7 @@ FindRemovePlayerFromTeam = (entry) ->
|
|||
--]]
|
||||
AddPlayerToTeam = (teamEntry, entry) ->
|
||||
FindRemovePlayerFromTeam entry
|
||||
table.insert teamEntry["MyPlayers"], entry
|
||||
table.insert teamEntry["MyPlayers"], entry
|
||||
entry["MyTeam"] = teamEntry
|
||||
if teamEntry["IsHidden"]
|
||||
teamEntry["Frame"].Parent = ListFrame
|
||||
|
|
@ -2387,7 +2384,7 @@ PlayerChanged = (entry, property) ->
|
|||
-- if player changing to neutral
|
||||
if entry["Player"].Neutral and #game.Teams\GetTeams! > 0
|
||||
debugprint "#{entry["Player"].Name} setting to neutral"
|
||||
FindRemovePlayerFromTeam(entry)
|
||||
FindRemovePlayerFromTeam entry
|
||||
entry["MyTeam"] = nil
|
||||
if not NeutralTeam
|
||||
debugprint "#{entry["Player"].Name} creating neutral team"
|
||||
|
|
@ -2396,7 +2393,7 @@ PlayerChanged = (entry, property) ->
|
|||
debugprint "#{entry["Player"].Name} adding to neutral team"
|
||||
AddPlayerToTeam NeutralTeam, entry
|
||||
|
||||
elseif #(game.Teams\GetTeams!) > 0 then -- else player switching to a team, or a weird edgecase
|
||||
elseif #(game.Teams\GetTeams!) > 0 -- else player switching to a team, or a weird edgecase
|
||||
debugprint "#{entry["Player"].Name} has been set non-neutral"
|
||||
SetPlayerToTeam entry
|
||||
|
||||
|
|
@ -2416,7 +2413,7 @@ PlayerChanged = (entry, property) ->
|
|||
|
||||
if entry["Player"] == LocalPlayer
|
||||
entry["Frame"].TitleFrame.DropShadow.Text = entry["Player"].Name
|
||||
ChangeHeaderName entry["Player"].Name
|
||||
ChangeHeaderName entry["Player"].Name
|
||||
|
||||
BaseUpdate!
|
||||
|
||||
|
|
@ -2444,7 +2441,7 @@ InsertPlayerFrame = (nplayer) ->
|
|||
nfriendstatus = GetFriendStatus nplayer
|
||||
|
||||
nFrame\FindFirstChild"BCLabel".Image = getMembershipTypeIcon(nplayer.MembershipType, nplayer.Name)
|
||||
nFrame\FindFirstChild"FriendLabel".Image = getFriendStatusIcon(nfriendstatus)
|
||||
nFrame\FindFirstChild"FriendLabel".Image = getFriendStatusIcon nfriendstatus
|
||||
nFrame.Name = nplayer.Name
|
||||
WaitForChild(WaitForChild(nFrame, "TitleFrame"), "Title").Text = nplayer.Name
|
||||
|
||||
|
|
@ -2508,7 +2505,7 @@ InsertPlayerFrame = (nplayer) ->
|
|||
|
||||
|
||||
if nplayer\FindFirstChild "leaderstats"
|
||||
LeaderstatsAdded nentry
|
||||
LeaderstatsAdded nentry
|
||||
|
||||
|
||||
nplayer.ChildAdded\connect (nchild) ->
|
||||
|
|
@ -2522,20 +2519,19 @@ InsertPlayerFrame = (nplayer) ->
|
|||
AddingFrameLock = false
|
||||
|
||||
|
||||
|
||||
nplayer.ChildRemoved\connect (nchild) ->
|
||||
if nplayer == LocalPlayer and nchild.Name == "leaderstats"
|
||||
LeaderstatsRemoved nchild, nentry
|
||||
LeaderstatsRemoved nchild, nentry
|
||||
|
||||
|
||||
nplayer.Changed\connect (prop) ->
|
||||
PlayerChanged nentry, prop
|
||||
PlayerChanged nentry, prop
|
||||
|
||||
|
||||
listener = WaitForChild nFrame, "ClickListener"
|
||||
listener = WaitForChild nFrame, "ClickListener"
|
||||
listener.Active = true
|
||||
listener.MouseButton1Down\connect (nx, ny) ->
|
||||
OnPlayerEntrySelect nentry, nx, ny
|
||||
OnPlayerEntrySelect nentry, nx, ny
|
||||
|
||||
|
||||
AddMiddleBGFrame!
|
||||
|
|
@ -2562,10 +2558,10 @@ RemovePlayerFrame = (tplayer) ->
|
|||
|
||||
key["Frame"]\Destroy!
|
||||
tteam = key["MyTeam"]
|
||||
table.remove PlayerFrames, i
|
||||
table.remove PlayerFrames, i
|
||||
|
||||
if tteam
|
||||
for j, tentry in ipairs tteam["MyPlayers"]
|
||||
for j, tentry in ipairs tteam["MyPlayers"]
|
||||
if tentry["Player"] == tplayer
|
||||
RemovePlayerFromTeam tteam, j
|
||||
|
||||
|
|
@ -2654,10 +2650,10 @@ AddTeamScores = (team) ->
|
|||
--]]
|
||||
SortTeams = (tentries) ->
|
||||
for _, val in ipairs tentries
|
||||
table.sort val["MyPlayers"], PlayerSortFunction
|
||||
AddTeamScores val
|
||||
table.sort val["MyPlayers"], PlayerSortFunction
|
||||
AddTeamScores val
|
||||
|
||||
table.sort tentries, TeamSortFunc
|
||||
table.sort tentries, TeamSortFunc
|
||||
|
||||
--[[
|
||||
base update for team mode, adds up the scores of all teams, sorts them,
|
||||
|
|
@ -2741,7 +2737,7 @@ RemoveTeamFrame = (nteam) ->
|
|||
if nteam == key["MyTeam"]
|
||||
myEntry = key
|
||||
key["Frame"]\Destroy!
|
||||
table.remove TeamFrames, i
|
||||
table.remove TeamFrames, i
|
||||
|
||||
if #TeamFrames == 0
|
||||
debugprint "removeteamframe, remove neutral"
|
||||
|
|
@ -2828,7 +2824,7 @@ InsertTeamFrame = (nteam) ->
|
|||
|
||||
for _, i in pairs PlayerFrames
|
||||
if not i["Player"].Neutral and i["Player"].TeamColor == nteam.TeamColor
|
||||
AddPlayerToTeam nentry, i
|
||||
AddPlayerToTeam nentry, i
|
||||
|
||||
nentry["IsHidden"] = false
|
||||
if not nentry["AutoHide"] or #nentry["MyPlayers"] > 0
|
||||
|
|
@ -2845,7 +2841,7 @@ InsertTeamFrame = (nteam) ->
|
|||
nentry["IsHidden"] = true
|
||||
nentry["Frame"].Parent = nil
|
||||
|
||||
table.insert TeamFrames, nentry
|
||||
table.insert TeamFrames, nentry
|
||||
UpdateMinimize!
|
||||
BaseUpdate!
|
||||
if #TeamFrames == 1 and not NeutralTeam
|
||||
|
|
@ -2906,7 +2902,7 @@ LastTabTime = time!
|
|||
game.GuiService.KeyPressed\connect (key) ->
|
||||
if key == "\t"
|
||||
debugprint "caught tab key"
|
||||
local modalCheck, isModal = try
|
||||
modalCheck, isModal = try
|
||||
return game.GuiService.IsModalDialog
|
||||
|
||||
if modalCheck == false or (modalCheck and isModal == false)
|
||||
|
|
@ -2964,16 +2960,16 @@ TeamsChildRemoved = (nteam) ->
|
|||
|
||||
try
|
||||
coreGuiChanged Enum.CoreGuiType.PlayerList, Game.StarterGui\GetCoreGuiEnabled Enum.CoreGuiType.PlayerList
|
||||
Game.StarterGui.CoreGuiChangedSignal\connect coreGuiChanged
|
||||
Game.StarterGui.CoreGuiChangedSignal\connect coreGuiChanged
|
||||
|
||||
while not game\GetService "Teams"
|
||||
wait 1 / 30
|
||||
debugprint "Waiting For Teams"
|
||||
|
||||
for _, i in pairs game.Teams\GetTeams!
|
||||
TeamAdded i
|
||||
for _, i in pairs game.Teams\GetTeams!
|
||||
TeamAdded i
|
||||
|
||||
for _, i in pairs Players\GetPlayers!
|
||||
for _, i in pairs Players\GetPlayers!
|
||||
Spawn ->
|
||||
debugPlayerAdd i
|
||||
|
||||
|
|
@ -2998,7 +2994,7 @@ if LocalPlayer.Name == "newplayerlistisbad" or LocalPlayer.Name == "imtotallyadm
|
|||
debugFrame.Parent = ScreenGui
|
||||
Spawn ->
|
||||
while true
|
||||
local str_players = ""
|
||||
str_players = ""
|
||||
for _, i in pairs game.Players\GetPlayers!
|
||||
str_players ..= " #{i.Name}"
|
||||
|
||||
|
|
|
|||
|
|
@ -212,12 +212,12 @@ if teleportEnabled
|
|||
|
||||
yesCon = popup.AcceptButton.MouseButton1Click\connect ->
|
||||
killCons!
|
||||
local success, err = try
|
||||
success, err = try
|
||||
game\GetService"TeleportService"\TeleportImpl placeId, spawnName
|
||||
if not success
|
||||
showOneButton!
|
||||
popup.PopupText.Text = err
|
||||
local clickCon = popup.OKButton.MouseButton1Click\connect ->
|
||||
clickCon = popup.OKButton.MouseButton1Click\connect ->
|
||||
clickCon?\disconnect!
|
||||
game.GuiService\RemoveCenterDialog script.Parent\FindFirstChild "Popup"
|
||||
popup\TweenSize(
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ removeGear = (gear) ->
|
|||
if emptySlot
|
||||
with gearSlots[emptySlot]
|
||||
if .GearReference.Value
|
||||
if .GearReference.Value.Parent == game.Players.LocalPlayer.Character then -- if we currently have this equipped, unequip it
|
||||
if .GearReference.Value.Parent == game.Players.LocalPlayer.Character -- if we currently have this equipped, unequip it
|
||||
.GearReference.Value.Parent = game.Players.LocalPlayer.Backpack
|
||||
|
||||
|
||||
|
|
@ -582,7 +582,7 @@ addingPlayerChild = (child, equipped, addToSlot, inventoryGearButton) ->
|
|||
|
||||
if not addToSlot
|
||||
for i = 1, #gearSlots
|
||||
if gearSlots[i] ~= "empty" and gearSlots[i].GearReference.Value == child then -- we already have gear, do nothing
|
||||
if gearSlots[i] ~= "empty" and gearSlots[i].GearReference.Value == child -- we already have gear, do nothing
|
||||
debounce = false
|
||||
return
|
||||
|
||||
|
|
|
|||
|
|
@ -169,7 +169,6 @@ JsonWriter.WriteFunction = (o) =>
|
|||
@\WriteError o
|
||||
|
||||
|
||||
|
||||
StringReader =
|
||||
s: "",
|
||||
i: 0,
|
||||
|
|
@ -370,7 +369,6 @@ JsonReader.ReadObject ==>
|
|||
error string.format "Invalid array: '%s' near: '%s'", @\All!, ch
|
||||
|
||||
|
||||
|
||||
assert @\Next! == "}"
|
||||
result
|
||||
|
||||
|
|
@ -565,7 +563,7 @@ t.SelectTerrainRegion = (regionToSelect, color, selectEmptyCells, selectionParen
|
|||
|
||||
|
||||
if not updated
|
||||
local selectionPart, selectionBox = createAdornment color
|
||||
selectionPart, selectionBox = createAdornment color
|
||||
selectionPart.Size = Vector3.new 4, 4, 4
|
||||
selectionPart.CFrame = CFrame.new cframePos
|
||||
adornTable =
|
||||
|
|
@ -582,7 +580,7 @@ t.SelectTerrainRegion = (regionToSelect, color, selectEmptyCells, selectionParen
|
|||
lastRegion = regionToSelect
|
||||
|
||||
if selectEmptyCells -- use one big selection to represent the area selected
|
||||
local selectionPart, selectionBox = createAdornment color
|
||||
selectionPart, selectionBox = createAdornment color
|
||||
|
||||
selectionPart.Size = regionToSelect.Size
|
||||
selectionPart.CFrame = regionToSelect.CFrame
|
||||
|
|
@ -662,7 +660,7 @@ t.CreateSignal = ->
|
|||
|
||||
--main functions
|
||||
this.connect = (func) =>
|
||||
if self ~= this
|
||||
if @ ~= this
|
||||
error "connect must be called with `:`, not `.`", 2
|
||||
|
||||
if type(func) ~= "function"
|
||||
|
|
@ -679,7 +677,7 @@ t.CreateSignal = ->
|
|||
pubCn
|
||||
|
||||
this.disconnect ==>
|
||||
if self ~= this
|
||||
if @ ~= this
|
||||
error "disconnect must be called with `:`, not `.`", 2
|
||||
|
||||
for cn, _ in pairs mAllCns
|
||||
|
|
@ -687,14 +685,14 @@ t.CreateSignal = ->
|
|||
mAllCns[cn] = nil
|
||||
|
||||
this.wait ==>
|
||||
if self ~= this
|
||||
if @ ~= this
|
||||
error "wait must be called with `:`, not `.`", 2
|
||||
|
||||
mBindableEvent.Event\wait!
|
||||
|
||||
|
||||
this.fire = (...) =>
|
||||
if self ~= this
|
||||
if @ ~= this
|
||||
error "fire must be called with `:`, not `.`", 2
|
||||
|
||||
mBindableEvent\Fire ...
|
||||
|
|
@ -751,7 +749,7 @@ type of data and what operation each will perform:
|
|||
Some example usages:
|
||||
|
||||
A simple example which uses the Create function to create a model object and assign two of it's properties.
|
||||
local model = Create'Model'{
|
||||
model = Create'Model'{
|
||||
Name = 'A New model',
|
||||
Parent = game.Workspace,
|
||||
}
|
||||
|
|
@ -764,7 +762,7 @@ Model_Container
|
|||
| `-BoolValueChild
|
||||
`-IntValue
|
||||
|
||||
local model = Create'Model'{
|
||||
model = Create'Model'{
|
||||
Name = 'Model_Container',
|
||||
Create'ObjectValue'{
|
||||
Create'BoolValue'{
|
||||
|
|
@ -777,8 +775,8 @@ local model = Create'Model'{
|
|||
|
||||
An example using the event syntax:
|
||||
|
||||
local part = Create'Part'{
|
||||
[Create.E'Touched'] = function(part)
|
||||
part = Create'Part'{
|
||||
[Create.E'Touched'] = function part
|
||||
print("I was touched by "..part.Name)
|
||||
end,
|
||||
}
|
||||
|
|
@ -786,18 +784,18 @@ local part = Create'Part'{
|
|||
|
||||
An example using the general constructor syntax:
|
||||
|
||||
local model = Create'Part'{
|
||||
[Create] = function(this)
|
||||
model = Create'Part'{
|
||||
[Create] = function this
|
||||
print("Constructor running!")
|
||||
this.Name = GetGlobalFoosAndBars(this)
|
||||
this.Name = GetGlobalFoosAndBars this
|
||||
end,
|
||||
}
|
||||
|
||||
|
||||
Note: It is also perfectly legal to save a reference to the function returned by a call Create, this will not cause
|
||||
any unexpected behavior. EG:
|
||||
local partCreatingFunction = Create'Part'
|
||||
local part = partCreatingFunction()
|
||||
partCreatingFunction = Create'Part'
|
||||
part = partCreatingFunction()
|
||||
]]
|
||||
|
||||
--the Create function need to be created as a functor, not a function, in order to support the Create.E syntax, so it
|
||||
|
|
|
|||
134
yue/73157242.yue
134
yue/73157242.yue
|
|
@ -4,7 +4,7 @@ $load $FILE
|
|||
t = {}
|
||||
|
||||
-- waitForChild = (instance, name) ->
|
||||
-- while not instance\FindFirstChild(name)
|
||||
-- while not instance\FindFirstChild name
|
||||
-- instance.ChildAdded\wait!
|
||||
-- end
|
||||
-- end
|
||||
|
|
@ -32,7 +32,7 @@ PlaneIntersection = (vectorPos) ->
|
|||
t = normal\Dot(p3 - startPos) / startEndDot
|
||||
if t >= 0 and t <= 1
|
||||
intersection = ((endPos - startPos) * t) + startPos
|
||||
cellPos = game.Workspace.Terrain\WorldToCell(intersection)
|
||||
cellPos = game.Workspace.Terrain\WorldToCell intersection
|
||||
hit = true
|
||||
|
||||
cellPos, hit
|
||||
|
|
@ -71,13 +71,13 @@ rotatePartAndChildren = (part, rotCF, offsetFromOrigin) ->
|
|||
-- recursively do the same to all children
|
||||
partChildren = part\GetChildren!
|
||||
for c = 1, #partChildren
|
||||
rotatePartAndChildren partChildren[c], rotCF, offsetFromOrigin
|
||||
rotatePartAndChildren partChildren[c], rotCF, offsetFromOrigin
|
||||
|
||||
modelRotate = (model, yAngle) ->
|
||||
rotCF = CFrame.Angles 0, yAngle, 0
|
||||
rotCF = CFrame.Angles 0, yAngle, 0
|
||||
offsetFromOrigin = model\GetModelCFrame!.p
|
||||
|
||||
rotatePartAndChildren model, rotCF, offsetFromOrigin
|
||||
rotatePartAndChildren model, rotCF, offsetFromOrigin
|
||||
|
||||
collectParts = (object, baseParts, scripts, decals) ->
|
||||
if object\IsA "BasePart"
|
||||
|
|
@ -134,17 +134,16 @@ findSeatsInModel = (parent, seatTable) ->
|
|||
return if not parent
|
||||
|
||||
if parent.className == "Seat" or parent.className == "VehicleSeat"
|
||||
table.insert seatTable, parent
|
||||
table.insert seatTable, parent
|
||||
|
||||
myChildren = parent\GetChildren!
|
||||
for j = 1, #myChildren
|
||||
findSeatsInModel myChildren[j], seatTable
|
||||
|
||||
findSeatsInModel myChildren[j], seatTable
|
||||
|
||||
|
||||
setSeatEnabledStatus = (model, isEnabled) ->
|
||||
seatList = {}
|
||||
findSeatsInModel model, seatList
|
||||
findSeatsInModel model, seatList
|
||||
|
||||
if isEnabled
|
||||
-- remove any welds called "SeatWeld" in seats
|
||||
|
|
@ -164,8 +163,6 @@ setSeatEnabledStatus = (model, isEnabled) ->
|
|||
fakeWeld.Parent = seatList[i]
|
||||
|
||||
|
||||
|
||||
|
||||
autoAlignToFace = (parts) ->
|
||||
aatf = parts\FindFirstChild "AutoAlignToFace"
|
||||
if aatf
|
||||
|
|
@ -174,7 +171,6 @@ autoAlignToFace = (parts) ->
|
|||
false
|
||||
|
||||
|
||||
|
||||
getClosestAlignedWorldDirection = (aVector3InWorld) ->
|
||||
xDir = Vector3.new 1, 0, 0
|
||||
yDir = Vector3.new 0, 1, 0
|
||||
|
|
@ -303,7 +299,7 @@ getBoundingBox2 = (partOrModel) ->
|
|||
-- find the multiple of 4 that contains the model
|
||||
justify = justifyValue.Value
|
||||
two = Vector3.new(2, 2, 2)
|
||||
actualBox = maxVec - minVec - Vector3.new 0.01, 0.01, 0.01
|
||||
actualBox = maxVec - minVec - Vector3.new 0.01, 0.01, 0.01
|
||||
containingGridBox = Vector3.new(
|
||||
4 * math.ceil(actualBox.x / 4),
|
||||
4 * math.ceil(actualBox.y / 4),
|
||||
|
|
@ -321,8 +317,8 @@ getBoundingBoxInWorldCoordinates = (partOrModel) ->
|
|||
maxVec = Vector3.new -math.huge, -math.huge, -math.huge
|
||||
|
||||
if partOrModel\IsA"BasePart" and not partOrModel\IsA "Terrain"
|
||||
vec1 = partOrModel.CFrame\pointToWorldSpace -0.5 * partOrModel.Size
|
||||
vec2 = partOrModel.CFrame\pointToWorldSpace 0.5 * partOrModel.Size
|
||||
vec1 = partOrModel.CFrame\pointToWorldSpace -0.5 * partOrModel.Size
|
||||
vec2 = partOrModel.CFrame\pointToWorldSpace 0.5 * partOrModel.Size
|
||||
minVec = Vector3.new math.min(vec1.X, vec2.X), math.min(vec1.Y, vec2.Y), math.min vec1.Z, vec2.Z
|
||||
maxVec = Vector3.new math.max(vec1.X, vec2.X), math.max(vec1.Y, vec2.Y), math.max vec1.Z, vec2.Z
|
||||
elseif not partOrModel\IsA "Terrain"
|
||||
|
|
@ -466,9 +462,8 @@ findConfigAtMouseTarget = (Mouse, stampData) ->
|
|||
mouseHitInWorld = game.Workspace.Terrain\CellCenterToWorld(cellPos.x, cellPos.y, cellPos.z)
|
||||
|
||||
|
||||
|
||||
-- test mouse hit location
|
||||
local minBBTarget, maxBBTarget = getTargetPartBoundingBox targetPart
|
||||
minBBTarget, maxBBTarget = getTargetPartBoundingBox targetPart
|
||||
diagBBTarget = maxBBTarget - minBBTarget
|
||||
targetCFrame = getMouseTargetCFrame targetPart
|
||||
|
||||
|
|
@ -550,7 +545,7 @@ findConfigAtMouseTarget = (Mouse, stampData) ->
|
|||
InsertTouchInWorld = insertCFrame\vectorToWorldSpace insertRefPointInInsert
|
||||
posInsertOriginInWorld = TargetTouchRelToWorld - InsertTouchInWorld
|
||||
|
||||
local _, _, _, R00, R01, R02, R10, R11, R12, R20, R21, R22 = insertCFrame\components!
|
||||
_, _, _, R00, R01, R02, R10, R11, R12, R20, R21, R22 = insertCFrame\components!
|
||||
targetConfig = CFrame.new(
|
||||
posInsertOriginInWorld.x,
|
||||
posInsertOriginInWorld.y,
|
||||
|
|
@ -567,7 +562,7 @@ findConfigAtMouseTarget = (Mouse, stampData) ->
|
|||
)
|
||||
admissibleConfig = true
|
||||
|
||||
admissibleConfig, targetConfig, getClosestAlignedWorldDirection(targetVectorInWorld)
|
||||
admissibleConfig, targetConfig, getClosestAlignedWorldDirection targetVectorInWorld
|
||||
|
||||
truncateToCircleEighth = (bigValue, littleValue) ->
|
||||
big = math.abs bigValue
|
||||
|
|
@ -591,7 +586,6 @@ truncateToCircleEighth = (bigValue, littleValue) ->
|
|||
return hypotenuse * bigSign, 0
|
||||
|
||||
|
||||
|
||||
saveTheWelds = (object, manualWeldTable, manualWeldParentTable) ->
|
||||
if object\IsA"ManualWeld" or object\IsA "Rotate"
|
||||
table.insert manualWeldTable, object
|
||||
|
|
@ -612,7 +606,7 @@ t.CanEditRegion = (partOrModel, EditRegion) -> -- todo: use model and stamper me
|
|||
return true, false
|
||||
|
||||
|
||||
local minBB, maxBB = getBoundingBoxInWorldCoordinates(partOrModel)
|
||||
minBB, maxBB = getBoundingBoxInWorldCoordinates partOrModel
|
||||
|
||||
if minBB.X < EditRegion.CFrame.p.X - EditRegion.Size.X / 2 or
|
||||
minBB.Y < EditRegion.CFrame.p.Y - EditRegion.Size.Y / 2 or
|
||||
|
|
@ -691,13 +685,13 @@ t.GetStampModel = (assetId, terrainShape, useAssetVersionId) ->
|
|||
if cellType == 2 or cellType == 3
|
||||
flipped = 0
|
||||
|
||||
newTerrainPiece.CFrame = CFrame.Angles 0, math.pi / 2 * cellOrient + flipped, sideways
|
||||
newTerrainPiece.CFrame = CFrame.Angles 0, math.pi / 2 * cellOrient + flipped, sideways
|
||||
|
||||
if cellType == 3
|
||||
inverseCornerWedgeMesh = Instance.new "SpecialMesh"
|
||||
inverseCornerWedgeMesh.MeshType = "FileMesh"
|
||||
inverseCornerWedgeMesh.MeshId = "http://www.roblox.com/asset?id=66832495"
|
||||
inverseCornerWedgeMesh.Scale = Vector3.new 2, 2, 2
|
||||
inverseCornerWedgeMesh.Scale = Vector3.new 2, 2, 2
|
||||
inverseCornerWedgeMesh.Parent = newTerrainPiece
|
||||
|
||||
materialTag = Instance.new "Vector3Value"
|
||||
|
|
@ -755,7 +749,7 @@ t.GetStampModel = (assetId, terrainShape, useAssetVersionId) ->
|
|||
|
||||
|
||||
--Unlock all parts that are inserted, to make sure they are editable
|
||||
UnlockInstances(root)
|
||||
UnlockInstances root
|
||||
|
||||
--Continue the insert process
|
||||
root = root\GetChildren![1]
|
||||
|
|
@ -775,7 +769,6 @@ t.GetStampModel = (assetId, terrainShape, useAssetVersionId) ->
|
|||
return
|
||||
|
||||
|
||||
|
||||
-- ...and tag all inserted models for subsequent origin identification
|
||||
-- if no RobloxModel tag already exists, then add it.
|
||||
if not root\FindFirstChild"RobloxModel"?
|
||||
|
|
@ -789,7 +782,6 @@ t.GetStampModel = (assetId, terrainShape, useAssetVersionId) ->
|
|||
stringTag2.Parent = root
|
||||
|
||||
|
||||
|
||||
if terrainShape
|
||||
if root.Name == "MegaClusterCube"
|
||||
if terrainShape == 6 -- insert an autowedging tag
|
||||
|
|
@ -808,9 +800,6 @@ t.GetStampModel = (assetId, terrainShape, useAssetVersionId) ->
|
|||
root = setupFakeTerrainPart(1, terrainShape, 0)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return root
|
||||
|
||||
|
||||
|
|
@ -926,7 +915,6 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
megaCube = stampData.CurrentParts
|
||||
|
||||
|
||||
|
||||
HighScalabilityLine.End = megaCube.CFrame.p
|
||||
local line
|
||||
line2 = Vector3.new 0, 0, 0
|
||||
|
|
@ -950,7 +938,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
line = Vector3.new(0, newY, newZ)
|
||||
else
|
||||
-- limit to X/Y plane, with Y dominating
|
||||
local newY, newX = truncateToCircleEighth(line.Y, line.X)
|
||||
newY, newX = truncateToCircleEighth(line.Y, line.X)
|
||||
line = Vector3.new(newX, newY, 0)
|
||||
|
||||
else
|
||||
|
|
@ -965,7 +953,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
line = Vector3.new(newX, 0, newZ)
|
||||
else
|
||||
-- limit to X/Y plane, with X dominating
|
||||
local newX, newY = truncateToCircleEighth(line.X, line.Y)
|
||||
newX, newY = truncateToCircleEighth(line.X, line.Y)
|
||||
line = Vector3.new(newX, newY, 0)
|
||||
|
||||
|
||||
|
|
@ -975,7 +963,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
line2 = HighScalabilityLine.End - HighScalabilityLine.MorePoints[1]
|
||||
|
||||
-- take out any component of line2 along line1, so you get perpendicular to line1 component
|
||||
line2 -= line.unit * line.unit\Dot(line2)
|
||||
line2 -= line.unit * line.unit\Dot line2
|
||||
|
||||
tempCFrame = CFrame.new(HighScalabilityLine.Start, HighScalabilityLine.Start + line)
|
||||
|
||||
|
|
@ -983,10 +971,10 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
yAxis = tempCFrame\vectorToWorldSpace(Vector3.new(0, 1, 0))
|
||||
xAxis = tempCFrame\vectorToWorldSpace(Vector3.new(1, 0, 0))
|
||||
|
||||
xComp = xAxis\Dot(line2)
|
||||
yComp = yAxis\Dot(line2)
|
||||
xComp = xAxis\Dot line2
|
||||
yComp = yAxis\Dot line2
|
||||
|
||||
if math.abs(yComp) > math.abs(xComp)
|
||||
if math.abs(yComp) > math.abs xComp
|
||||
line2 -= xAxis * xComp
|
||||
else
|
||||
line2 -= yAxis * yComp
|
||||
|
|
@ -999,8 +987,8 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
line3 = HighScalabilityLine.End - HighScalabilityLine.MorePoints[2]
|
||||
|
||||
-- zero out all components of previous lines
|
||||
line3 -= line.unit * line.unit\Dot(line3)
|
||||
line3 -= line2.unit * line2.unit\Dot(line3)
|
||||
line3 -= line.unit * line.unit\Dot line3
|
||||
line3 -= line2.unit * line2.unit\Dot line3
|
||||
|
||||
HighScalabilityLine.InternalLine = line3
|
||||
|
||||
|
|
@ -1038,8 +1026,6 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
HighScalabilityLine.Adorn.Parent = gui
|
||||
|
||||
|
||||
|
||||
|
||||
DoStamperMouseMove = (Mouse) ->
|
||||
if not Mouse
|
||||
error "Error: RbxStamper.DoStamperMouseMove: Mouse is nil"
|
||||
|
|
@ -1052,12 +1038,11 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
|
||||
-- There wasn't a target (no part or terrain), so check for plane intersection.
|
||||
if not Mouse.Target
|
||||
cellPos = GetTerrainForMouse(Mouse)
|
||||
cellPos = GetTerrainForMouse Mouse
|
||||
if nil == cellPos
|
||||
return
|
||||
|
||||
|
||||
|
||||
if not stampData
|
||||
return
|
||||
|
||||
|
|
@ -1082,7 +1067,6 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
numRotations = 1 - gInitial90DegreeRotations + autoAlignToFace(stampData.CurrentParts)
|
||||
|
||||
|
||||
|
||||
ry = math.pi / 2
|
||||
gInitial90DegreeRotations += numRotations
|
||||
if stampData.CurrentParts\IsA"Model" or stampData.CurrentParts\IsA "Tool"
|
||||
|
|
@ -1094,7 +1078,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
|
||||
|
||||
-- CODE TO CHECK FOR DRAGGING GHOST PART INTO A COLLIDING STATE
|
||||
local minBB, maxBB = getBoundingBoxInWorldCoordinates(stampData.CurrentParts)
|
||||
minBB, maxBB = getBoundingBoxInWorldCoordinates(stampData.CurrentParts)
|
||||
|
||||
-- need to offset by distance to be dragged
|
||||
local currModelCFrame
|
||||
|
|
@ -1118,8 +1102,6 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
stampClusterMaterial = clusterMat
|
||||
|
||||
|
||||
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
|
@ -1127,7 +1109,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
if isMegaClusterPart!
|
||||
cellToStamp = game.Workspace.Terrain\WorldToCell targetCFrame.p
|
||||
newCFramePosition = game.Workspace.Terrain\CellCenterToWorld cellToStamp.X, cellToStamp.Y, cellToStamp.Z
|
||||
local _, _, _, R00, R01, R02, R10, R11, R12, R20, R21, R22 = targetCFrame\components!
|
||||
_, _, _, R00, R01, R02, R10, R11, R12, R20, R21, R22 = targetCFrame\components!
|
||||
targetCFrame = CFrame.new(
|
||||
newCFramePosition.X,
|
||||
newCFramePosition.Y,
|
||||
|
|
@ -1152,7 +1134,6 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
lastTarget.TerrainOrientation = clusterMat.Value.Z
|
||||
|
||||
|
||||
|
||||
-- auto break joints code
|
||||
if Mouse and Mouse.Target and Mouse.Target.Parent
|
||||
modelInfo = Mouse.Target\FindFirstChild "RobloxModel"
|
||||
|
|
@ -1237,12 +1218,11 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
DoHighScalabilityRegionSelect!
|
||||
|
||||
|
||||
|
||||
setupKeyListener = (key, Mouse) ->
|
||||
return if control and control["Paused"]
|
||||
-- don't do this if we have no stamp
|
||||
|
||||
key = string.lower(key)
|
||||
key = string.lower key
|
||||
if key == "r" and not autoAlignToFace(stampData.CurrentParts) -- rotate the model
|
||||
gInitial90DegreeRotations += 1
|
||||
|
||||
|
|
@ -1266,12 +1246,12 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
|
||||
|
||||
-- After rotating, update the position
|
||||
configFound, targetCFrame = findConfigAtMouseTarget Mouse, stampData
|
||||
configFound, targetCFrame = findConfigAtMouseTarget Mouse, stampData
|
||||
if configFound
|
||||
positionPartsAtCFrame3 targetCFrame, stampData.CurrentParts
|
||||
positionPartsAtCFrame3 targetCFrame, stampData.CurrentParts
|
||||
|
||||
-- update everything else in MouseMove
|
||||
DoStamperMouseMove Mouse
|
||||
DoStamperMouseMove Mouse
|
||||
|
||||
elseif key == "c" -- try to expand our high scalability dragger dimension
|
||||
if HighScalabilityLine.InternalLine and
|
||||
|
|
@ -1343,12 +1323,12 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
if megaCube
|
||||
HighScalabilityLine.Dimensions = 1
|
||||
tempCell = terrain\WorldToCell(megaCube.CFrame.p)
|
||||
HighScalabilityLine.Start = terrain\CellCenterToWorld tempCell.X, tempCell.Y, tempCell.Z
|
||||
HighScalabilityLine.Start = terrain\CellCenterToWorld tempCell.X, tempCell.Y, tempCell.Z
|
||||
return
|
||||
else
|
||||
HighScalabilityLine.Dimensions = 1
|
||||
tempCell = terrain\WorldToCell(stampData.CurrentParts.CFrame.p)
|
||||
HighScalabilityLine.Start = terrain\CellCenterToWorld tempCell.X, tempCell.Y, tempCell.Z
|
||||
HighScalabilityLine.Start = terrain\CellCenterToWorld tempCell.X, tempCell.Y, tempCell.Z
|
||||
return
|
||||
|
||||
loadSurfaceTypes = (part, surfaces) ->
|
||||
|
|
@ -1473,7 +1453,6 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
stampData.CurrentParts.CFrame = CFrame.fromEulerAnglesXYZ(0, ry, 0) * stampData.CurrentParts.CFrame
|
||||
|
||||
|
||||
|
||||
-- since we're cloning the old model instead of the new one, we will need to update the orientation based on the original value AND how many more
|
||||
-- rotations we expect since then [either that or we need to store the just-stamped clusterMaterial.Value.Z somewhere]. This should fix the terrain rotation
|
||||
-- issue (fingers crossed) [HotThoth]
|
||||
|
|
@ -1488,7 +1467,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
|
||||
|
||||
-- After rotating, update the position
|
||||
local configFound, targetCFrame = findConfigAtMouseTarget(Mouse, stampData)
|
||||
configFound, targetCFrame = findConfigAtMouseTarget(Mouse, stampData)
|
||||
if configFound
|
||||
stampData.CurrentParts = positionPartsAtCFrame3(targetCFrame, stampData.CurrentParts)
|
||||
|
||||
|
|
@ -1519,7 +1498,6 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
break
|
||||
|
||||
|
||||
|
||||
if not skipThisCell
|
||||
-- pop players up above any set cells
|
||||
alreadyPushedUp = {}
|
||||
|
|
@ -1595,7 +1573,6 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
clusterMaterial = clusterMaterial.Value
|
||||
|
||||
|
||||
|
||||
if HighScalabilityLine.Adorn.Parent and
|
||||
HighScalabilityLine.Start and
|
||||
((HighScalabilityLine.Dimensions > 1) or (line and line.magnitude > 0))
|
||||
|
|
@ -1606,12 +1583,12 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
zInc = { 0, 0, 0 }
|
||||
|
||||
incrementVect = { nil, nil, nil }
|
||||
stepVect =
|
||||
stepVect =
|
||||
* Vector3.new 0, 0, 0
|
||||
* Vector3.new 0, 0, 0
|
||||
* Vector3.new 0, 0, 0
|
||||
|
||||
worldAxes =
|
||||
worldAxes =
|
||||
* Vector3.new 1, 0, 0
|
||||
* Vector3.new 0, 1, 0
|
||||
* Vector3.new 0, 0, 1
|
||||
|
|
@ -1655,7 +1632,6 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
incrementVect[i] = nil
|
||||
|
||||
|
||||
|
||||
if not lines[2]
|
||||
lines[2] = Vector3.new 0, 0, 0
|
||||
|
||||
|
|
@ -1816,7 +1792,6 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
return false
|
||||
|
||||
|
||||
|
||||
-- if unstampable face, then don't let us stamp there!
|
||||
if unstampableSurface
|
||||
flashRedBox!
|
||||
|
|
@ -1834,7 +1809,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
|
||||
-- Prevent part from being stamped on top of a player
|
||||
|
||||
local minBB, maxBB = getBoundingBoxInWorldCoordinates(stampData.CurrentParts)
|
||||
minBB, maxBB = getBoundingBoxInWorldCoordinates(stampData.CurrentParts)
|
||||
|
||||
-- HotThoth's note: Now that above CurrentParts positioning has been commented out, to be truly correct, we would need to use the
|
||||
-- value of configFound from the previous onStamperMouseMove call which moved the CurrentParts
|
||||
|
|
@ -1859,7 +1834,6 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
return false
|
||||
|
||||
|
||||
|
||||
alreadyPushedUp = {}
|
||||
-- if no blocking model below, then see if stamping on top of a character
|
||||
for b = 1, #blockingParts
|
||||
|
|
@ -1902,9 +1876,6 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
stampTracker.Value = true
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- if we drew a line of mega parts, stamp them out
|
||||
if HighScalabilityLine.Start and HighScalabilityLine.Adorn.Parent and isMegaClusterPart!
|
||||
if ResolveMegaClusterStamp(checkHighScalabilityStamp) or checkHighScalabilityStamp
|
||||
|
|
@ -1913,7 +1884,6 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
return true
|
||||
|
||||
|
||||
|
||||
-- not High-Scalability-Line-Based, so behave normally [and get rid of any HSL stuff]
|
||||
HighScalabilityLine.Start = nil
|
||||
HighScalabilityLine.Adorn.Parent = nil
|
||||
|
|
@ -2007,7 +1977,6 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
return false
|
||||
|
||||
|
||||
|
||||
getPlayer = ->
|
||||
if game\FindFirstChild "Players"
|
||||
if game.Players["LocalPlayer"]
|
||||
|
|
@ -2045,7 +2014,6 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
playerNameTag.Value = tempPlayerValue.Name
|
||||
|
||||
|
||||
|
||||
-- ...and tag all inserted models for subsequent origin identification
|
||||
-- if no RobloxModel tag already exists, then add it.
|
||||
if not stampData.CurrentParts\FindFirstChild"RobloxModel"?
|
||||
|
|
@ -2067,7 +2035,6 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
stringTag2.Parent = stampData.CurrentParts
|
||||
|
||||
|
||||
|
||||
-- make sure all the joints are activated before restoring anchor states
|
||||
if not createJoints
|
||||
game.JointsService\CreateJoinAfterMoveJoints!
|
||||
|
|
@ -2147,7 +2114,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
true
|
||||
|
||||
pauseStamper = ->
|
||||
for i = 1, #mouseCons do -- stop the mouse from doing anything
|
||||
for i = 1, #mouseCons -- stop the mouse from doing anything
|
||||
mouseCons[i]\disconnect!
|
||||
mouseCons[i] = nil
|
||||
|
||||
|
|
@ -2163,7 +2130,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
game.JointsService\ClearJoinAfterMoveJoints!
|
||||
|
||||
prepareUnjoinableSurfaces = (modelCFrame, parts, whichSurface) ->
|
||||
AXIS_VECTORS =
|
||||
AXIS_VECTORS =
|
||||
* Vector3.new 1, 0, 0
|
||||
* Vector3.new 0, 1, 0
|
||||
* Vector3.new 0, 0, 1
|
||||
|
|
@ -2208,31 +2175,24 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
currPart.FrontSurface = "Unjoinable"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
resumeStamper = ->
|
||||
clone, parts = prepareModel modelToStamp
|
||||
clone, parts = prepareModel modelToStamp
|
||||
|
||||
if not clone or not parts
|
||||
return
|
||||
|
||||
|
||||
-- if we have unjoinable faces, then we want to change those surfaces to be Unjoinable
|
||||
unjoinableTag = clone\FindFirstChild "UnjoinableFaces", true
|
||||
unjoinableTag = clone\FindFirstChild "UnjoinableFaces", true
|
||||
if unjoinableTag
|
||||
for unjoinableSurface in string.gmatch unjoinableTag.Value, "[^,]*"
|
||||
if tonumber unjoinableSurface
|
||||
for unjoinableSurface in string.gmatch unjoinableTag.Value, "[^,]*"
|
||||
if tonumber unjoinableSurface
|
||||
if clone\IsA "Model"
|
||||
prepareUnjoinableSurfaces clone\GetModelCFrame!, parts, tonumber unjoinableSurface
|
||||
else
|
||||
prepareUnjoinableSurfaces clone.CFrame, parts, tonumber unjoinableSurface
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
stampData.ErrorBox = errorBox
|
||||
clone.Parent = if stampInModel
|
||||
stampInModel
|
||||
|
|
@ -2327,7 +2287,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
control.Stamped = stamped -- BoolValue that fires when user stamps
|
||||
control.Paused = false
|
||||
|
||||
control.LoadNewModel = (newStampModel) ->
|
||||
control.LoadNewModel = (newStampModel) ->
|
||||
-- allows us to specify a new stamper model to be used with this stamper
|
||||
if newStampModel and not newStampModel\IsA"Model" and not newStampModel\IsA "BasePart"
|
||||
error "Control.LoadNewModel: newStampModel (first arg) is not a Model or Part!"
|
||||
|
|
@ -2335,7 +2295,7 @@ t.SetupStamperDragger = (modelToStamp, Mouse, StampInModel, AllowedStampRegion,
|
|||
|
||||
resetStamperState newStampModel
|
||||
|
||||
control.ReloadModel = ->
|
||||
control.ReloadModel = ->
|
||||
-- will automatically set stamper to get a new model of current model and start stamping with new model
|
||||
resetStamperState!
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ waitForProperty = (instance, property) ->
|
|||
instance.Changed\wait!
|
||||
|
||||
|
||||
local IsTouchDevice = ->
|
||||
IsTouchDevice = ->
|
||||
touchEnabled = false
|
||||
try
|
||||
touchEnabled = Game\GetService"UserInputService".TouchEnabled
|
||||
|
|
@ -53,7 +53,7 @@ waitForChild game, "Players"
|
|||
waitForProperty game.Players, "LocalPlayer"
|
||||
player = game.Players.LocalPlayer
|
||||
|
||||
local RbxGui, _ = LoadLibrary "RbxGui"
|
||||
RbxGui, _ = LoadLibrary "RbxGui"
|
||||
if not RbxGui
|
||||
print "could not find RbxGui!"
|
||||
return
|
||||
|
|
@ -101,7 +101,7 @@ searchRequestedEvent = waitForChild backpackManager, "SearchRequestedEvent"
|
|||
tellBackpackReadyFunc = waitForChild backpackManager, "BackpackReady"
|
||||
|
||||
-- creating scroll bar early as to make sure items get placed correctly
|
||||
local scrollFrame, scrollUp, scrollDown, recalculateScroll = RbxGui.CreateScrollingFrame nil, "grid", Vector2.new 6, 6
|
||||
scrollFrame, scrollUp, scrollDown, recalculateScroll = RbxGui.CreateScrollingFrame nil, "grid", Vector2.new 6, 6
|
||||
|
||||
scrollFrame.Position = UDim2.new 0, 0, 0, 30
|
||||
scrollFrame.Size = UDim2.new 1, 0, 1, -30
|
||||
|
|
@ -120,7 +120,7 @@ scrollDown.Position = UDim2.new 0, 0, 1, -17
|
|||
scrollUp.Parent = scroller
|
||||
scrollDown.Parent = scroller
|
||||
|
||||
local scrollFrameLoadout, scrollUpLoadout, scrollDownLoadout, recalculateScrollLoadout = RbxGui.CreateScrollingFrame!
|
||||
scrollFrameLoadout, scrollUpLoadout, scrollDownLoadout, recalculateScrollLoadout = RbxGui.CreateScrollingFrame!
|
||||
|
||||
scrollFrameLoadout.Position = UDim2.new 0, 0, 0, 0
|
||||
scrollFrameLoadout.Size = UDim2.new 1, 0, 1, 0
|
||||
|
|
@ -459,7 +459,6 @@ resizeGrid = ->
|
|||
buttonClone.Position = beginPos
|
||||
|
||||
|
||||
|
||||
clickTime = tick!
|
||||
mouseEnterCons[buttonClone] = buttonClone.MouseEnter\connect ->
|
||||
previewGear buttonClone
|
||||
|
|
@ -729,8 +728,6 @@ coreGuiChanged = (coreGuiType, enabled) ->
|
|||
backpack.Gear.Visible = false
|
||||
|
||||
|
||||
|
||||
|
||||
backpackChildren = player.Backpack\GetChildren!
|
||||
for i = 1, #backpackChildren
|
||||
addToGrid backpackChildren[i]
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ doSearch = ->
|
|||
|
||||
searchText = trim searchText
|
||||
resetButton.Visible = true
|
||||
-- termTable = splitByWhitespace(searchText)
|
||||
-- termTable = splitByWhitespace searchText
|
||||
searchRequestedEvent\Fire searchText -- todo: replace this with termtable when table passing is possible
|
||||
|
||||
backpackReady = ->
|
||||
|
|
@ -344,7 +344,6 @@ coreGuiChanged = (coreGuiType, enabled) ->
|
|||
backpackButton.Visible = enabled
|
||||
|
||||
|
||||
|
||||
--------------------------- End Internal Functions -------------------------------------
|
||||
|
||||
------------------------------ Public Functions Setup -------------------------------------
|
||||
|
|
|
|||
|
|
@ -1184,17 +1184,17 @@ Chat.CreateMessage = (cPlayer, message) =>
|
|||
|
||||
local pColor
|
||||
if cPlayer.Neutral
|
||||
pLabel.TextColor3 = Chat\ComputeChatColor(pName)
|
||||
pLabel.TextColor3 = Chat\ComputeChatColor pName
|
||||
else
|
||||
pLabel.TextColor3 = cPlayer.TeamColor.Color
|
||||
|
||||
local nString
|
||||
|
||||
if not @CachedSpaceStrings_List[pName]
|
||||
nString = Chat\ComputeSpaceString(pLabel)
|
||||
nString = Chat\ComputeSpaceString pLabel
|
||||
else
|
||||
nString = @CachedSpaceStrings_List[pName]
|
||||
end
|
||||
end
|
||||
|
||||
mLabel.Text = ""
|
||||
mLabel.Name = pName .. " - message"
|
||||
|
|
@ -1235,7 +1235,7 @@ Chat.CreateMessage = (cPlayer, message) =>
|
|||
local nString
|
||||
|
||||
if not @CachedSpaceStrings_List[pName]
|
||||
nString = Chat\ComputeSpaceString(pLabel)
|
||||
nString = Chat\ComputeSpaceString pLabel
|
||||
else
|
||||
nString = @CachedSpaceStrings_List[pName]
|
||||
|
||||
|
|
@ -1427,7 +1427,7 @@ Chat.CreateTouchButton ==>
|
|||
-- Non touch devices, create the bottom chat bar
|
||||
Chat.CreateChatBar ==>
|
||||
-- okay now we
|
||||
local status, result = try
|
||||
status, result = try
|
||||
return GuiService.UseLuaChat
|
||||
if forceChatGUI or (status and result)
|
||||
@ClickToChatButton = New "TextButton", "ClickToChat"
|
||||
|
|
@ -1456,7 +1456,7 @@ Chat.CreateChatBar ==>
|
|||
|
||||
-- Engine has code to offset the entire world, so if we do it by -20 pixels nothing gets in our chat's way
|
||||
--GuiService\SetGlobalSizeOffsetPixel(0, -20)
|
||||
local success, error = try
|
||||
success, error = try
|
||||
GuiService\SetGlobalGuiInset 0, 0, 0, 20
|
||||
if not success
|
||||
GuiService\SetGlobalSizeOffsetPixel 0, -20
|
||||
|
|
|
|||
14
yue/host.yue
14
yue/host.yue
|
|
@ -37,11 +37,11 @@ getKillerOfHumanoidIfStillInGame = (humanoid) ->
|
|||
|
||||
-- send kill and death stats when a player dies
|
||||
onDied = (victim, humanoid) ->
|
||||
killer = getKillerOfHumanoidIfStillInGame humanoid
|
||||
killer = getKillerOfHumanoidIfStillInGame humanoid
|
||||
victorId = 0
|
||||
if killer
|
||||
victorId = killer.userId
|
||||
print "STAT: kill by #{victorId} of #{victim.userId}"
|
||||
print "STAT: kill by #{victorId} of #{victim.userId}"
|
||||
game\HttpGet "#{url}/Game/Knockouts.ashx?UserID=#{victorId}&#{access}"
|
||||
|
||||
print "STAT: death of #{victim.userId} by #{victorId}"
|
||||
|
|
@ -98,10 +98,10 @@ if url?
|
|||
try
|
||||
game\GetService"ContentProvider"\SetBaseUrl "#{url}/"
|
||||
|
||||
-- try
|
||||
-- try
|
||||
-- game\GetService"Players"\SetChatFilterUrl(url .. "/Game/ChatFilter.ashx")
|
||||
|
||||
-- game\GetService"BadgeService"\SetPlaceId(placeId)
|
||||
-- game\GetService"BadgeService"\SetPlaceId placeId
|
||||
if access?
|
||||
with game\GetService "BadgeService"
|
||||
\SetAwardBadgeUrl "#{url}/Game/Badge/AwardBadge.ashx?UserID=%d&BadgeID=%d&PlaceID=%d&#{access}"
|
||||
|
|
@ -199,12 +199,12 @@ if _MAP_LOCATION_EXISTS
|
|||
|
||||
|
||||
-- Now start the connection
|
||||
ns\Start _SERVER_PORT, sleeptime
|
||||
ns\Start _SERVER_PORT, sleeptime
|
||||
|
||||
game\GetService"Visit"\SetPing "_SERVER_PRESENCE_URL", 30
|
||||
game\GetService"Visit"\SetPing "_SERVER_PRESENCE_URL", 30
|
||||
|
||||
if timeout
|
||||
scriptContext\SetTimeout timeout
|
||||
scriptContext\SetTimeout timeout
|
||||
|
||||
scriptContext.ScriptsDisabled = false
|
||||
|
||||
|
|
|
|||
30
yue/join.yue
30
yue/join.yue
|
|
@ -66,11 +66,11 @@ try
|
|||
try
|
||||
game\GetService"MarketplaceService"\SetPlayerOwnsAssetUrl "https://banland.xyz/ownership/hasasset?userId=%d&assetId=%d"
|
||||
try
|
||||
game\SetCreatorID _CREATOR_ID, Enum.CreatorType.User
|
||||
game\SetCreatorID _CREATOR_ID, Enum.CreatorType.User
|
||||
|
||||
-- Bubble chat. This is all-encapsulated to allow us to turn it off with a config setting
|
||||
try
|
||||
game\GetService"Players"\SetChatStyle Enum.ChatStyle.ClassicAndBubble
|
||||
game\GetService"Players"\SetChatStyle Enum.ChatStyle.ClassicAndBubble
|
||||
|
||||
|
||||
waitingForCharacter = false
|
||||
|
|
@ -105,7 +105,7 @@ global reportError = (err, message) ->
|
|||
|
||||
client\disconnect!
|
||||
wait 4
|
||||
showErrorWindow "Error: #{err}", message, "Other"
|
||||
showErrorWindow "Error: #{err}", message, "Other"
|
||||
|
||||
|
||||
-- called when the client connection closes
|
||||
|
|
@ -128,14 +128,14 @@ global requestCharacter = (replicator) ->
|
|||
|
||||
setMessage "Requesting character"
|
||||
|
||||
local success, err = try
|
||||
success, err = try
|
||||
replicator\RequestCharacter!
|
||||
setMessage "Waiting for character"
|
||||
waitingForCharacter = true
|
||||
|
||||
|
||||
if not success
|
||||
reportError err, "W4C"
|
||||
reportError err, "W4C"
|
||||
return
|
||||
|
||||
|
||||
|
|
@ -145,9 +145,9 @@ global onConnectionAccepted = (url, replicator) ->
|
|||
|
||||
waitingForMarker = true
|
||||
|
||||
local success, err = try
|
||||
success, err = try
|
||||
if not test
|
||||
visit\SetPing "_PING_URL", 30
|
||||
visit\SetPing "_PING_URL", 30
|
||||
|
||||
|
||||
if not false
|
||||
|
|
@ -156,7 +156,7 @@ global onConnectionAccepted = (url, replicator) ->
|
|||
setMessage "Teleporting ..."
|
||||
|
||||
|
||||
replicator.Disconnection\connect onDisconnection
|
||||
replicator.Disconnection\connect onDisconnection
|
||||
|
||||
-- Wait for a marker to return before creating the Player
|
||||
marker = replicator\SendMarker!
|
||||
|
|
@ -175,24 +175,24 @@ global onConnectionAccepted = (url, replicator) ->
|
|||
|
||||
while waitingForMarker
|
||||
workspace\ZoomToExtents!
|
||||
wait 0.5
|
||||
wait 0.5
|
||||
|
||||
|
||||
-- called when the client connection fails
|
||||
global onConnectionFailed = (_, err) ->
|
||||
showErrorWindow "Failed to connect to the Game. (ID=#{err})", "ID#{err}", "Other"
|
||||
showErrorWindow "Failed to connect to the Game. (ID=#{err})", "ID#{err}", "Other"
|
||||
|
||||
|
||||
-- called when the client connection is rejected
|
||||
global onConnectionRejected = ->
|
||||
connectionFailed\disconnect!
|
||||
showErrorWindow "This game is not available. Please try another", "WrongVersion", "WrongVersion"
|
||||
showErrorWindow "This game is not available. Please try another", "WrongVersion", "WrongVersion"
|
||||
|
||||
|
||||
idled = false
|
||||
global onPlayerIdled = (time) ->
|
||||
if time > 20 * 60
|
||||
showErrorWindow string.format("You were disconnected for being idle %d minutes", time / 60), "Idle", "Idle"
|
||||
showErrorWindow string.format("You were disconnected for being idle %d minutes", time / 60), "Idle", "Idle"
|
||||
client\disconnect!
|
||||
if not idled
|
||||
idled = true
|
||||
|
|
@ -226,9 +226,9 @@ success, err = try
|
|||
delay 300, ->
|
||||
while false
|
||||
try
|
||||
game\HttpPost "https://banland.xyz/auth/renew", "renew"
|
||||
game\HttpPost "https://banland.xyz/auth/renew", "renew"
|
||||
|
||||
wait 300
|
||||
wait 300
|
||||
|
||||
with player
|
||||
\SetSuperSafeChat false
|
||||
|
|
@ -253,7 +253,7 @@ success, err = try
|
|||
|
||||
|
||||
if not success
|
||||
reportError err, "CreatePlayer"
|
||||
reportError err, "CreatePlayer"
|
||||
|
||||
|
||||
if not test
|
||||
|
|
|
|||
|
|
@ -39,11 +39,11 @@ with game\GetService "MarketplaceService"
|
|||
\SetPlayerOwnsAssetUrl "https://banland.xyz/ownership/hasasset?userId=%d&assetId=%d"
|
||||
|
||||
|
||||
local result, _ = try
|
||||
game\GetService"ScriptContext"\AddStarterScript 37801172
|
||||
result, _ = try
|
||||
game\GetService"ScriptContext"\AddStarterScript 37801172
|
||||
|
||||
if not result
|
||||
try
|
||||
game\GetService"ScriptContext"\AddCoreScript 37801172, game\GetService "ScriptContext", "StarterScript"
|
||||
game\GetService"ScriptContext"\AddCoreScript 37801172, game\GetService "ScriptContext", "StarterScript"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ message.Parent = workspace
|
|||
message.archivable = false
|
||||
|
||||
game\GetService"ScriptInformationProvider"\SetAssetUrl "http://banland.xyz/Asset/"
|
||||
game\GetService"ContentProvider"\SetThreadPool 16
|
||||
game\GetService"ContentProvider"\SetThreadPool 16
|
||||
try
|
||||
game\GetService"InsertService"\SetFreeModelUrl "http://www.roblox.com/Game/Tools/InsertAsset.ashx?type=fm&q=%s&pg=%d&rs=%d"
|
||||
-- Used for free model search (insert tool)
|
||||
|
|
@ -48,7 +48,7 @@ with game\GetService "SocialService"
|
|||
try
|
||||
game\GetService"GamePassService"\SetPlayerHasPassUrl "http://banland.xyz/Game/GamePass/GamePassHandler.ashx?Action=HasPass&UserID=%d&PassID=%d"
|
||||
try
|
||||
game\SetCreatorID 0, Enum.CreatorType.User
|
||||
game\SetCreatorID 0, Enum.CreatorType.User
|
||||
try
|
||||
game\SetScreenshotInfo ""
|
||||
try
|
||||
|
|
@ -60,12 +60,12 @@ try
|
|||
settings!["Task Scheduler"].PriorityMethod = Enum.PriorityMethod.AccumulatedError
|
||||
|
||||
|
||||
game\GetService"ChangeHistoryService"\SetEnabled false
|
||||
game\GetService"ChangeHistoryService"\SetEnabled false
|
||||
try
|
||||
game\GetService"Players"\SetBuildUserPermissionsUrl "http://banland.xyz//Game/BuildActionPermissionCheck.ashx?assetId=0&userId=%d&isSolo=true"
|
||||
|
||||
|
||||
workspace\SetPhysicsThrottleEnabled true
|
||||
workspace\SetPhysicsThrottleEnabled true
|
||||
|
||||
addedBuildTools = false
|
||||
screenGui = game\GetService"CoreGui"\FindFirstChild "RobloxGui"
|
||||
|
|
|
|||
Loading…
Reference in New Issue