Galaxy S|C|R|I|P|T

Post new topic   Reply to topic

View previous topic View next topic Go down

Galaxy S|C|R|I|P|T

Post  Jaxcar on Sun Jan 25, 2009 8:29 pm

You see, i think that there arent enough galaxys, so i came up with this S|C|R|I|P|T* [WARNING 100+ Lines of LUA Twisted Evil ]
Code:
print(“createGalaxy()“)

_G.starSize = {4, 4, 5, 5, 5, 5, 6, 6, 7}
_G.GalaxyCenter = Vector3.new(0, 257, 0)
_G.StarColors = {"Bright yellow", "Bright orange", "Bright red", "Medium blue"}
_G.PlanetN = 0

allowStarPainting = FALSE

galaxyArmsQuantity = 7
galaxyArms = {}

galaxyArms_AngleGrow = 10
galaxyArms_RadiusGrow = 16
galaxyArms_DefaultRadius = 50
galaxyArms_GrowingTimes = 10
galaxyArms_RandomizationFactor = 130
galaxyArms_Density = 8
galaxyArms_Inclination = 2

lostStars = {}

lostStars_Quantity = 80
lostStars_minXvalue = -252
lostStars_maxXvalue = 252
lostStars_minYvalue = 7.9
lostStars_maxYvalue = 507
lostStars_minZvalue = -252
lostStars_maxZvalue = 252

misc = {}

misc_Proportion = 1

celestialBodies = {}

local base = Instance.new("Part")
base.Shape = "Ball"
base.Anchored = true

celestialBodies_GalaxyCenter = Vector3.new(-134, 49.4, -71)
celestialBodies_DefaultStar = base

