This commit is contained in:
Bitl 2017-06-01 08:02:19 -07:00
parent 1fbe844148
commit fb92e3f8b9
12 changed files with 440 additions and 639 deletions

View File

@ -209,6 +209,8 @@ function CSServer(Port)
game:GetService("RunService"):Run();
if (rbxlegacyversion == "delta-gamma") then
game.Workspace:InsertContent("rbxasset://Fonts//Health2010.rbxm");
elseif (rbxlegacyversion == "delta") then
game.Workspace:InsertContent("rbxasset://Fonts//Health2011.rbxm");
end
pcall(function() game.Close:connect(function() NetworkServer:Stop(); end) end);
NetworkServer.IncommingConnection:connect(IncommingConnection);
@ -447,6 +449,8 @@ function CSSolo(UserID,PlayerName,Hat1ID,Hat2ID,Hat3ID,HeadColorID,TorsoColorID,
game:GetService("RunService"):run();
if (rbxlegacyversion == "gamma" or rbxlegacyversion == "delta-gamma") then
game.Workspace:InsertContent("rbxasset://Fonts//Health2010.rbxm");
elseif (rbxlegacyversion == "delta") then
game.Workspace:InsertContent("rbxasset://Fonts//Health2011.rbxm");
end
plr.Name = PlayerName;
plr:LoadCharacter();

View File

@ -10,7 +10,7 @@
script:remove();</ProtectedString>
<bool name="archivable">true</bool>
</Properties>
<Item class="ScreenGui" referent="RBX1">
<Item class="GuiMain" referent="RBX1">
<Properties>
<string name="Name">HealthGUI</string>
<bool name="archivable">true</bool>
@ -18,22 +18,22 @@ script:remove();</ProtectedString>
<Item class="Frame" referent="RBX2">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294901760</Color3>
<float name="BackgroundTransparency">0</float>
<Color3 name="BackgroundColor3">4285215356</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<string name="Name">Background</string>
<int name="BorderSizePixel">1</int>
<string name="Name">Tray</string>
<UDim2 name="Position">
<XS>1</XS>
<XO>-50</XO>
<YS>0.5</YS>
<YO>-75</YO>
<XS>0.949999988</XS>
<XO>0</XO>
<YS>0.380000025</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>8</XO>
<YS>0</YS>
<YO>150</YO>
<XS>0.0450000018</XS>
<XO>0</XO>
<YS>0.340000004</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
@ -43,26 +43,26 @@ script:remove();</ProtectedString>
<Item class="Frame" referent="RBX3">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4278255360</Color3>
<Color3 name="BackgroundColor3">4286892054</Color3>
<float name="BackgroundTransparency">0</float>
<Color3 name="BorderColor3">4279970357</Color3>
<Color3 name="BorderColor3">4278190080</Color3>
<int name="BorderSizePixel">0</int>
<string name="Name">HealthBar</string>
<UDim2 name="Position">
<XS>0</XS>
<XS>0.420000017</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>
<XS>0.159999996</XS>
<XO>0</XO>
<YS>0.800000012</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<int name="ZIndex">2</int>
<bool name="archivable">true</bool>
</Properties>
<Item class="Script" referent="RBX4">
@ -73,86 +73,62 @@ script:remove();</ProtectedString>
<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))
script.Parent.Size = UDim2.new(0.2, 0, 0.8 * (h.Health / h.MaxHealth), 0)
script.Parent.Position = UDim2.new(0.4, 0, 0.8 * (1- (h.Health / h.MaxHealth)) , 0)
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">
<Item class="Frame" referent="RBX5">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4279069106</Color3>
<Color3 name="BackgroundColor3">4289733411</Color3>
<float name="BackgroundTransparency">0</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<string name="Name">Label</string>
<Color3 name="BorderColor3">4278190080</Color3>
<int name="BorderSizePixel">0</int>
<string name="Name">HealthBarBacking</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>3</XO>
<YS>1</YS>
<YO>10</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XS>0.419999987</XS>
<XO>0</XO>
<YS>0</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0.159999996</XS>
<XO>0</XO>
<YS>0.800000012</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 class="ImageLabel" referent="RBX6">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294967295</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<Content name="Image"><url>rbxasset://textures/health.png</url></Content>
<string name="Name">ImageLabel</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0.800000012</YS>
<YO>3</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>0</XO>
<YS>0.25</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">1</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>

338
Health2011.rbxm Normal file
View File

