126 lines
3.2 KiB
Plaintext
126 lines
3.2 KiB
Plaintext
import "macros" as { $ }
|
|
$load $FILE
|
|
|
|
controlFrame = script.Parent\FindFirstChild "ControlFrame"
|
|
|
|
return if not controlFrame
|
|
|
|
-- Heliodex's basic New function (basically a simplified version of melt)
|
|
New = (className, name, props) ->
|
|
if not props? -- no name was provided
|
|
props = name
|
|
name = nil
|
|
|
|
obj = Instance.new className
|
|
obj.Name = name if name
|
|
local parent
|
|
|
|
for k, v in pairs props
|
|
if type(k) == "string" then
|
|
if k == "Parent"
|
|
parent = v
|
|
else
|
|
obj[k] = v
|
|
|
|
elseif type(k) == "number" and type(v) == "userdata"
|
|
v.Parent = obj
|
|
|
|
obj.Parent = parent
|
|
obj
|
|
--
|
|
|
|
bottomLeftControl = controlFrame\FindFirstChild "BottomLeftControl"
|
|
bottomRightControl = controlFrame\FindFirstChild "BottomRightControl"
|
|
|
|
frameTip = New "TextLabel", "ToolTip"
|
|
Text: ""
|
|
Font: Enum.Font.ArialBold
|
|
FontSize: Enum.FontSize.Size12
|
|
TextColor3: Color3.new 1, 1, 1
|
|
BorderSizePixel: 0
|
|
ZIndex: 10
|
|
Size: UDim2.new 2, 0, 1, 0
|
|
Position: UDim2.new 1, 0, 0, 0
|
|
BackgroundColor3: Color3.new 0, 0, 0
|
|
BackgroundTransparency: 1
|
|
TextTransparency: 1
|
|
TextWrap: true
|
|
|
|
* New "BoolValue", "inside"
|
|
Value: false
|
|
|
|
setUpListeners = (frameToListen) ->
|
|
fadeSpeed = 0.1
|
|
frameToListen.Parent.MouseEnter\connect ->
|
|
if frameToListen\FindFirstChild "inside"
|
|
frameToListen.inside.Value = true
|
|
wait 1.2
|
|
if frameToListen.inside.Value
|
|
while frameToListen.inside.Value and frameToListen.BackgroundTransparency > 0
|
|
frameToListen.BackgroundTransparency -= fadeSpeed
|
|
frameToListen.TextTransparency -= fadeSpeed
|
|
wait!
|
|
|
|
killTip = (killFrame) ->
|
|
killFrame.inside.Value = false
|
|
killFrame.BackgroundTransparency = 1
|
|
killFrame.TextTransparency = 1
|
|
|
|
frameToListen.Parent.MouseLeave\connect ->
|
|
killTip frameToListen
|
|
|
|
frameToListen.Parent.MouseButton1Click\connect ->
|
|
killTip frameToListen
|
|
|
|
createSettingsButtonTip = (parent) ->
|
|
if not parent?
|
|
parent = bottomLeftControl\FindFirstChild "SettingsButton"
|
|
|
|
|
|
with toolTip = frameTip\clone!
|
|
.RobloxLocked = true
|
|
.Text = "Settings/Leave Game"
|
|
.Position = UDim2.new 0, 0, 0, -18
|
|
.Size = UDim2.new 0, 120, 0, 20
|
|
.Parent = parent
|
|
setUpListeners toolTip
|
|
|
|
wait 5 -- make sure we are loaded in, won't need tool tips for first 5 seconds anyway
|
|
|
|
---------------- set up Bottom Left Tool Tips -------------------------
|
|
|
|
bottomLeftChildren = bottomLeftControl\GetChildren!
|
|
|
|
for i = 1, #bottomLeftChildren
|
|
if bottomLeftChildren[i].Name == "Exit"
|
|
|
|
with exitTip = frameTip\clone!
|
|
.RobloxLocked = true
|
|
.Text = "Leave Place"
|
|
.Position = UDim2.new 0, 0, -1, 0
|
|
.Size = UDim2.new 1, 0, 1, 0
|
|
.Parent = bottomLeftChildren[i]
|
|
setUpListeners exitTip
|
|
|
|
elseif bottomLeftChildren[i].Name == "SettingsButton"
|
|
createSettingsButtonTip bottomLeftChildren[i]
|
|
|
|
---------------- set up Bottom Right Tool Tips -------------------------
|
|
|
|
bottomRightChildren = bottomRightControl\GetChildren!
|
|
|
|
for i = 1, #bottomRightChildren
|
|
if bottomRightChildren[i].Name\find"Camera"?
|
|
with cameraTip = frameTip\clone!
|
|
.RobloxLocked = true
|
|
.Text = "Camera View"
|
|
|
|
.Position = if bottomRightChildren[i].Name\find "Zoom"
|
|
UDim2.new -1, 0, -1.5
|
|
else
|
|
UDim2.new 0, 0, -1.5, 0
|
|
|
|
.Size = UDim2.new 2, 0, 1.25, 0
|
|
.Parent = bottomRightChildren[i]
|
|
setUpListeners cameraTip
|