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