@ -0,0 +1,338 @@
<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="GuiMain" referent="RBX1">
<Properties>
<string name="Name">HealthGUI</string>
<bool name="archivable">true</bool>
</Properties>
<Item class="ImageLabel" referent="RBX2">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4290164919</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<Content name="Image"><url>rbxasset://textures/healthgui/HurtOverlay.png</url></Content>
<string name="Name">hurtOverlay</string>
<UDim2 name="Position">
<XS>2</XS>
<XO>0</XO>
<YS>0</YS>
<YO>-22</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>0</XO>
<YS>1.1500001</YS>
<YO>30</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
</Item>
<Item class="Frame" referent="RBX3">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4285215356</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<string name="Name">tray</string>
<UDim2 name="Position">
<XS>0.5</XS>
<XO>-44</XO>
<YS>1</YS>
<YO>-26</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>170</XO>
<YS>0</YS>
<YO>18</YO>
</UDim2>
<token name="SizeConstraint">2</token>
<token name="Style">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
<Item class="ImageLabel" referent="RBX4">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294967295</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<Content name="Image"><url>rbxasset://textures/healthgui/bkg.png</url></Content>
<string name="Name">bkg</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>0</XO>
<YS>1</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
</Item>
<Item class="ImageLabel" referent="RBX5">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294967295</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<Content name="Image"><url>rbxasset://textures/healthgui/BarRed.png</url></Content>
<string name="Name">barRed</string>
<UDim2 name="Position">
<XS>0.0189999994</XS>
<XO>0</XO>
<YS>0.100000001</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
</Item>
<Item class="Frame" referent="RBX6">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294967295</Color3>
<float name="BackgroundTransparency">1.00000012</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<string name="Name">bar2</string>
<UDim2 name="Position">
<XS>0.0189999994</XS>
<XO>0</XO>
<YS>0.100000001</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0.192000002</XS>
<XO>0</XO>
<YS>0.829999983</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
<Item class="Script" referent="RBX7">
<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
tray = script.Parent
local lastHealth = 100
local lastHealth2 = 100
local maxWidth = 0.96
function UpdateGUI(health)
local width = (health / h.MaxHealth) * maxWidth
local height = 0.83
local lastX = tray.bar.Position.X.Scale
local x = 0.019 + (maxWidth - width)
local y = 0.1
tray.bar.Position = UDim2.new(x,0,y, 0)
tray.bar.Size = UDim2.new(width, 0, height, 0)
-- If more than 1/4 health, bar = green. Else, bar = red.
if( (health / h.MaxHealth) &gt; 0.25 ) then
tray.barRed.Size = UDim2.new(0, 0, 0, 0)
else
tray.barRed.Position = tray.bar.Position
tray.barRed.Size = tray.bar.Size
tray.bar.Size = UDim2.new(0, 0, 0, 0)
end
if ( (lastHealth - health) &gt; (h.MaxHealth / 10) ) then
lastHealth = health
if h.Health ~= h.MaxHealth then
delay(0,function()
AnimateHurtOverlay()
end)
delay(0,function()
AnimateBars(x, y, lastX, height)
end)
end
else
lastHealth = health
end
end
function HealthChanged(health)
end
function AnimateBars(x, y, lastX, height)
local width = math.abs(x - lastX)
if( x &gt; lastX ) then
x = lastX
end
tray.bar2.Position = UDim2.new(x,0, y, 0)
tray.bar2.Size = UDim2.new(width, 0, height, 0)
tray.bar2.BackgroundTransparency = 0
local GBchannels = 1
local j = 0.2
local i_total = 30
for i=1,i_total do
-- Increment Values
if (GBchannels &lt; 0.2) then
j = -j
end
GBchannels = GBchannels + j
if (i &gt; (i_total - 10)) then
tray.bar2.BackgroundTransparency = tray.bar2.BackgroundTransparency + 0.1
end
tray.bar2.BackgroundColor3 = Color3.new(1, GBchannels, GBchannels)
wait(0.02)
end
end
function AnimateHurtOverlay()
-- Start:
-- overlay.Position = UDim2.new(0, 0, 0, -22)
-- overlay.Size = UDim2.new(1, 0, 1.15, 30)
-- Finish:
-- overlay.Position = UDim2.new(-2, 0, -2, -22)
-- overlay.Size = UDim2.new(4.5, 0, 4.65, 30)
overlay = HealthGUI_prototype.hurtOverlay
overlay.Position = UDim2.new(-2, 0, -2, -22)
overlay.Size = UDim2.new(4.5, 0, 4.65, 30)
-- Animate In, fast
local i_total = 2
local wiggle_total = 0
local wiggle_i = 0.02
for i=1,i_total do
overlay.Position = UDim2.new( (-2 + (2 * (i/i_total)) + wiggle_total/2), 0, (-2 + (2 * (i/i_total)) + wiggle_total/2), -22 )
overlay.Size = UDim2.new( (4.5 - (3.5 * (i/i_total)) + wiggle_total), 0, (4.65 - (3.5 * (i/i_total)) + wiggle_total), 30 )
wait(0.01)
end
i_total = 30
wait(0.03)
-- Animate Out, slow
for i=1,i_total do
if( math.abs(wiggle_total) &gt; (wiggle_i * 3) ) then
wiggle_i = -wiggle_i
end
wiggle_total = wiggle_total + wiggle_i
overlay.Position = UDim2.new( (0 - (2 * (i/i_total)) + wiggle_total/2), 0, (0 - (2 * (i/i_total)) + wiggle_total/2), -22 )
overlay.Size = UDim2.new( (1 + (3.5 * (i/i_total)) + wiggle_total), 0, (1.15 + (3.5 * (i/i_total)) + wiggle_total), 30 )
wait(0.01)
end
-- Hide after we&apos;re done
overlay.Position = UDim2.new(10, 0, 0, 0)
end
h.Changed:connect(function()
UpdateGUI(health)
if ( (lastHealth2 - health) &gt; (humanoid.MaxHealth / 10) ) then
lastHealth2 = health
else
lastHealth2 = health
end end)
</ProtectedString>
<bool name="archivable">true</bool>
</Properties>
</Item>
</Item>
<Item class="ImageLabel" referent="RBX8">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294967295</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<Content name="Image"><url>rbxasset://textures/healthgui/Bar.png</url></Content>
<string name="Name">bar</string>
<UDim2 name="Position">
<XS>0.0189999994</XS>
<XO>0</XO>
<YS>0.100000001</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0.959999979</XS>
<XO>0</XO>
<YS>0.829999983</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
</Item>
<Item class="ImageLabel" referent="RBX9">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294967295</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<Content name="Image"><url>rbxasset://textures/healthgui/label.png</url></Content>
<string name="Name">label</string>
<UDim2 name="Position">
<XS>0.680000007</XS>
<XO>0</XO>
<YS>0.300000012</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0.25</XS>
<XO>0</XO>
<YS>0.349999994</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
</Item>
</Item>
</Item>
</Item>
</roblox>

