Scripts for a game.
#1
Can someone please assist me with an upcoming game of mine by contributing a few scripts? Contributors don't need to do all of them but will be given credit for ones they do.


[?]= Maybe/less important
[s]= applicable to weapons (more specifically a sword)

Scripts I will need:

Time regen [?] -Qwertygiy
Poison/Health draining script [s]
Slow script [s]
Healing script -Qwertygiy


Scripting help I need:

The buildism Lua equivalent to 'if true do' if there is one
How change transparency via script (Box.Trasnparency? GetChild?)

Thank you those who will/have contributed.

Shiggity Shiggity Shwa
[Image: Animated.gif?t=1314294800]
Reply
#2
(08-04-2011, 08:03 PM)Sazaho Wrote: Trampoline Script [?]

Can't that be done with Bounciness?
[Image: poptartFINALTINY.gif]
[Image: log.png?t=1302647037]
Reply
#3
(08-04-2011, 08:06 PM)Login Wrote:
(08-04-2011, 08:03 PM)Sazaho Wrote: Trampoline Script [?]

Can't that be done with Bounciness?

Yes but I'm a moron.
Shiggity Shiggity Shwa
[Image: Animated.gif?t=1314294800]
Reply
#4
Time regen:

[lua]
local object = script.Parent --PUT THE SCRIPT IN THE REGENERATING THING
local parental = object.Parent
local keepsafe = object:clone()
local waittime = 60 --Seconds between regens

--Beginning of code
sleep(waittime)
script.Parent = game.World
object:remove()
local safekeep = keepsafe:clone()
safekeep.Parent = game.World
script:remove()
--End of code.
[/lua]

Why is there no loop? Because it reclones the regeneration script each time it regens!
Reply
#5
(08-04-2011, 09:05 PM)Qwertygiy Wrote: Time regen:

[lua]
local object = script.Parent --PUT THE SCRIPT IN THE REGENERATING THING
local parental = object.Parent
local keepsafe = object:clone()
local waittime = 60 --Seconds between regens

--Beginning of code
sleep(waittime)
script.Parent = game.World
object:remove()
local safekeep = keepsafe:clone()
safekeep.Parent = game.World
script:remove()
--End of code.
[/lua]

Why is there no loop? Because it reclones the regeneration script each time it regens!

Thank you, QwertyGiy.
Shiggity Shiggity Shwa
[Image: Animated.gif?t=1314294800]
Reply
#6
Here's a global healing script for you -- change the waittime and percentage values as wanted and place it in World.

[lua]
local waittime = 2 --How long between heals
local percentage = 2.5 --How much to heal

while true do --Constant!
sleep(waittime)
local players = game.Players:getChildren()
for q = 1, #players do
if players[q]:isA("Player") and players[q].Character and players[q].Character.Health > 0 then
--Making sure you're there
if players[q].Character.Health < players[q].Character.MaximumHealth then
if players[q].Character.Health <= (players[q].Character.MaximumHealth - (players[q].Character.MaximumHealth * percentage * 1/100)) then
players[q].Character.Health = players[q].Character.Health + (players[q].Character.MaximumHealth * percentage * 1/100)
else
players[q].Character.Health = players[q].Character.MaximumHealth
end end end end end
[/lua]
Reply
#7
(08-04-2011, 09:39 PM)Qwertygiy Wrote: Here's a global healing script for you -- change the waittime and percentage values as wanted and place it in World.

[lua]
local waittime = 2 --How long between heals
local percentage = 2.5 --How much to heal

while true do --Constant!
sleep(waittime)
local players = game.Players:getChildren()
for q = 1, #players do
if players[q]:isA("Player") and players[q].Character and players[q].Character.Health > 0 then
--Making sure you're there
if players[q].Character.Health < players[q].Character.MaximumHealth then
if players[q].Character.Health <= (players[q].Character.MaximumHealth - (players[q].Character.MaximumHealth * percentage * 1/100)) then
players[q].Character.Health = players[q].Character.Health + (players[q].Character.MaximumHealth * percentage * 1/100)
else
players[q].Character.Health = players[q].Character.MaximumHealth
end end end end end
[/lua]

Thanks again, Qwertygiy
Shiggity Shiggity Shwa
[Image: Animated.gif?t=1314294800]
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)