Main Search
Delta Corp Forum Index
 
 
FAQ Members Groups Profile Private Messages

Important Notice: We regret to inform you that our free phpBB forum hosting service will be discontinued by the end of June 30, 2024. If you wish to migrate to our paid hosting service, please contact [email protected].
[SCRIPT} Save/Load Script

 
Post new topic   Reply to topic    Delta Corp Forum Index -> Releases
View previous topic :: View next topic  
Author Message
eyeontheprize
Newbie


Joined: 25 May 2008
Posts: 3
Location: Anywhere but nowhere

PostPosted: Sat Jun 14, 2008 11:10 pm    Post subject: [SCRIPT} Save/Load Script Reply with quote

Saves entire systems!
Code:

random = 17

function onChatted(msg, recipient, speaker)
local source = string.lower(speaker.Name)
msg = string.lower(msg)
if string.sub(msg, 1, 5) == "save/" then
local stats = speaker:findFirstChild("leaderstats")
if stats ~= nil then
c = stats:GetChildren()
values = { }
for i = 1, #c do
if c[i].className == "IntValue" then
table.insert(values, c[i].Value * random)
end
end
local code = table.concat(values, "/")
local m = Instance.new("Message")
m.Text = "Your code: "..code.."/"
m.Parent = speaker
wait(10)
m:remove()
end
end
if string.sub(msg, 1, 5) == "load/" then
local string = string.sub(msg, 6, #msg)
local stats = speaker:findFirstChild("leaderstats")
if stats ~= nil then
c = stats:GetChildren()
for i =1, #c do
if c[i].className == "IntValue" then
a = string.find(string, "/")
if a ~= nil then
print(a)
local value =  tonumber(string.sub(string, 1, a -1))
value = value / random
if value == math.ceil(value) and value == math.floor(value) then
print(value)
c[i].Value = value
string = string.sub(string, a +1, #string)
local m = Instance.new("Message")
m.Text = "Your code has been loaded"
m.Parent = speaker
wait(3)
m:remove()
else
local m = Instance.new("Message")
m.Text = "NO CHEATING"
m.Parent = speaker
wait(3)
m:remove()
end
end
end
end
end
end
end

function onPlayerEntered(newPlayer)
newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)
end    

game.Players.ChildAdded:connect(onPlayerEntered)
[/code]
_________________
The following statement is false
The previous statement is true
I like the cake inside of the prize
Back to top
View user's profile Send private message
LastNote678
Master Poster


Joined: 20 May 2008
Posts: 205
Location: In your head, eating your subconscious.

PostPosted: Mon Jun 16, 2008 10:37 pm    Post subject: Reply with quote

The script breaks every time it reaches ".
_________________
Am I leaving, Am I going. Am I speeding, am I slowing. Just, out of space for now.

Reminder: We're all under the same sky.
Back to top
View user's profile Send private message
Anaminus
Beginner Poster


Joined: 08 Feb 2008
Posts: 17
Location: Location: Location: Location: Location: Location:

PostPosted: Tue Jun 17, 2008 8:07 am    Post subject: Reply with quote

Press Ctrl+H

Find what: "

Replace with: "


?-Anaminus-?
_________________
?-Anaminus-?

^^You're probably seeing this twice because I typed in my signature >_<
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Delta Corp Forum Index -> Releases All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Back to Top              
Jenova Template © digital-delusion.com
Powered by phpBB © 2001, 2002 phpBB Group



For Support - http://forums.BizHat.com

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!