View File

@ -746,6 +746,7 @@ namespace RBXLegacyLauncher
this.richTextBox1.TabIndex = 2;
this.richTextBox1.Text = "";
this.richTextBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.richTextBox1_KeyDown);
this.richTextBox1.AllowDrop = false;
//
// tabPage8
//

View File

@ -878,6 +878,10 @@ namespace RBXLegacyLauncher
{
StartServerNo3D();
}
else if (command.Equals("rbxlegacy no3d"))
{
StartServerNo3D();
}
else if (command.Equals("rbxlegacy client"))
{
StartClient();
@ -886,6 +890,10 @@ namespace RBXLegacyLauncher
{
StartSolo();
}
else if (command.Equals("rbxlegacy solo"))
{
StartSolo();
}
else if (command.Equals("rbxlegacy studio"))
{
StartStudio();
@ -904,15 +912,23 @@ namespace RBXLegacyLauncher
}
else if (command.Equals("rbxlegacy help"))
{
ConsoleRBXLegacyHelp(false);
ConsoleRBXLegacyHelp(0);
}
else if (command.Equals("rbxlegacy"))
{
ConsoleRBXLegacyHelp(false);
ConsoleRBXLegacyHelp(0);
}
else if (command.Equals("rbxlegacy config"))
{
ConsoleRBXLegacyHelp(true);
ConsoleRBXLegacyHelp(1);
}
else if (command.Equals("config"))
{
ConsoleRBXLegacyHelp(1);
}
else if (command.Equals("help"))
{
ConsoleRBXLegacyHelp(0);
}
else
{
@ -921,29 +937,29 @@ namespace RBXLegacyLauncher
}
void ConsoleRBXLegacyHelp(bool config)
void ConsoleRBXLegacyHelp(int page)
{
if (config == true)
if (page == 1)
{
ConsolePrint("rbxlegacy config", 1);
ConsolePrint("rbxlegacy config", 2);
ConsolePrint("-------------------------", 1);
ConsolePrint("= save | Saves the config file", 1);
ConsolePrint("= load | Reloads the config file", 1);
ConsolePrint("= reset | Resets the config file", 1, false);
ConsolePrint("= save | Saves the config file", 3);
ConsolePrint("= load | Reloads the config file", 3);
ConsolePrint("= reset | Resets the config file", 3, false);
}
else
{
ConsolePrint("rbxlegacy", 1);
ConsolePrint("rbxlegacy", 2);
ConsolePrint("---------", 1);
ConsolePrint("= client | Loads client with launcher settings", 1);
ConsolePrint("-- solo | Loads client in Play Solo mode with launcher settings", 1);
ConsolePrint("= server | Loads server with launcher settings", 1);
ConsolePrint("-- no3d | Loads server in NoGraphics mode with launcher settings", 1);
ConsolePrint("= studio | Loads Roblox Studio with launcher settings", 1);
ConsolePrint("= config", 1);
ConsolePrint("-- save | Saves the config file", 1);
ConsolePrint("-- load | Reloads the config file", 1);
ConsolePrint("-- reset | Resets the config file", 1, false);
ConsolePrint("= client | Loads client with launcher settings", 3);
ConsolePrint("-- solo | Loads client in Play Solo mode with launcher settings", 4);
ConsolePrint("= server | Loads server with launcher settings", 3);
ConsolePrint("-- no3d | Loads server in NoGraphics mode with launcher settings", 4);
ConsolePrint("= studio | Loads Roblox Studio with launcher settings", 3);
ConsolePrint("= config", 3);
ConsolePrint("-- save | Saves the config file", 4);
ConsolePrint("-- load | Reloads the config file", 4);
ConsolePrint("-- reset | Resets the config file", 4, false);
}
}
}

