Fix issues with Dialog chats and improve some functions and returns
This commit is contained in:
parent
8b70d83c7f
commit
72df3e5ee4
|
|
@ -1,9 +1,9 @@
|
|||
echo "Processing corescripts..."
|
||||
for file in luau/[0-9]*.luau; do
|
||||
darklua process -c dense.json5 $file processed/$(basename "${file::-1}")
|
||||
darklua process -c ../dense.json5 $file processed/$(basename "${file::-1}")
|
||||
done
|
||||
|
||||
echo "Processing other corescripts..."
|
||||
for file in luau/[a-z]*.luau; do
|
||||
darklua process -c lines.json5 $file processed/$(basename "${file::-1}")
|
||||
darklua process -c ../lines.json5 $file processed/$(basename "${file::-1}")
|
||||
done
|
||||
|
|
|
|||
|
|
@ -8605,6 +8605,7 @@ declare class ServiceProvider extends Instance
|
|||
LoadingGuiService: any
|
||||
ScriptInformationProvider: ScriptInformationProvider
|
||||
JointsService: JointsService
|
||||
LogService: any
|
||||
|
||||
function FindService(self, className: string): Instance
|
||||
function GetService(self, service: "AnimationClipProvider"): AnimationClipProvider
|
||||
|
|
@ -8809,6 +8810,7 @@ declare class ServiceProvider extends Instance
|
|||
function GetService(self, service: "LoadingGuiService"): any
|
||||
function GetService(self, service: "PersonalServerService"): PersonalServerService
|
||||
function GetService(self, service: "Terrain"): Terrain
|
||||
function GetService(self, service: "LogService"): any
|
||||
end
|
||||
|
||||
declare class DataModel extends ServiceProvider
|
||||
|
|
|
|||
|
|
@ -615,9 +615,8 @@ end
|
|||
function currencyTypeToString(currencyType)
|
||||
if currencyType == Enum.CurrencyType.Tix then
|
||||
return "Tix"
|
||||
else
|
||||
return "R$"
|
||||
end
|
||||
return "R$"
|
||||
end
|
||||
|
||||
-- figure out what currency to use based on the currency you can actually sell the item in and what the script specified
|
||||
|
|
|
|||
|
|
@ -451,27 +451,27 @@ function initializeDeveloperConsole()
|
|||
|
||||
local previousMousePosScroll
|
||||
|
||||
local pScrollHandle
|
||||
-- local pScrollHandle
|
||||
|
||||
local pOffset
|
||||
|
||||
local scrollUpIsDown = false
|
||||
local scrollDownIsDown = false
|
||||
|
||||
function clean()
|
||||
local function clean()
|
||||
previousMousePos = nil
|
||||
pPos = nil
|
||||
previousMousePosResize = nil
|
||||
pSize = nil
|
||||
previousMousePosScroll = nil
|
||||
pScrollHandle = nil
|
||||
-- pScrollHandle = nil
|
||||
pOffset = nil
|
||||
scrollUpIsDown = false
|
||||
scrollDownIsDown = false
|
||||
end
|
||||
|
||||
---Handle Dev-Console Position
|
||||
function refreshConsolePosition(x, y)
|
||||
local function refreshConsolePosition(x, y)
|
||||
if not previousMousePos then
|
||||
return
|
||||
end
|
||||
|
|
@ -491,7 +491,7 @@ function initializeDeveloperConsole()
|
|||
end)
|
||||
|
||||
---Handle Dev-Console Size
|
||||
function refreshConsoleSize(x, y)
|
||||
local function refreshConsoleSize(x, y)
|
||||
if not previousMousePosResize then
|
||||
return
|
||||
end
|
||||
|
|
@ -525,7 +525,7 @@ function initializeDeveloperConsole()
|
|||
local optionsHidden = true
|
||||
local animating = false
|
||||
--Options
|
||||
function startAnimation()
|
||||
local function startAnimation()
|
||||
if animating then
|
||||
return
|
||||
end
|
||||
|
|
@ -561,7 +561,7 @@ function initializeDeveloperConsole()
|
|||
|
||||
--Scroll Position
|
||||
|
||||
function changeOffset(value)
|
||||
local function changeOffset(value)
|
||||
if currentConsole == LOCAL_CONSOLE then
|
||||
localOffset += value
|
||||
elseif currentConsole == SERVER_CONSOLE then
|
||||
|
|
@ -572,7 +572,7 @@ function initializeDeveloperConsole()
|
|||
end
|
||||
|
||||
--Refresh Dev-Console Text
|
||||
function refreshTextHolderForReal()
|
||||
local function refreshTextHolderForReal()
|
||||
local childMessages = Dev_TextHolder:GetChildren()
|
||||
|
||||
local messageList
|
||||
|
|
@ -669,7 +669,7 @@ function initializeDeveloperConsole()
|
|||
-- (Whenever for one reason or another a lot of output comes in, it can lag
|
||||
-- This will make it behave better in a situation of a lot of output comming in)
|
||||
local refreshQueued = false
|
||||
function refreshTextHolder()
|
||||
local function refreshTextHolder()
|
||||
if refreshQueued then
|
||||
return
|
||||
end
|
||||
|
|
@ -683,7 +683,7 @@ function initializeDeveloperConsole()
|
|||
--Handle Dev-Console Scrollbar
|
||||
|
||||
local inside = 0
|
||||
function holdingUpButton()
|
||||
local function holdingUpButton()
|
||||
if scrollUpIsDown then
|
||||
return
|
||||
end
|
||||
|
|
@ -697,7 +697,7 @@ function initializeDeveloperConsole()
|
|||
inside -= 1
|
||||
end
|
||||
|
||||
function holdingDownButton()
|
||||
local function holdingDownButton()
|
||||
if scrollDownIsDown then
|
||||
return
|
||||
end
|
||||
|
|
@ -733,7 +733,7 @@ function initializeDeveloperConsole()
|
|||
clean()
|
||||
end)
|
||||
|
||||
function handleScroll(x, y)
|
||||
local function handleScroll(x, y)
|
||||
if not previousMousePosScroll then
|
||||
return
|
||||
end
|
||||
|
|
@ -764,7 +764,7 @@ function initializeDeveloperConsole()
|
|||
|
||||
Dev_ScrollArea.Handle.MouseButton1Down:connect(function(x, y)
|
||||
previousMousePosScroll = Vector2.new(x, y)
|
||||
pScrollHandle = Dev_ScrollArea.Handle.AbsolutePosition
|
||||
-- pScrollHandle = Dev_ScrollArea.Handle.AbsolutePosition
|
||||
if currentConsole == LOCAL_CONSOLE then
|
||||
pOffset = localOffset
|
||||
elseif currentConsole == SERVER_CONSOLE then
|
||||
|
|
@ -867,7 +867,7 @@ function initializeDeveloperConsole()
|
|||
|
||||
local str = "%s:%s:%s"
|
||||
|
||||
function ConvertTimeStamp(timeStamp)
|
||||
local function ConvertTimeStamp(timeStamp)
|
||||
local localTime = timeStamp - os.time() + math.floor(tick())
|
||||
local dayTime = localTime % 86400
|
||||
|
||||
|
|
@ -924,9 +924,9 @@ function initializeDeveloperConsole()
|
|||
end)
|
||||
|
||||
---Dev-Console Message Functionality
|
||||
function AddLocalMessage(str, messageType, timeStamp)
|
||||
local function AddLocalMessage(messageStr, messageType, timeStamp)
|
||||
localMessageList[#localMessageList + 1] = {
|
||||
Message = str,
|
||||
Message = messageStr,
|
||||
Time = ConvertTimeStamp(timeStamp),
|
||||
Type = messageType,
|
||||
}
|
||||
|
|
@ -939,9 +939,9 @@ function initializeDeveloperConsole()
|
|||
repositionList()
|
||||
end
|
||||
|
||||
function AddServerMessage(str, messageType, timeStamp)
|
||||
local function AddServerMessage(messageStr, messageType, timeStamp)
|
||||
serverMessageList[#serverMessageList + 1] = {
|
||||
Message = str,
|
||||
Message = messageStr,
|
||||
Time = ConvertTimeStamp(timeStamp),
|
||||
Type = messageType,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ inside.Name = "inside"
|
|||
inside.Value = false
|
||||
inside.Parent = frameTip
|
||||
|
||||
function setUpListeners(frameToListen)
|
||||
local function setUpListeners(frameToListen)
|
||||
local fadeSpeed = 0.1
|
||||
frameToListen.Parent.MouseEnter:connect(function()
|
||||
if frameToListen:FindFirstChild "inside" then
|
||||
|
|
@ -50,11 +50,13 @@ function setUpListeners(frameToListen)
|
|||
end
|
||||
end
|
||||
end)
|
||||
function killTip(killFrame)
|
||||
|
||||
local function killTip(killFrame)
|
||||
killFrame.inside.Value = false
|
||||
killFrame.BackgroundTransparency = 1
|
||||
killFrame.TextTransparency = 1
|
||||
end
|
||||
|
||||
frameToListen.Parent.MouseLeave:connect(function()
|
||||
killTip(frameToListen)
|
||||
end)
|
||||
|
|
@ -63,7 +65,7 @@ function setUpListeners(frameToListen)
|
|||
end)
|
||||
end
|
||||
|
||||
function createSettingsButtonTip(parent)
|
||||
local function createSettingsButtonTip(parent)
|
||||
if parent == nil then
|
||||
parent = bottomLeftControl:FindFirstChild "SettingsButton"
|
||||
end
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ end
|
|||
local damageGuiWidth = 5.0
|
||||
local damageGuiHeight = 5.0
|
||||
|
||||
function waitForChild(parent, childName)
|
||||
local function waitForChild(parent, childName)
|
||||
local child = parent:findFirstChild(childName)
|
||||
if child then
|
||||
return child
|
||||
|
|
@ -55,7 +55,7 @@ end
|
|||
Humanoid.MaxHealth = myHealth.Value
|
||||
Humanoid.Health = myHealth.Value
|
||||
|
||||
function onMaxHealthChange()
|
||||
local function onMaxHealthChange()
|
||||
Humanoid.MaxHealth = myHealth.Value
|
||||
Humanoid.Health = myHealth.Value
|
||||
end
|
||||
|
|
@ -79,7 +79,7 @@ end
|
|||
|
||||
print "newHealth declarations finished"
|
||||
|
||||
function billboardHealthChange(dmg)
|
||||
local function billboardHealthChange(dmg)
|
||||
local textLabel = Instance.new "TextLabel"
|
||||
if dmg > 0 then
|
||||
textLabel.Text = tostring(dmg)
|
||||
|
|
@ -104,7 +104,7 @@ function billboardHealthChange(dmg)
|
|||
textLabel:remove()
|
||||
end
|
||||
|
||||
function setMaxHealth()
|
||||
local function setMaxHealth()
|
||||
--print(Humanoid.Health)
|
||||
if myHealth.Value >= 0 then
|
||||
Humanoid.MaxHealth = myHealth.Value
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
-- CoreGui.RobloxGui.CoreScripts/MainBotChatScript
|
||||
print "[Mercury]: Loaded corescript 39250920"
|
||||
|
||||
function waitForProperty(instance, name)
|
||||
local InsertService = game:GetService "InsertService"
|
||||
|
||||
local function waitForProperty(instance, name)
|
||||
while not instance[name] do
|
||||
instance.Changed:wait()
|
||||
end
|
||||
end
|
||||
|
||||
function waitForChild(instance, name)
|
||||
local function waitForChild(instance, name)
|
||||
while not instance:FindFirstChild(name) do
|
||||
instance.ChildAdded:wait()
|
||||
end
|
||||
|
|
@ -39,15 +41,14 @@ else
|
|||
gui = game.CoreGui.RobloxGui
|
||||
end
|
||||
|
||||
function currentTone()
|
||||
local function currentTone()
|
||||
if currentConversationDialog then
|
||||
return currentConversationDialog.Tone
|
||||
else
|
||||
return Enum.DialogTone.Neutral
|
||||
end
|
||||
return Enum.DialogTone.Neutral
|
||||
end
|
||||
|
||||
function createChatNotificationGui()
|
||||
local function createChatNotificationGui()
|
||||
chatNotificationGui = Instance.new "BillboardGui"
|
||||
chatNotificationGui.Name = "ChatNotificationGui"
|
||||
chatNotificationGui.ExtentsOffset = Vector3.new(0, 1, 0)
|
||||
|
|
@ -79,24 +80,36 @@ function createChatNotificationGui()
|
|||
button.Parent = image
|
||||
end
|
||||
|
||||
function getChatColor(tone)
|
||||
if tone == Enum.DialogTone.Neutral then
|
||||
return Enum.ChatColor.Blue
|
||||
elseif tone == Enum.DialogTone.Friendly then
|
||||
local function getChatColor(tone)
|
||||
if tone == Enum.DialogTone.Friendly then
|
||||
return Enum.ChatColor.Green
|
||||
elseif tone == Enum.DialogTone.Enemy then
|
||||
return Enum.ChatColor.Red
|
||||
end
|
||||
return Enum.ChatColor.Blue
|
||||
end
|
||||
|
||||
function styleChoices(tone)
|
||||
local function resetColor(frame, tone)
|
||||
if tone == Enum.DialogTone.Neutral then
|
||||
frame.BackgroundColor3 = Color3.new(0 / 255, 0 / 255, 179 / 255)
|
||||
frame.Number.TextColor3 = Color3.new(45 / 255, 142 / 255, 245 / 255)
|
||||
elseif tone == Enum.DialogTone.Friendly then
|
||||
frame.BackgroundColor3 = Color3.new(0 / 255, 77 / 255, 0 / 255)
|
||||
frame.Number.TextColor3 = Color3.new(0 / 255, 190 / 255, 0 / 255)
|
||||
elseif tone == Enum.DialogTone.Enemy then
|
||||
frame.BackgroundColor3 = Color3.new(140 / 255, 0 / 255, 0 / 255)
|
||||
frame.Number.TextColor3 = Color3.new(255 / 255, 88 / 255, 79 / 255)
|
||||
end
|
||||
end
|
||||
|
||||
local function styleChoices(tone)
|
||||
for _, obj in pairs(choices) do
|
||||
resetColor(obj, tone)
|
||||
end
|
||||
resetColor(lastChoice, tone)
|
||||
end
|
||||
|
||||
function styleMainFrame(tone)
|
||||
local function styleMainFrame(tone)
|
||||
if tone == Enum.DialogTone.Neutral then
|
||||
mainFrame.Style = Enum.FrameStyle.ChatBlue
|
||||
mainFrame.Tail.Image =
|
||||
|
|
@ -113,29 +126,31 @@ function styleMainFrame(tone)
|
|||
|
||||
styleChoices(tone)
|
||||
end
|
||||
function setChatNotificationTone(gui, purpose, tone)
|
||||
|
||||
local function setChatNotificationTone(notificationGui, purpose, tone)
|
||||
if tone == Enum.DialogTone.Neutral then
|
||||
gui.Image.Image =
|
||||
notificationGui.Image.Image =
|
||||
"rbxasset://textures/chatBubble_botBlue_notify_bkg.png"
|
||||
elseif tone == Enum.DialogTone.Friendly then
|
||||
gui.Image.Image =
|
||||
notificationGui.Image.Image =
|
||||
"rbxasset://textures/chatBubble_botGreen_notify_bkg.png"
|
||||
elseif tone == Enum.DialogTone.Enemy then
|
||||
gui.Image.Image = "rbxasset://textures/chatBubble_botRed_notify_bkg.png"
|
||||
notificationGui.Image.Image =
|
||||
"rbxasset://textures/chatBubble_botRed_notify_bkg.png"
|
||||
end
|
||||
if purpose == Enum.DialogPurpose.Quest then
|
||||
gui.Image.Button.Image =
|
||||
notificationGui.Image.Button.Image =
|
||||
"rbxasset://textures/chatBubble_bot_notify_bang.png"
|
||||
elseif purpose == Enum.DialogPurpose.Help then
|
||||
gui.Image.Button.Image =
|
||||
notificationGui.Image.Button.Image =
|
||||
"rbxasset://textures/chatBubble_bot_notify_question.png"
|
||||
elseif purpose == Enum.DialogPurpose.Shop then
|
||||
gui.Image.Button.Image =
|
||||
notificationGui.Image.Button.Image =
|
||||
"rbxasset://textures/chatBubble_bot_notify_money.png"
|
||||
end
|
||||
end
|
||||
|
||||
function createMessageDialog()
|
||||
local function createMessageDialog()
|
||||
messageDialog = Instance.new "Frame"
|
||||
messageDialog.Name = "DialogScriptMessage"
|
||||
messageDialog.Style = Enum.FrameStyle.RobloxRound
|
||||
|
|
@ -152,7 +167,7 @@ function createMessageDialog()
|
|||
text.Parent = messageDialog
|
||||
end
|
||||
|
||||
function showMessage(msg, size)
|
||||
local function showMessage(msg, size)
|
||||
messageDialog.Text.Text = msg
|
||||
messageDialog.Size = UDim2.new(0, size, 0, 40)
|
||||
messageDialog.Position = UDim2.new(0.5, -size / 2, 0.5, -40)
|
||||
|
|
@ -161,25 +176,12 @@ function showMessage(msg, size)
|
|||
messageDialog.Visible = false
|
||||
end
|
||||
|
||||
function variableDelay(str)
|
||||
local function variableDelay(str)
|
||||
local length = math.min(string.len(str), 100)
|
||||
wait(0.75 + ((length / 75) * 1.5))
|
||||
end
|
||||
|
||||
function resetColor(frame, tone)
|
||||
if tone == Enum.DialogTone.Neutral then
|
||||
frame.BackgroundColor3 = Color3.new(0 / 255, 0 / 255, 179 / 255)
|
||||
frame.Number.TextColor3 = Color3.new(45 / 255, 142 / 255, 245 / 255)
|
||||
elseif tone == Enum.DialogTone.Friendly then
|
||||
frame.BackgroundColor3 = Color3.new(0 / 255, 77 / 255, 0 / 255)
|
||||
frame.Number.TextColor3 = Color3.new(0 / 255, 190 / 255, 0 / 255)
|
||||
elseif tone == Enum.DialogTone.Enemy then
|
||||
frame.BackgroundColor3 = Color3.new(140 / 255, 0 / 255, 0 / 255)
|
||||
frame.Number.TextColor3 = Color3.new(255 / 255, 88 / 255, 79 / 255)
|
||||
end
|
||||
end
|
||||
|
||||
function highlightColor(frame, tone)
|
||||
local function highlightColor(frame, tone)
|
||||
if tone == Enum.DialogTone.Neutral then
|
||||
frame.BackgroundColor3 = Color3.new(2 / 255, 108 / 255, 255 / 255)
|
||||
frame.Number.TextColor3 = Color3.new(1, 1, 1)
|
||||
|
|
@ -192,7 +194,7 @@ function highlightColor(frame, tone)
|
|||
end
|
||||
end
|
||||
|
||||
function endDialog()
|
||||
local function endDialog()
|
||||
if currentAbortDialogScript then
|
||||
currentAbortDialogScript:Remove()
|
||||
currentAbortDialogScript = nil
|
||||
|
|
@ -207,163 +209,42 @@ function endDialog()
|
|||
reenableScript.Parent = dialog
|
||||
end
|
||||
|
||||
for dialog, gui in pairs(dialogMap) do
|
||||
if dialog and gui then
|
||||
gui.Enabled = not dialog.InUse
|
||||
for dialog2, gui2 in pairs(dialogMap) do
|
||||
if dialog2 and gui2 then
|
||||
gui2.Enabled = not dialog2.InUse
|
||||
end
|
||||
end
|
||||
|
||||
currentConversationPartner = nil
|
||||
end
|
||||
|
||||
function wanderDialog()
|
||||
print "Wander"
|
||||
local function wanderDialog()
|
||||
print "[Mercury]: Dialog wander"
|
||||
mainFrame.Visible = false
|
||||
endDialog()
|
||||
showMessage(characterWanderedOffMessage, characterWanderedOffSize)
|
||||
end
|
||||
|
||||
function timeoutDialog()
|
||||
print "Timeout"
|
||||
local function timeoutDialog()
|
||||
print "[Mercury]: Dialog timeout"
|
||||
mainFrame.Visible = false
|
||||
endDialog()
|
||||
showMessage(conversationTimedOut, conversationTimedOutSize)
|
||||
end
|
||||
function normalEndDialog()
|
||||
print "Done"
|
||||
|
||||
local function normalEndDialog()
|
||||
print "[Mercury]: Dialog done"
|
||||
endDialog()
|
||||
end
|
||||
|
||||
function sanitizeMessage(msg)
|
||||
local function sanitizeMessage(msg)
|
||||
if string.len(msg) == 0 then
|
||||
return "..."
|
||||
else
|
||||
return msg
|
||||
end
|
||||
return msg
|
||||
end
|
||||
|
||||
function selectChoice(choice)
|
||||
renewKillswitch(currentConversationDialog)
|
||||
|
||||
--First hide the Gui
|
||||
mainFrame.Visible = false
|
||||
if choice == lastChoice then
|
||||
game.Chat:Chat(
|
||||
game.Players.LocalPlayer.Character,
|
||||
"Goodbye!",
|
||||
getChatColor(currentTone())
|
||||
)
|
||||
|
||||
normalEndDialog()
|
||||
else
|
||||
local dialogChoice = choiceMap[choice]
|
||||
|
||||
game.Chat:Chat(
|
||||
game.Players.LocalPlayer.Character,
|
||||
sanitizeMessage(dialogChoice.UserDialog),
|
||||
getChatColor(currentTone())
|
||||
)
|
||||
wait(1)
|
||||
currentConversationDialog:SignalDialogChoiceSelected(
|
||||
player,
|
||||
dialogChoice
|
||||
)
|
||||
game.Chat:Chat(
|
||||
currentConversationPartner,
|
||||
sanitizeMessage(dialogChoice.ResponseDialog),
|
||||
getChatColor(currentTone())
|
||||
)
|
||||
|
||||
variableDelay(dialogChoice.ResponseDialog)
|
||||
presentDialogChoices(
|
||||
currentConversationPartner,
|
||||
dialogChoice:GetChildren()
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
function newChoice(numberText)
|
||||
local frame = Instance.new "TextButton"
|
||||
frame.BackgroundColor3 = Color3.new(0 / 255, 0 / 255, 179 / 255)
|
||||
frame.AutoButtonColor = false
|
||||
frame.BorderSizePixel = 0
|
||||
frame.Text = ""
|
||||
frame.MouseEnter:connect(function()
|
||||
highlightColor(frame, currentTone())
|
||||
end)
|
||||
frame.MouseLeave:connect(function()
|
||||
resetColor(frame, currentTone())
|
||||
end)
|
||||
frame.MouseButton1Click:connect(function()
|
||||
selectChoice(frame)
|
||||
end)
|
||||
frame.RobloxLocked = true
|
||||
|
||||
local number = Instance.new "TextLabel"
|
||||
number.Name = "Number"
|
||||
number.TextColor3 = Color3.new(127 / 255, 212 / 255, 255 / 255)
|
||||
number.Text = numberText
|
||||
number.FontSize = Enum.FontSize.Size14
|
||||
number.BackgroundTransparency = 1
|
||||
number.Position = UDim2.new(0, 4, 0, 2)
|
||||
number.Size = UDim2.new(0, 20, 0, 24)
|
||||
number.TextXAlignment = Enum.TextXAlignment.Left
|
||||
number.TextYAlignment = Enum.TextYAlignment.Top
|
||||
number.RobloxLocked = true
|
||||
number.Parent = frame
|
||||
|
||||
local prompt = Instance.new "TextLabel"
|
||||
prompt.Name = "UserPrompt"
|
||||
prompt.BackgroundTransparency = 1
|
||||
prompt.TextColor3 = Color3.new(1, 1, 1)
|
||||
prompt.FontSize = Enum.FontSize.Size14
|
||||
prompt.Position = UDim2.new(0, 28, 0, 2)
|
||||
prompt.Size = UDim2.new(1, -32, 1, -4)
|
||||
prompt.TextXAlignment = Enum.TextXAlignment.Left
|
||||
prompt.TextYAlignment = Enum.TextYAlignment.Top
|
||||
prompt.TextWrap = true
|
||||
prompt.RobloxLocked = true
|
||||
prompt.Parent = frame
|
||||
|
||||
return frame
|
||||
end
|
||||
function initialize(parent)
|
||||
choices[1] = newChoice "1)"
|
||||
choices[2] = newChoice "2)"
|
||||
choices[3] = newChoice "3)"
|
||||
choices[4] = newChoice "4)"
|
||||
|
||||
lastChoice = newChoice "5)"
|
||||
lastChoice.UserPrompt.Text = "Goodbye!"
|
||||
lastChoice.Size = UDim2.new(1, 0, 0, 28)
|
||||
|
||||
mainFrame = Instance.new "Frame"
|
||||
mainFrame.Name = "UserDialogArea"
|
||||
mainFrame.Size = UDim2.new(0, 350, 0, 200)
|
||||
mainFrame.Style = Enum.FrameStyle.ChatBlue
|
||||
mainFrame.Visible = false
|
||||
|
||||
local imageLabel = Instance.new "ImageLabel"
|
||||
imageLabel.Name = "Tail"
|
||||
imageLabel.Size = UDim2.new(0, 62, 0, 53)
|
||||
imageLabel.Position = UDim2.new(1, 8, 0.25)
|
||||
imageLabel.Image = "rbxasset://textures/chatBubble_botBlue_tailRight.png"
|
||||
imageLabel.BackgroundTransparency = 1
|
||||
imageLabel.RobloxLocked = true
|
||||
imageLabel.Parent = mainFrame
|
||||
|
||||
for _, obj in pairs(choices) do
|
||||
obj.RobloxLocked = true
|
||||
obj.Parent = mainFrame
|
||||
end
|
||||
lastChoice.RobloxLocked = true
|
||||
lastChoice.Parent = mainFrame
|
||||
|
||||
mainFrame.RobloxLocked = true
|
||||
mainFrame.Parent = parent
|
||||
end
|
||||
|
||||
function presentDialogChoices(talkingPart, dialogChoices)
|
||||
local function presentDialogChoices(talkingPart, dialogChoices)
|
||||
if not currentConversationDialog then
|
||||
return
|
||||
end
|
||||
|
|
@ -419,19 +300,160 @@ function presentDialogChoices(talkingPart, dialogChoices)
|
|||
mainFrame.Visible = true
|
||||
end
|
||||
|
||||
function doDialog(dialog)
|
||||
while not Instance.Lock(dialog, player) do
|
||||
wait()
|
||||
local function renewKillswitch(dialog)
|
||||
if currentAbortDialogScript then
|
||||
currentAbortDialogScript:Remove()
|
||||
currentAbortDialogScript = nil
|
||||
end
|
||||
|
||||
currentAbortDialogScript = timeoutScript:Clone()
|
||||
currentAbortDialogScript.archivable = false
|
||||
currentAbortDialogScript.Disabled = false
|
||||
currentAbortDialogScript.Parent = dialog
|
||||
end
|
||||
|
||||
|
||||
local function selectChoice(choice)
|
||||
renewKillswitch(currentConversationDialog)
|
||||
|
||||
--First hide the Gui
|
||||
mainFrame.Visible = false
|
||||
if choice == lastChoice then
|
||||
game.Chat:Chat(
|
||||
game.Players.LocalPlayer.Character,
|
||||
"Goodbye!",
|
||||
getChatColor(currentTone())
|
||||
)
|
||||
|
||||
normalEndDialog()
|
||||
else
|
||||
local dialogChoice = choiceMap[choice]
|
||||
|
||||
game.Chat:Chat(
|
||||
game.Players.LocalPlayer.Character,
|
||||
sanitizeMessage(dialogChoice.UserDialog),
|
||||
getChatColor(currentTone())
|
||||
)
|
||||
wait(1)
|
||||
currentConversationDialog:SignalDialogChoiceSelected(
|
||||
player,
|
||||
dialogChoice
|
||||
)
|
||||
game.Chat:Chat(
|
||||
currentConversationPartner,
|
||||
sanitizeMessage(dialogChoice.ResponseDialog),
|
||||
getChatColor(currentTone())
|
||||
)
|
||||
|
||||
variableDelay(dialogChoice.ResponseDialog)
|
||||
presentDialogChoices(
|
||||
currentConversationPartner,
|
||||
dialogChoice:GetChildren()
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
local function newChoice(numberText)
|
||||
local frame = Instance.new "TextButton"
|
||||
frame.BackgroundColor3 = Color3.new(0 / 255, 0 / 255, 179 / 255)
|
||||
frame.AutoButtonColor = false
|
||||
frame.BorderSizePixel = 0
|
||||
frame.Text = ""
|
||||
frame.MouseEnter:connect(function()
|
||||
highlightColor(frame, currentTone())
|
||||
end)
|
||||
frame.MouseLeave:connect(function()
|
||||
resetColor(frame, currentTone())
|
||||
end)
|
||||
frame.MouseButton1Click:connect(function()
|
||||
selectChoice(frame)
|
||||
end)
|
||||
frame.RobloxLocked = true
|
||||
|
||||
local number = Instance.new "TextLabel"
|
||||
number.Name = "Number"
|
||||
number.TextColor3 = Color3.new(127 / 255, 212 / 255, 255 / 255)
|
||||
number.Text = numberText
|
||||
number.FontSize = Enum.FontSize.Size14
|
||||
number.BackgroundTransparency = 1
|
||||
number.Position = UDim2.new(0, 4, 0, 2)
|
||||
number.Size = UDim2.new(0, 20, 0, 24)
|
||||
number.TextXAlignment = Enum.TextXAlignment.Left
|
||||
number.TextYAlignment = Enum.TextYAlignment.Top
|
||||
number.RobloxLocked = true
|
||||
number.Parent = frame
|
||||
|
||||
local prompt = Instance.new "TextLabel"
|
||||
prompt.Name = "UserPrompt"
|
||||
prompt.BackgroundTransparency = 1
|
||||
prompt.TextColor3 = Color3.new(1, 1, 1)
|
||||
prompt.FontSize = Enum.FontSize.Size14
|
||||
prompt.Position = UDim2.new(0, 28, 0, 2)
|
||||
prompt.Size = UDim2.new(1, -32, 1, -4)
|
||||
prompt.TextXAlignment = Enum.TextXAlignment.Left
|
||||
prompt.TextYAlignment = Enum.TextYAlignment.Top
|
||||
prompt.TextWrap = true
|
||||
prompt.RobloxLocked = true
|
||||
prompt.Parent = frame
|
||||
|
||||
return frame
|
||||
end
|
||||
|
||||
local function initialize(parent)
|
||||
choices[1] = newChoice "1)"
|
||||
choices[2] = newChoice "2)"
|
||||
choices[3] = newChoice "3)"
|
||||
choices[4] = newChoice "4)"
|
||||
|
||||
lastChoice = newChoice "5)"
|
||||
lastChoice.UserPrompt.Text = "Goodbye!"
|
||||
lastChoice.Size = UDim2.new(1, 0, 0, 28)
|
||||
|
||||
mainFrame = Instance.new "Frame"
|
||||
mainFrame.Name = "UserDialogArea"
|
||||
mainFrame.Size = UDim2.new(0, 350, 0, 200)
|
||||
mainFrame.Style = Enum.FrameStyle.ChatBlue
|
||||
mainFrame.Visible = false
|
||||
|
||||
local imageLabel = Instance.new "ImageLabel"
|
||||
imageLabel.Name = "Tail"
|
||||
imageLabel.Size = UDim2.new(0, 62, 0, 53)
|
||||
imageLabel.Position = UDim2.new(1, 8, 0.25)
|
||||
imageLabel.Image = "rbxasset://textures/chatBubble_botBlue_tailRight.png"
|
||||
imageLabel.BackgroundTransparency = 1
|
||||
imageLabel.RobloxLocked = true
|
||||
imageLabel.Parent = mainFrame
|
||||
|
||||
for _, obj in pairs(choices) do
|
||||
obj.RobloxLocked = true
|
||||
obj.Parent = mainFrame
|
||||
end
|
||||
lastChoice.RobloxLocked = true
|
||||
lastChoice.Parent = mainFrame
|
||||
|
||||
mainFrame.RobloxLocked = true
|
||||
mainFrame.Parent = parent
|
||||
end
|
||||
|
||||
local function doDialog(dialog)
|
||||
local il = Instance.Lock(dialog, player)
|
||||
print("for instance", il)
|
||||
while not il do
|
||||
wait()
|
||||
il = Instance.Lock(dialog, player)
|
||||
print("for instance", il)
|
||||
end
|
||||
|
||||
print("testin", dialog)
|
||||
|
||||
if dialog.InUse then
|
||||
Instance.Unlock(dialog)
|
||||
return
|
||||
else
|
||||
dialog.InUse = true
|
||||
Instance.Unlock(dialog)
|
||||
end
|
||||
|
||||
dialog.InUse = true
|
||||
Instance.Unlock(dialog)
|
||||
|
||||
currentConversationDialog = dialog
|
||||
game.Chat:Chat(
|
||||
dialog.Parent,
|
||||
|
|
@ -443,19 +465,7 @@ function doDialog(dialog)
|
|||
presentDialogChoices(dialog.Parent, dialog:GetChildren())
|
||||
end
|
||||
|
||||
function renewKillswitch(dialog)
|
||||
if currentAbortDialogScript then
|
||||
currentAbortDialogScript:Remove()
|
||||
currentAbortDialogScript = nil
|
||||
end
|
||||
|
||||
currentAbortDialogScript = timeoutScript:Clone()
|
||||
currentAbortDialogScript.archivable = false
|
||||
currentAbortDialogScript.Disabled = false
|
||||
currentAbortDialogScript.Parent = dialog
|
||||
end
|
||||
|
||||
function checkForLeaveArea()
|
||||
local function checkForLeaveArea()
|
||||
while currentConversationDialog do
|
||||
if
|
||||
currentConversationDialog.Parent
|
||||
|
|
@ -471,7 +481,7 @@ function checkForLeaveArea()
|
|||
end
|
||||
end
|
||||
|
||||
function startDialog(dialog)
|
||||
local function startDialog(dialog)
|
||||
if dialog.Parent and dialog.Parent:IsA "BasePart" then
|
||||
if
|
||||
player:DistanceFromCharacter(dialog.Parent.Position)
|
||||
|
|
@ -481,9 +491,9 @@ function startDialog(dialog)
|
|||
return
|
||||
end
|
||||
|
||||
for dialog, gui in pairs(dialogMap) do
|
||||
if dialog and gui then
|
||||
gui.Enabled = false
|
||||
for dialog2, gui2 in pairs(dialogMap) do
|
||||
if dialog2 and gui2 then
|
||||
gui2.Enabled = false
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -494,7 +504,7 @@ function startDialog(dialog)
|
|||
end
|
||||
end
|
||||
|
||||
function removeDialog(dialog)
|
||||
local function removeDialog(dialog)
|
||||
if dialogMap[dialog] then
|
||||
dialogMap[dialog]:Remove()
|
||||
dialogMap[dialog] = nil
|
||||
|
|
@ -505,7 +515,7 @@ function removeDialog(dialog)
|
|||
end
|
||||
end
|
||||
|
||||
function addDialog(dialog)
|
||||
local function addDialog(dialog)
|
||||
if dialog.Parent then
|
||||
if dialog.Parent:IsA "BasePart" then
|
||||
local chatGui = chatNotificationGui:clone()
|
||||
|
|
@ -551,11 +561,11 @@ function addDialog(dialog)
|
|||
end
|
||||
end
|
||||
|
||||
function fetchScripts()
|
||||
local model = game:GetService("InsertService"):LoadAsset(39226062)
|
||||
local function fetchScripts()
|
||||
local model = InsertService:LoadAsset(39226062)
|
||||
if type(model) == "string" then -- load failed, lets try again
|
||||
wait(0.1)
|
||||
model = game:GetService("InsertService"):LoadAsset(39226062)
|
||||
model = InsertService:LoadAsset(39226062)
|
||||
end
|
||||
if type(model) == "string" then -- not going to work, lets bail
|
||||
return
|
||||
|
|
@ -567,7 +577,7 @@ function fetchScripts()
|
|||
reenableDialogScript = model.ReenableDialogScript
|
||||
end
|
||||
|
||||
function onLoad()
|
||||
local function onLoad()
|
||||
waitForProperty(game.Players, "LocalPlayer")
|
||||
player = game.Players.LocalPlayer
|
||||
waitForProperty(player, "Character")
|
||||
|
|
|
|||
|
|
@ -4450,9 +4450,8 @@ t.CreatePluginFrame = function(name, size, position, scrollable, parent)
|
|||
|
||||
if scrollable then
|
||||
return dragBar, frame, helpFrame, closeEvent
|
||||
else
|
||||
return dragBar, widgetContainer, helpFrame, closeEvent
|
||||
end
|
||||
return dragBar, widgetContainer, helpFrame, closeEvent
|
||||
end
|
||||
|
||||
t.Help = function(funcNameOrFunc)
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ local function robloxLock(instance)
|
|||
end
|
||||
end
|
||||
|
||||
function resumeGameFunction(shield)
|
||||
local function resumeGameFunction(shield)
|
||||
shield.Settings:TweenPosition(
|
||||
UDim2.new(0.5, -262, -0.5, -200),
|
||||
Enum.EasingDirection.InOut,
|
||||
|
|
@ -83,7 +83,7 @@ function resumeGameFunction(shield)
|
|||
end)
|
||||
end
|
||||
|
||||
function goToMenu(container, menuName, moveDirection, size, position)
|
||||
local function goToMenu(container, menuName, moveDirection, size, position)
|
||||
if type(menuName) ~= "string" then
|
||||
return
|
||||
end
|
||||
|
|
@ -172,7 +172,7 @@ function goToMenu(container, menuName, moveDirection, size, position)
|
|||
end
|
||||
end
|
||||
|
||||
function resetLocalCharacter()
|
||||
local function resetLocalCharacter()
|
||||
local player = game.Players.LocalPlayer
|
||||
if player then
|
||||
if player.Character and player.Character:FindFirstChild "Humanoid" then
|
||||
|
|
@ -268,7 +268,7 @@ local function CreateTextButtons(frame, buttons, yPos, ySize)
|
|||
end
|
||||
end
|
||||
|
||||
function setRecordGui(recording, stopRecordButton, recordVideoButton)
|
||||
local function setRecordGui(recording, stopRecordButton, recordVideoButton)
|
||||
if recording then
|
||||
stopRecordButton.Visible = true
|
||||
recordVideoButton.Text = "Stop Recording"
|
||||
|
|
@ -278,12 +278,12 @@ function setRecordGui(recording, stopRecordButton, recordVideoButton)
|
|||
end
|
||||
end
|
||||
|
||||
function recordVideoClick(recordVideoButton, stopRecordButton)
|
||||
local function recordVideoClick(recordVideoButton, stopRecordButton)
|
||||
recordingVideo = not recordingVideo
|
||||
setRecordGui(recordingVideo, stopRecordButton, recordVideoButton)
|
||||
end
|
||||
|
||||
function backToGame(buttonClicked, shield, settingsButton)
|
||||
local function backToGame(buttonClicked, shield, settingsButton2)
|
||||
buttonClicked.Parent.Parent.Parent.Parent.Visible = false
|
||||
shield.Visible = false
|
||||
for i = 1, #centerDialogs do
|
||||
|
|
@ -292,10 +292,10 @@ function backToGame(buttonClicked, shield, settingsButton)
|
|||
end
|
||||
centerDialogs = {}
|
||||
game.GuiService:RemoveCenterDialog(shield)
|
||||
settingsButton.Active = true
|
||||
settingsButton2.Active = true
|
||||
end
|
||||
|
||||
function setDisabledState(guiObject)
|
||||
local function setDisabledState(guiObject)
|
||||
if not guiObject then
|
||||
return
|
||||
end
|
||||
|
|
@ -796,7 +796,7 @@ local function createGameMainMenu(baseZIndex, shield)
|
|||
game:FindFirstChild "LoadingGuiService"
|
||||
and #game.LoadingGuiService:GetChildren() > 0
|
||||
then
|
||||
local gameSettingsButton = createTextButton(
|
||||
gameSettingsButton = createTextButton(
|
||||
"Game Instructions",
|
||||
Enum.ButtonStyle.RobloxButton,
|
||||
Enum.FontSize.Size24,
|
||||
|
|
@ -1112,49 +1112,29 @@ local function createGameSettingsMenu(baseZIndex, _)
|
|||
end
|
||||
|
||||
local function translateSavedQualityLevelToInt(savedQualityLevel)
|
||||
if savedQualityLevel == Enum.SavedQualitySetting.Automatic then
|
||||
return 0
|
||||
elseif
|
||||
savedQualityLevel == Enum.SavedQualitySetting.QualityLevel1
|
||||
then
|
||||
local sqs = Enum.SavedQualitySetting
|
||||
if savedQualityLevel == sqs.QualityLevel1 then
|
||||
return 1
|
||||
elseif
|
||||
savedQualityLevel == Enum.SavedQualitySetting.QualityLevel2
|
||||
then
|
||||
elseif savedQualityLevel == sqs.QualityLevel2 then
|
||||
return 2
|
||||
elseif
|
||||
savedQualityLevel == Enum.SavedQualitySetting.QualityLevel3
|
||||
then
|
||||
elseif savedQualityLevel == sqs.QualityLevel3 then
|
||||
return 3
|
||||
elseif
|
||||
savedQualityLevel == Enum.SavedQualitySetting.QualityLevel4
|
||||
then
|
||||
elseif savedQualityLevel == sqs.QualityLevel4 then
|
||||
return 4
|
||||
elseif
|
||||
savedQualityLevel == Enum.SavedQualitySetting.QualityLevel5
|
||||
then
|
||||
elseif savedQualityLevel == sqs.QualityLevel5 then
|
||||
return 5
|
||||
elseif
|
||||
savedQualityLevel == Enum.SavedQualitySetting.QualityLevel6
|
||||
then
|
||||
elseif savedQualityLevel == sqs.QualityLevel6 then
|
||||
return 6
|
||||
elseif
|
||||
savedQualityLevel == Enum.SavedQualitySetting.QualityLevel7
|
||||
then
|
||||
elseif savedQualityLevel == sqs.QualityLevel7 then
|
||||
return 7
|
||||
elseif
|
||||
savedQualityLevel == Enum.SavedQualitySetting.QualityLevel8
|
||||
then
|
||||
elseif savedQualityLevel == sqs.QualityLevel8 then
|
||||
return 8
|
||||
elseif
|
||||
savedQualityLevel == Enum.SavedQualitySetting.QualityLevel9
|
||||
then
|
||||
elseif savedQualityLevel == sqs.QualityLevel9 then
|
||||
return 9
|
||||
elseif
|
||||
savedQualityLevel == Enum.SavedQualitySetting.QualityLevel10
|
||||
then
|
||||
elseif savedQualityLevel == sqs.QualityLevel10 then
|
||||
return 10
|
||||
end
|
||||
return 0
|
||||
end
|
||||
|
||||
local function enableGraphicsWidget()
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ print "[Mercury]: Loaded corescript 48488235"
|
|||
|
||||
local ADMINS = {
|
||||
taskmanager = 1,
|
||||
Heliodex = 1,
|
||||
heliodex = 1,
|
||||
multako = "http://banland.xyz/asset/?id=6923328292",
|
||||
mercury = 1,
|
||||
pizzaboxer = "http://banland.xyz/asset/?id=6917566633",
|
||||
|
|
@ -183,7 +183,7 @@ end
|
|||
imgName asset name of image to fill background
|
||||
@Return: background gui object
|
||||
--]]
|
||||
function MakeBackgroundGuiObj(imgName)
|
||||
local function MakeBackgroundGuiObj(imgName)
|
||||
return Obj.Create "ImageLabel" {
|
||||
Name = "Background",
|
||||
BackgroundTransparency = 1,
|
||||
|
|
@ -193,7 +193,7 @@ function MakeBackgroundGuiObj(imgName)
|
|||
}
|
||||
end
|
||||
--[[ turns 255 integer color value to a color3 --]]
|
||||
function Color3I(r, g, b)
|
||||
local function Color3I(r, g, b)
|
||||
return Color3.new(r / 255, g / 255, b / 255)
|
||||
end
|
||||
|
||||
|
|
@ -203,13 +203,12 @@ end
|
|||
membershipType Enum of membership status
|
||||
@Return: string of image asset
|
||||
--]]
|
||||
function getMembershipTypeIcon(membershipType, playerName)
|
||||
local function getMembershipTypeIcon(membershipType, playerName)
|
||||
if ADMINS[string.lower(playerName)] ~= nil then
|
||||
if ADMINS[string.lower(playerName)] == 1 then
|
||||
return "http://banland.xyz/asset/?id=6923330951"
|
||||
else
|
||||
return ADMINS[string.lower(playerName)]
|
||||
end
|
||||
return ADMINS[string.lower(playerName)]
|
||||
elseif membershipType == Enum.MembershipType.None then
|
||||
return ""
|
||||
elseif membershipType == Enum.MembershipType.BuildersClub then
|
||||
|
|
@ -299,7 +298,7 @@ end
|
|||
child name of child object to look for
|
||||
@Return: object waited for
|
||||
--]]
|
||||
function WaitForChild(parent, child)
|
||||
local function WaitForChild(parent, child)
|
||||
while not parent:FindFirstChild(child) do
|
||||
wait()
|
||||
debugprint(" child " .. parent.Name .. " waiting for " .. child)
|
||||
|
|
@ -1002,7 +1001,7 @@ end)
|
|||
-- return numEnts
|
||||
-- end
|
||||
|
||||
function AreAllEntriesOnScreen()
|
||||
local function AreAllEntriesOnScreen()
|
||||
return #MiddleFrameBackgrounds * MiddleTemplate.Size.Y.Scale
|
||||
<= 1 + DefaultBottomClipPos
|
||||
end
|
||||
|
|
@ -1011,24 +1010,25 @@ end
|
|||
-- return 1 + DefaultBottomClipPos
|
||||
-- end
|
||||
|
||||
function GetMaxScroll()
|
||||
local function GetMaxScroll()
|
||||
return DefaultBottomClipPos * -1
|
||||
end
|
||||
|
||||
-- can be optimized by caching when this varible changes
|
||||
function GetMinScroll()
|
||||
local function GetMinScroll()
|
||||
if AreAllEntriesOnScreen() then
|
||||
return GetMaxScroll()
|
||||
else
|
||||
return (
|
||||
GetMaxScroll()
|
||||
- (#MiddleFrameBackgrounds * MiddleTemplate.Size.Y.Scale)
|
||||
) + (1 + DefaultBottomClipPos)
|
||||
end
|
||||
return (
|
||||
GetMaxScroll()
|
||||
- (#MiddleFrameBackgrounds * MiddleTemplate.Size.Y.Scale)
|
||||
) + (1 + DefaultBottomClipPos)
|
||||
end
|
||||
|
||||
function AbsoluteToPercent(x, y)
|
||||
local function AbsoluteToPercent(x, y)
|
||||
return Vector2.new(x, y) / ScreenGui.AbsoluteSize
|
||||
end
|
||||
|
||||
--[[
|
||||
tweens property of element from starta to enda over length of time
|
||||
Warning: should be put in a Spawn call
|
||||
|
|
@ -1039,7 +1039,7 @@ end
|
|||
enda alpha to end tweening on
|
||||
length how many seconds to spend tweening
|
||||
--]]
|
||||
function TweenProperty(obj, propName, inita, enda, length)
|
||||
local function TweenProperty(obj, propName, inita, enda, length)
|
||||
local startTime = tick()
|
||||
while tick() - startTime < length do
|
||||
obj[propName] = ((enda - inita) * ((tick() - startTime) / length))
|
||||
|
|
@ -1048,6 +1048,7 @@ function TweenProperty(obj, propName, inita, enda, length)
|
|||
end
|
||||
obj[propName] = enda
|
||||
end
|
||||
|
||||
--[[
|
||||
UGLY UGLY HACK FUNCTION
|
||||
replace with some sort of global input catching A.S.A. FREAKING P.
|
||||
|
|
@ -1057,8 +1058,7 @@ end
|
|||
polledFunction function to call on mouse moved events in this gui
|
||||
exitFunction function to call when click event is fired
|
||||
--]]
|
||||
|
||||
function WaitForClick(frameParent, polledFunction, exitFunction)
|
||||
local function WaitForClick(frameParent, polledFunction, exitFunction)
|
||||
if WaitForClickLock then
|
||||
return
|
||||
end
|
||||
|
|
@ -1227,7 +1227,7 @@ end
|
|||
--[[
|
||||
opens the abuse dialog, initialises text to display selectedplayer
|
||||
--]]
|
||||
function OpenAbuseDialog()
|
||||
local function OpenAbuseDialog()
|
||||
debugprint "adding report dialog"
|
||||
AbusePlayerLabel.Text = SelectedPlayer.Name
|
||||
--AbuseDescriptionBox.Text = ""
|
||||
|
|
@ -1260,7 +1260,7 @@ end
|
|||
--[[
|
||||
creates dropdownbox, registers all listeners for abuse dialog
|
||||
--]]
|
||||
function InitReportAbuse()
|
||||
local function InitReportAbuse()
|
||||
UpdateAbuseFunction = function(abuseText)
|
||||
AbuseName = abuseText
|
||||
if AbuseName and SelectedPlayer then
|
||||
|
|
@ -1297,16 +1297,14 @@ end
|
|||
local function GetFriendStatus(player)
|
||||
if player == game.Players.LocalPlayer then
|
||||
return Enum.FriendStatus.NotFriend
|
||||
else
|
||||
local success, result = pcall(function()
|
||||
return game.Players.LocalPlayer:GetFriendStatus(player)
|
||||
end)
|
||||
if success then
|
||||
return result
|
||||
else
|
||||
return Enum.FriendStatus.NotFriend
|
||||
end
|
||||
end
|
||||
local success, result = pcall(function()
|
||||
return game.Players.LocalPlayer:GetFriendStatus(player)
|
||||
end)
|
||||
if success then
|
||||
return result
|
||||
end
|
||||
return Enum.FriendStatus.NotFriend
|
||||
end
|
||||
|
||||
--[[
|
||||
|
|
@ -1460,8 +1458,9 @@ function StatAdded(nchild, playerEntry)
|
|||
StatChanged(playerEntry, property)
|
||||
end)
|
||||
end
|
||||
|
||||
--returns whether any of the existing players has this stat
|
||||
function DoesStatExist(statName, exception)
|
||||
local function DoesStatExist(statName, exception)
|
||||
for _, playerf in pairs(PlayerFrames) do
|
||||
if
|
||||
playerf.Player ~= exception
|
||||
|
|
@ -1530,12 +1529,10 @@ function GetScoreValue(score)
|
|||
elseif score:IsA "BoolValue" then
|
||||
if score.Value then
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
end
|
||||
else
|
||||
return score.Value
|
||||
return 0
|
||||
end
|
||||
return score.Value
|
||||
end
|
||||
--[[
|
||||
|
||||
|
|
|
|||
|
|
@ -658,12 +658,12 @@ function resolveDrag(gearClone, x, y)
|
|||
then
|
||||
reorganizeLoadout(gearClone, false)
|
||||
return false
|
||||
else
|
||||
if dragBeginPos then
|
||||
gearClone.Position = dragBeginPos
|
||||
end
|
||||
return -1
|
||||
end
|
||||
|
||||
if dragBeginPos then
|
||||
gearClone.Position = dragBeginPos
|
||||
end
|
||||
return -1
|
||||
end
|
||||
|
||||
function unequipAllItems(dontEquipThis)
|
||||
|
|
|
|||
|
|
@ -136,9 +136,8 @@ function JsonWriter:IsArray(t)
|
|||
for k, _ in pairs(t) do
|
||||
if not isindex(k) then
|
||||
return false, "{", "}"
|
||||
else
|
||||
count = math.max(count, k)
|
||||
end
|
||||
count = math.max(count, k)
|
||||
end
|
||||
return true, "[", "]", count
|
||||
end
|
||||
|
|
@ -253,9 +252,8 @@ function JsonReader:Read()
|
|||
elseif peek == "/" then
|
||||
self:ReadComment()
|
||||
return self:Read()
|
||||
else
|
||||
return nil
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
function JsonReader:ReadTrue()
|
||||
|
|
|
|||
|
|
@ -199,9 +199,8 @@ local function autoAlignToFace(parts)
|
|||
local aatf = parts:FindFirstChild "AutoAlignToFace"
|
||||
if aatf then
|
||||
return aatf.Value
|
||||
else
|
||||
return false
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
local function getClosestAlignedWorldDirection(aVector3InWorld)
|
||||
|
|
@ -221,24 +220,20 @@ local function getClosestAlignedWorldDirection(aVector3InWorld)
|
|||
if math.abs(xDot) > math.abs(yDot) and math.abs(xDot) > math.abs(zDot) then
|
||||
if xDot > 0 then
|
||||
return 0
|
||||
else
|
||||
return 3
|
||||
end
|
||||
return 3
|
||||
elseif
|
||||
math.abs(yDot) > math.abs(xDot) and math.abs(yDot) > math.abs(zDot)
|
||||
then
|
||||
if yDot > 0 then
|
||||
return 1
|
||||
else
|
||||
return 4
|
||||
end
|
||||
else
|
||||
if zDot > 0 then
|
||||
return 2
|
||||
else
|
||||
return 5
|
||||
end
|
||||
return 4
|
||||
end
|
||||
if zDot > 0 then
|
||||
return 2
|
||||
end
|
||||
return 5
|
||||
end
|
||||
|
||||
local function positionPartsAtCFrame3(aCFrame, currentParts)
|
||||
|
|
@ -422,21 +417,18 @@ end
|
|||
local function getTargetPartBoundingBox(targetPart)
|
||||
if targetPart.Parent:FindFirstChild "RobloxModel" ~= nil then
|
||||
return getBoundingBox2(targetPart.Parent)
|
||||
else
|
||||
return getBoundingBox2(targetPart)
|
||||
end
|
||||
return getBoundingBox2(targetPart)
|
||||
end
|
||||
|
||||
local function getMouseTargetCFrame(targetPart)
|
||||
if targetPart.Parent:FindFirstChild "RobloxModel" ~= nil then
|
||||
if targetPart.Parent:IsA "Tool" then
|
||||
return targetPart.Parent.Handle.CFrame
|
||||
else
|
||||
return targetPart.Parent:GetModelCFrame()
|
||||
end
|
||||
else
|
||||
return targetPart.CFrame
|
||||
return targetPart.Parent:GetModelCFrame()
|
||||
end
|
||||
return targetPart.CFrame
|
||||
end
|
||||
|
||||
local function isBlocker(part) -- returns whether or not we want to cancel the stamp because we're blocked by this part
|
||||
|
|
@ -450,7 +442,8 @@ local function isBlocker(part) -- returns whether or not we want to cancel the s
|
|||
return false
|
||||
end
|
||||
if
|
||||
part:FindFirstChild "RobloxStamper" or part:FindFirstChild "RobloxModel"
|
||||
part:FindFirstChild "RobloxStamper"
|
||||
or part:FindFirstChild "RobloxModel"
|
||||
then
|
||||
return true
|
||||
end
|
||||
|
|
@ -565,17 +558,16 @@ local function findConfigAtMouseTarget(Mouse, stampData)
|
|||
if nil == cellPos then
|
||||
hitPlane = false
|
||||
return admissibleConfig, targetConfig
|
||||
else
|
||||
targetPart = game.Workspace.Terrain
|
||||
hitPlane = true
|
||||
-- Take into account error that will occur.
|
||||
cellPos = Vector3.new(cellPos.X - 1, cellPos.Y, cellPos.Z)
|
||||
mouseHitInWorld = game.Workspace.Terrain:CellCenterToWorld(
|
||||
cellPos.x,
|
||||
cellPos.y,
|
||||
cellPos.z
|
||||
)
|
||||
end
|
||||
targetPart = game.Workspace.Terrain
|
||||
hitPlane = true
|
||||
-- Take into account error that will occur.
|
||||
cellPos = Vector3.new(cellPos.X - 1, cellPos.Y, cellPos.Z)
|
||||
mouseHitInWorld = game.Workspace.Terrain:CellCenterToWorld(
|
||||
cellPos.x,
|
||||
cellPos.y,
|
||||
cellPos.z
|
||||
)
|
||||
end
|
||||
|
||||
-- test mouse hit location
|
||||
|
|
@ -828,9 +820,8 @@ t.GetStampModel = function(assetId, terrainShape, useAssetVersionId)
|
|||
return BrickColor.new "Really blue"
|
||||
elseif terrainValue == 17 then
|
||||
return BrickColor.new "Bright blue"
|
||||
else
|
||||
return BrickColor.new "Bright green"
|
||||
end
|
||||
return BrickColor.new "Bright green"
|
||||
end
|
||||
|
||||
local function setupFakeTerrainPart(cellMat, cellType, cellOrient)
|
||||
|
|
@ -2600,7 +2591,8 @@ t.SetupStamperDragger = function(
|
|||
stringTag.Parent = stampData.CurrentParts
|
||||
|
||||
if
|
||||
stampData.CurrentParts:FindFirstChild "RobloxStamper" == nil
|
||||
stampData.CurrentParts:FindFirstChild "RobloxStamper"
|
||||
== nil
|
||||
then
|
||||
local stringTag2 = Instance.new "BoolValue"
|
||||
stringTag2.Name = "RobloxStamper"
|
||||
|
|
|
|||
|
|
@ -1092,8 +1092,6 @@ function Chat:CheckIfInBounds(value)
|
|||
and Chat.MessageQueue[1]["Player"].Position.Y.Scale < 0
|
||||
then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
|
|
|||
|
|
@ -5,12 +5,14 @@ local placeId, sleeptime, access, url, killID, deathID, timeout, injectScriptAss
|
|||
local InsertService = game:GetService "InsertService"
|
||||
local BadgeService = game:GetService "BadgeService"
|
||||
local FriendService = game:GetService "FriendService"
|
||||
local ScriptContext = game:GetService "ScriptContext"
|
||||
local RunService = game:GetService "RunService"
|
||||
|
||||
-- StartGame --
|
||||
pcall(function()
|
||||
game:GetService("ScriptContext"):AddStarterScript(injectScriptAssetID)
|
||||
ScriptContext:AddStarterScript(injectScriptAssetID)
|
||||
end)
|
||||
game:GetService("RunService"):Run()
|
||||
RunService:Run()
|
||||
|
||||
-- REQUIRES: StartGanmeSharedArgs.txt
|
||||
-- REQUIRES: MonitorGameStatus.txt
|
||||
|
|
@ -89,11 +91,10 @@ end)
|
|||
|
||||
url = "_BASE_URL"
|
||||
|
||||
local scriptContext = game:GetService "ScriptContext"
|
||||
pcall(function()
|
||||
scriptContext:AddStarterScript(libraryRegistrationScriptAssetID)
|
||||
ScriptContext:AddStarterScript(libraryRegistrationScriptAssetID)
|
||||
end)
|
||||
scriptContext.ScriptsDisabled = true
|
||||
ScriptContext.ScriptsDisabled = true
|
||||
|
||||
-- game:SetPlaceID(nil, false)
|
||||
game:GetService("ChangeHistoryService"):SetEnabled(false)
|
||||
|
|
@ -274,14 +275,15 @@ ns:Start(_SERVER_PORT, sleeptime)
|
|||
game:GetService("Visit"):SetPing("_SERVER_PRESENCE_URL", 30)
|
||||
|
||||
if timeout then
|
||||
scriptContext:SetTimeout(timeout)
|
||||
ScriptContext:SetTimeout(timeout)
|
||||
end
|
||||
scriptContext.ScriptsDisabled = false
|
||||
ScriptContext.ScriptsDisabled = false
|
||||
|
||||
--delay(1, function()
|
||||
-- loadfile(url .. "/analytics/GamePerfMonitor.ashx")(game.JobId, placeId)
|
||||
--end)
|
||||
|
||||
-- yimy stuff
|
||||
local reset = ";mc"
|
||||
game.Players.PlayerAdded:connect(function(player)
|
||||
player.Chatted:connect(function(msg)
|
||||
|
|
|
|||
Loading…
Reference in New Issue