RBXLegacy-src/Health2010.rbxm

164 lines
4.8 KiB
Plaintext

<roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
<External>null</External>
<External>nil</External>
<Item class="Script" referent="RBX0">
<Properties>
<bool name="Disabled">false</bool>
<Content name="LinkedSource"><null></null></Content>
<string name="Name">GUI_Copy</string>
<ProtectedString name="Source">script.HealthGUI:clone().Parent = game.StarterGui;
script:remove();</ProtectedString>
<bool name="archivable">true</bool>
</Properties>
<Item class="ScreenGui" referent="RBX1">
<Properties>
<string name="Name">HealthGUI</string>
<bool name="archivable">true</bool>
</Properties>
<Item class="Frame" referent="RBX2">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294901760</Color3>
<float name="BackgroundTransparency">0</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<string name="Name">Background</string>
<UDim2 name="Position">
<XS>1</XS>
<XO>-50</XO>
<YS>0.5</YS>
<YO>-75</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>8</XO>
<YS>0</YS>
<YO>150</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
<Item class="Frame" referent="RBX3">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4278255360</Color3>
<float name="BackgroundTransparency">0</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<string name="Name">HealthBar</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>8</XO>
<YS>0</YS>
<YO>150</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
<Item class="Script" referent="RBX4">
<Properties>
<bool name="Disabled">false</bool>
<Content name="LinkedSource"><null></null></Content>
<string name="Name">Script</string>
<ProtectedString name="Source">h = script.Parent.Parent.Parent.Parent.Parent.Character.Humanoid
h.Changed:connect(function()
script.Parent.Size = UDim2.new(0,8,0,(h.Health*1.5))
script.Parent.Position = UDim2.new(0,0,0,((100-h.Health)*1.5))
end)
</ProtectedString>
<bool name="archivable">true</bool>
</Properties>
</Item>
<Item class="LocalScript" referent="RBX5">
<Properties>
<bool name="Disabled">false</bool>
<Content name="LinkedSource"><null></null></Content>
<string name="Name">Resize</string>
<ProtectedString name="Source">local tray = script.Parent.tray
local screen = script.Parent
function makeYRelative()
tray.SizeConstraint = 2
end
function makeXRelative()
tray.SizeConstraint = 1
end
if screen.AbsoluteSize.x &gt; screen.AbsoluteSize.y then
makeYRelative()
else
makeXRelative()
end
function recenter()
tray.Position = UDim2.new(0,screen.AbsoluteSize.X/2 - tray.AbsoluteSize.X/2,tray.Position.Y.Scale,tray.Position.Y.Offset)
end
recenter()
screen.Changed:connect(function(property)
if property == &quot;AbsoluteSize&quot; then
if screen.AbsoluteSize.x &gt; screen.AbsoluteSize.y then
makeYRelative()
else
makeXRelative()
end
recenter()
end
end)
</ProtectedString>
<bool name="archivable">true</bool>
</Properties>
</Item>
</Item>
<Item class="TextLabel" referent="RBX6">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4279069106</Color3>
<float name="BackgroundTransparency">0</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<string name="Name">Label</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>3</XO>
<YS>1</YS>
<YO>10</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<string name="Text">Health</string>
<Color3 name="TextColor3">4278190335</Color3>
<float name="TextTransparency">0</float>
<bool name="TextWrap">false</bool>
<token name="TextXAlignment">2</token>
<token name="TextYAlignment">1</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
</Item>
</Item>
</Item>
</Item>
</roblox>