View File

@ -1,146 +0,0 @@
<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">HealthScript v3.1</string>
<ProtectedString name="Source">local HealthGUI_prototype = script:FindFirstChild(&quot;HealthGUI&quot;)
local lastHealth = 100
local lastHealth2 = 100
local maxWidth = 0.96
local humanoid = script.Parent.Humanoid
if (humanoid == nil) then
print(&quot;ERROR: no humanoid found in &apos;HealthScript v3.1&apos;&quot;)
end
function CreateGUI()
local p = game.Players:GetPlayerFromCharacter(humanoid.Parent)
HealthGUI_prototype.Parent = p.PlayerGui
end
function UpdateGUI(health)
tray = HealthGUI_prototype.tray
local width = (health / humanoid.MaxHealth) * maxWidth
local height = 0.83
local lastX = tray.bar.Position.X.Scale
local x = 0.019 + (maxWidth - width)
local y = 0.1
tray.bar.Position = UDim2.new(x,0,y, 0)
tray.bar.Size = UDim2.new(width, 0, height, 0)
-- If more than 1/4 health, bar = green. Else, bar = red.
if( (health / humanoid.MaxHealth) &gt; 0.25 ) then
tray.barRed.Size = UDim2.new(0, 0, 0, 0)
else
tray.barRed.Position = tray.bar.Position
tray.barRed.Size = tray.bar.Size
tray.bar.Size = UDim2.new(0, 0, 0, 0)
end
if ( (lastHealth - health) &gt; (humanoid.MaxHealth / 10) ) then
lastHealth = health
if humanoid.Health ~= humanoid.MaxHealth then
delay(0,function()
AnimateHurtOverlay()
end)
delay(0,function()
AnimateBars(x, y, lastX, height)
end)
end
else
lastHealth = health
end
end
function HealthChanged(health)
UpdateGUI(health)
if ( (lastHealth2 - health) &gt; (humanoid.MaxHealth / 10) ) then
lastHealth2 = health
else
lastHealth2 = health
end
end
function AnimateBars(x, y, lastX, height)
tray = HealthGUI_prototype.tray
local width = math.abs(x - lastX)
if( x &gt; lastX ) then
x = lastX
end
tray.bar2.Position = UDim2.new(x,0, y, 0)
tray.bar2.Size = UDim2.new(width, 0, height, 0)
tray.bar2.BackgroundTransparency = 0
local GBchannels = 1
local j = 0.2
local i_total = 30
for i=1,i_total do
-- Increment Values
if (GBchannels &lt; 0.2) then
j = -j
end
GBchannels = GBchannels + j
if (i &gt; (i_total - 10)) then
tray.bar2.BackgroundTransparency = tray.bar2.BackgroundTransparency + 0.1
end
tray.bar2.BackgroundColor3 = Color3.new(1, GBchannels, GBchannels)
wait(0.02)
end
end
function AnimateHurtOverlay()
-- Start:
-- overlay.Position = UDim2.new(0, 0, 0, -22)
-- overlay.Size = UDim2.new(1, 0, 1.15, 30)
-- Finish:
-- overlay.Position = UDim2.new(-2, 0, -2, -22)
-- overlay.Size = UDim2.new(4.5, 0, 4.65, 30)
overlay = HealthGUI_prototype.hurtOverlay
overlay.Position = UDim2.new(-2, 0, -2, -22)
overlay.Size = UDim2.new(4.5, 0, 4.65, 30)
-- Animate In, fast
local i_total = 2
local wiggle_total = 0
local wiggle_i = 0.02
for i=1,i_total do
overlay.Position = UDim2.new( (-2 + (2 * (i/i_total)) + wiggle_total/2), 0, (-2 + (2 * (i/i_total)) + wiggle_total/2), -22 )
overlay.Size = UDim2.new( (4.5 - (3.5 * (i/i_total)) + wiggle_total), 0, (4.65 - (3.5 * (i/i_total)) + wiggle_total), 30 )
wait(0.01)
end
i_total = 30
wait(0.03)
-- Animate Out, slow
for i=1,i_total do
if( math.abs(wiggle_total) &gt; (wiggle_i * 3) ) then
wiggle_i = -wiggle_i
end
wiggle_total = wiggle_total + wiggle_i
overlay.Position = UDim2.new( (0 - (2 * (i/i_total)) + wiggle_total/2), 0, (0 - (2 * (i/i_total)) + wiggle_total/2), -22 )
overlay.Size = UDim2.new( (1 + (3.5 * (i/i_total)) + wiggle_total), 0, (1.15 + (3.5 * (i/i_total)) + wiggle_total), 30 )
wait(0.01)
end
-- Hide after we&apos;re done
overlay.Position = UDim2.new(10, 0, 0, 0)
end
CreateGUI()
humanoid.HealthChanged:connect(HealthChanged)
humanoid.Died:connect(function() HealthChanged(0) end)</ProtectedString>
<bool name="archivable">true</bool>
</Properties>
</Item>
</roblox>