for x=1, galaxyArmsQuantity do
galaxyArms[#galaxyArms + 1] = ( 360 / ( galaxyArmsQuantity ) ) * x
print(galaxyArms[#galaxyArms])
end

function createLostSystem()
local mainStar = celestialBodies_DefaultStar:clone()
local x = math.random(lostStars_minXvalue, lostStars_maxXvalue) * misc_Proportion
local y = math.random(lostStars_minYvalue, lostStars_maxYvalue) * misc_Proportion
local z = math.random(lostStars_minZvalue, lostStars_maxZvalue) * misc_Proportion
local starSizeFactor = starSize[math.random(1, #starSize)] * misc_Proportion

mainStar.Position = Vector3.new(x, y, z)
mainStar.Size = Vector3.new(starSizeFactor, starSizeFactor, starSizeFactor)
mainStar.Parent = game.Workspace

local starNumber = #celestialBodies + 1
celestialBodies[starNumber] = {}
celestialBodies[starNumber][1] = mainStar
end

function createSystem(radius, angle)
local mainStar = celestialBodies_DefaultStar:clone()
local x = math.sin(math.rad(angle)) * radius * misc_Proportion
local y = ( (math.sin(math.rad(angle)) * radius) / ( 10 / galaxyArms_Inclination ) ) * misc_Proportion
local z = math.cos(math.rad(angle)) * radius * misc_Proportion
local starSizeFactor = starSize[math.random(1, #starSize)] * misc_Proportion

mainStar.Position = Vector3.new(x, y, z) + GalaxyCenter + ( Vector3.new(math.random(-galaxyArms_RandomizationFactor, galaxyArms_RandomizationFactor) / 10, math.random(-galaxyArms_RandomizationFactor, galaxyArms_RandomizationFactor) / 10, math.random(-galaxyArms_RandomizationFactor, galaxyArms_RandomizationFactor) / 10) ) * misc_Proportion
mainStar.Size = Vector3.new(starSizeFactor, starSizeFactor, starSizeFactor)
mainStar.Parent = game.Workspace
a
if allowStarPainting == true then mainStar.BrickColor = BrickColor.new(StarColors[math.random(1, #StarColors)]) else mainStar.BrickColor = BrickColor.new("White") end

local starNumber = #celestialBodies + 1
celestialBodies[starNumber] = {}
celestialBodies[starNumber][1] = mainStar

local planetNumber = math.random(0, starSizeFactor)
if planetNumber == 0 then return end
for x=1, planetNumber do
local planetNumber = x + 1
celestialBodies[starNumber][planetNumber] = {}
end
end

function createGalaxy()
for i=1, galaxyArms_Density do
for a=1, #galaxyArms do
for b=1, galaxyArms_GrowingTimes do
createSystem(galaxyArms_DefaultRadius + ( ( galaxyArms_RadiusGrow - 1 ) * b ), galaxyArms[a] + ( galaxyArms_AngleGrow * b ) )
end
end
end
for x=1, lostStars_Quantity do
createLostSystem()
end
print(#celestialBodies)
end
a

createGalaxy()

Sleep Hunh?! Yea, lots of LUA!

P.S: Ravenshield, why does it keep putting "[No Cussing] [Content Deleted]" in on perfectly legit' words like S|C|R|I|P|T? Mad


P.P.S: If it dosent work plz tell me what is wrong!


Last edited by Jaxcar on Sun Jan 25, 2009 8:31 pm; edited 1 time in total (Reason for editing : Left Something Off)

_________________

"It's called leaving your PC on all day and night without logging off." - Simples *chirk*

Jaxcar
Newbie

Number of posts: 3
Age: 12
Location: Everywhere (Even in your socks!)
Registration date: 2009-01-24

View user profile

Back to top Go down

Re: Galaxy S|C|R|I|P|T

Post  Hardkirby on Sun Jan 25, 2009 10:55 pm

Nice!

_________________
Sorry, this signature has been removed. Please call 613 - 000 - 0000 for assistance. Thank you.

Hardkirby
Familiar

Number of posts: 84
Age: 11
Location: ...I'm not in an underground base plotting world domination...
Registration date: 2008-10-31

View user profile

Back to top Go down

Re: Galaxy S|C|R|I|P|T

Post  Ravenshield on Wed Jan 28, 2009 6:09 pm

I don't know why it keeps blocking words. I have removed the words that it blocked +_+

_________________
-Ravenshield
Creator of RoTech

Ravenshield
First Administrator
First Administrator

Number of posts: 205
Age: 14
Location: Between nowhere and everywhere
Registration date: 2008-08-10

View user profile http://rotech.forumotion.net

Back to top Go down

RE: Galaxy [No Cussing] [Content Deleted]

Post  Jaxcar on Tue Feb 17, 2009 6:49 pm

Thanks, i think the bord blocker was faulty, i mean scince when is [No Cussing] [Content Deleted] a bad word? Razz

Jaxcar
Newbie

Number of posts: 3
Age: 12
Location: Everywhere (Even in your socks!)
Registration date: 2009-01-24

View user profile

Back to top Go down

Re: Galaxy S|C|R|I|P|T

Post  Rubix47 on Wed Apr 08, 2009 5:22 pm

-sarcasticly- I think that you should keep using the word SCR|PT because it works so well.

Rubix47
Newbie

Number of posts: 25
Age: 14
Registration date: 2009-04-06

View user profile

Back to top Go down

Re: Galaxy S|C|R|I|P|T

Post  Ravenshield on Sat Apr 11, 2009 4:58 pm

Ok. I found out why it blocked. It had a word that started on s and ended at t with a wildcats inside, which blocked out ALL words starting on S and ending on T. Razz

_________________
-Ravenshield
Creator of RoTech

Ravenshield
First Administrator
First Administrator

Number of posts: 205
Age: 14
Location: Between nowhere and everywhere
Registration date: 2008-08-10

View user profile http://rotech.forumotion.net

Back to top Go down

Re: Galaxy S|C|R|I|P|T

Post  Rubix47 on Mon Apr 13, 2009 10:20 pm

So we can say script now?

Rubix47
Newbie

Number of posts: 25
Age: 14
Registration date: 2009-04-06

View user profile

Back to top Go down

Re: Galaxy S|C|R|I|P|T

Post  Rubix47 on Mon Apr 13, 2009 10:21 pm

Cool, it works!

Rubix47
Newbie

Number of posts: 25
Age: 14
Registration date: 2009-04-06

View user profile

Back to top Go down

View previous topic View next topic Back to top


Permissions of this forum:
You cannot reply to topics in this forum