View File

@ -1,388 +0,0 @@
<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="ImageLabel" referent="RBX0">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294967295</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<Content name="Image"><url>http://www.roblox.com/asset/?id=35238036</url></Content>
<string name="Name">barRed</string>
<UDim2 name="Position">
<XS>0.0189999994</XS>
<XO>0</XO>
<YS>0.100000001</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
</Item>
<Item class="Frame" referent="RBX1">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4285215356</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<string name="Name">tray</string>
<UDim2 name="Position">
<XS>0.5</XS>
<XO>-44</XO>
<YS>1</YS>
<YO>-26</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>170</XO>
<YS>0</YS>
<YO>18</YO>
</UDim2>
<token name="SizeConstraint">2</token>
<token name="Style">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
<Item class="ImageLabel" referent="RBX2">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294967295</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<Content name="Image"><url>http://www.roblox.com/asset/?id=35238000</url></Content>
<string name="Name">bkg</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>0</XO>
<YS>1</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
</Item>
<Item class="ImageLabel" referent="RBX0">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294967295</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<Content name="Image"><url>http://www.roblox.com/asset/?id=35238036</url></Content>
<string name="Name">barRed</string>
<UDim2 name="Position">
<XS>0.0189999994</XS>
<XO>0</XO>
<YS>0.100000001</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
</Item>
<Item class="Frame" referent="RBX3">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294967295</Color3>
<float name="BackgroundTransparency">1.00000012</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<string name="Name">bar2</string>
<UDim2 name="Position">
<XS>0.0189999994</XS>
<XO>0</XO>
<YS>0.100000001</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0.192000002</XS>
<XO>0</XO>
<YS>0.829999983</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
</Item>
<Item class="ImageLabel" referent="RBX4">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294967295</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<Content name="Image"><url>http://www.roblox.com/asset/?id=35238053</url></Content>
<string name="Name">bar</string>
<UDim2 name="Position">
<XS>0.0189999994</XS>
<XO>0</XO>
<YS>0.100000001</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0.959999979</XS>
<XO>0</XO>
<YS>0.829999983</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
</Item>
<Item class="ImageLabel" referent="RBX5">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294967295</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<Content name="Image"><url>http://www.roblox.com/asset/?id=34816363</url></Content>
<string name="Name">label</string>
<UDim2 name="Position">
<XS>0.680000007</XS>
<XO>0</XO>
<YS>0.300000012</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0.25</XS>
<XO>0</XO>
<YS>0.349999994</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
</Item>
</Item>
<Item class="GuiMain" referent="RBX6">
<Properties>
<string name="Name">HealthGUI</string>
<bool name="archivable">true</bool>
</Properties>
<Item class="ImageLabel" referent="RBX7">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4290164919</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<Content name="Image"><url>http://www.roblox.com/asset/?id=34854607</url></Content>
<string name="Name">hurtOverlay</string>
<UDim2 name="Position">
<XS>2</XS>
<XO>0</XO>
<YS>0</YS>
<YO>-22</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>0</XO>
<YS>1.1500001</YS>
<YO>30</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
</Item>
<Item class="Frame" referent="RBX1">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4285215356</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<string name="Name">tray</string>
<UDim2 name="Position">
<XS>0.5</XS>
<XO>-44</XO>
<YS>1</YS>
<YO>-26</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>170</XO>
<YS>0</YS>
<YO>18</YO>
</UDim2>
<token name="SizeConstraint">2</token>
<token name="Style">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
<Item class="ImageLabel" referent="RBX2">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294967295</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<Content name="Image"><url>http://www.roblox.com/asset/?id=35238000</url></Content>
<string name="Name">bkg</string>
<UDim2 name="Position">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>1</XS>
<XO>0</XO>
<YS>1</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
</Item>
<Item class="ImageLabel" referent="RBX0">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294967295</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<Content name="Image"><url>http://www.roblox.com/asset/?id=35238036</url></Content>
<string name="Name">barRed</string>
<UDim2 name="Position">
<XS>0.0189999994</XS>
<XO>0</XO>
<YS>0.100000001</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0</XS>
<XO>0</XO>
<YS>0</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
</Item>
<Item class="Frame" referent="RBX3">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294967295</Color3>
<float name="BackgroundTransparency">1.00000012</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<string name="Name">bar2</string>
<UDim2 name="Position">
<XS>0.0189999994</XS>
<XO>0</XO>
<YS>0.100000001</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0.192000002</XS>
<XO>0</XO>
<YS>0.829999983</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<token name="Style">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
</Item>
<Item class="ImageLabel" referent="RBX4">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294967295</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">1</int>
<Content name="Image"><url>http://www.roblox.com/asset/?id=35238053</url></Content>
<string name="Name">bar</string>
<UDim2 name="Position">
<XS>0.0189999994</XS>
<XO>0</XO>
<YS>0.100000001</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0.959999979</XS>
<XO>0</XO>
<YS>0.829999983</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
</Item>
<Item class="ImageLabel" referent="RBX5">
<Properties>
<bool name="Active">false</bool>
<Color3 name="BackgroundColor3">4294967295</Color3>
<float name="BackgroundTransparency">1</float>
<Color3 name="BorderColor3">4279970357</Color3>
<int name="BorderSizePixel">0</int>
<Content name="Image"><url>http://www.roblox.com/asset/?id=34816363</url></Content>
<string name="Name">label</string>
<UDim2 name="Position">
<XS>0.680000007</XS>
<XO>0</XO>
<YS>0.300000012</YS>
<YO>0</YO>
</UDim2>
<UDim2 name="Size">
<XS>0.25</XS>
<XO>0</XO>
<YS>0.349999994</YS>
<YO>0</YO>
</UDim2>
<token name="SizeConstraint">0</token>
<bool name="Visible">true</bool>
<int name="ZIndex">1</int>
<bool name="archivable">true</bool>
</Properties>
</Item>
</Item>
</Item>
</roblox>

View File

Before

Width:  |  Height:  |  Size: 952 B

After

Width:  |  Height:  |  Size: 952 B

View File

Before

Width:  |  Height:  |  Size: 956 B

After

Width:  |  Height:  |  Size: 956 B

View File

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 104 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 988 B

After

Width:  |  Height:  |  Size: 988 B