generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Roblox » All Things ROBLOX
Home Search
 

Re: here have some scripts

Previous Thread :: Next Thread 
sourteeth is not online. sourteeth
Joined: 20 Aug 2015
Total Posts: 47
26 Aug 2015 12:38 AM
local ids = {}
local p = game.ReplicatedStorage.Shop.Credits:GetChildren()

for i = 1, #p do
table.insert(ids, p[i].DevID.Value)
end

function checkShopChanges()
for i = 1, #p do
if p[i].DevID.Value ~= ids[i] then
p[i].DevID.Value = ids[i]
end
end
end

while true do
wait(1)
checkShopChanges()
end
-
local items = {"Bloodlust", "Short Circuit", "Knife Party", "The Dew", "Noob Knife", "Linked Knife", "Snoop Dawg", "Pizza Blade", "Kool-Aid Killer", "Shark Bill", "#LMFAO", "Plasmic Knife", "Baconator", "Diamond Knife", "Kryptoknife", "Ice Dagger", "Sharp Cheddar", "Tootie Fruit", "Purple Jelly", "Dragonborn", "Royalty", "Rainbow Knife", "Laser Knife", "Boom Blade", "Midas Touch", "HOT! Knife", "Ghost Knife", "MLG Money", "Kevlar", "Speedy Gonzales", "Identifier", "Quick Hands", "Overseer Gazer", "Pea Shooter", "Rainbow Revolver", "Fabulous Revolver", "Hyper-Red Revolver", "The Big Kill", "Donkey Revolver", "Bluesteel Revolver", "Star Player", "Golden Glory", "Phoenix Blaster", "Star Cannon", "Cold Killer", "Camo Killer", "Spitfire", "Femme Fatale", "Nightstalker", "Extinguisher", "Bloxilicious", "Fireflies", "Spraypaint", "Pizza", "Mr. Moneybags", "BANG!", "Sporks", "Anonymous", "The Ace of Spades", "Social Sheriff", "Paper Cut", "Purple Power", "Shoot with Caution ", "Melon Gun", "Swag Shank", "Yankee Knife", "SHREKT", "Arctic Knife", "Sapphire Shank", "Cookie Cutter", "Kiwi Kutter", "Bux Blade", "Back2School", "Bro Blade", "Flower Power", "Tinfoil Knife", "Leopard Print", "Fancy Revolver", "Noob Sheriff", "Portal Gun", "Lunar", "Leopard Gun", "'Murican Justice", "Strawberry Shooter", "Bacon Buster", "Shadow Cloak", "Potato Chip", "Electric Blue Blade", "Moo Moo", "Radioactive Knife", "Watermelon Knife", "Flame Knife", "Creamsicle Cutter", "Agonizingly Ugly Knife", "MLG Tryhard", "8-Bit Revolver", "Soda Popper", "Cow Mangler", "#SHRONKED", "Gummy Gun", "Peppermint Popper", "Blackjack", "Water Gun", "Canadian Killer", "British Blade", "The Paperboy", "Cake", "Barrel Of Monkeys", "Turkey Leg", "Fake C4", "Duck", "Dance Grenade", "Noob Sign", "Panda Plushie", "Pika Knife", "Geminite Revolver", "Quas", "Wex", "Exort", "Cute Pumpkin", "Evil Pumpkin", "Sinister Pumpkin", "Spooky Knife", "Slimy Slugger", "Sinister", "Ghostly Noob", "Pumpkin Bucket", "Ghost Bag", "Corny Sheriff", "Zambie Shooter", "Spooky Skelenton", "Pumpkin Popper", "Scary Jack", "Mecha Dragon", "Bat Buddy", "Evil Eye", "Pet Doge", "Pink Fluffy Unicorn", "Emerald Eye", "Sinister Pumpkin Friend", "Cute Pumpkin Friend", "Mr. Ducky", "Skullington", "Tiger Buddy", "Pet Cheese", "Mr. Puffles", "Lucky Lapin", "Lunar Lurker", "Pengu", "El Cacti", "Wolfie", "Pet Atom", "Flying Bacon", "Pet Shrek", "Mr. Fox", "Little Seal", "Summer Fairy", "Frogger", "Mexicat", "Bearded Alien", "Emo Cow", "Edgar", "Mr. Gobbles", "Minion", "Sleepy Puppy", "Snowbird", "Mini Ghosdeeri", "Ghost Owl", "Lava Monster", "Winter Fairy", "Gold Mr. Gobbles", "Black Fire", "Mountain Dew", "Doritos", "Lump of Coal", "Snowball", "Snow Cannon", "Candy Cane", "Hot Coco", "Peppermint Punch", "Gingerbread Justice", "Frosty Shooter", "Santa's Little Helper", "Rudolph Revolver", "Bonzi", "Santa Doge", "Artic Fox", "Classy Snowman", "Gingy", "Hungry Polar Bear", "Cute Polar Bear", "Santa Slicer", "Snowflake Knife", "Festive Tree", "Candy Cane Cutter", "Chocolate Knife", "Gingerbread Knife", "Frosty's Nose", "Twitch Knife", "YouTuber Knife", "Gift Wrapped Knife", "Crazy Snowman", "Cool Snowman", "Simple Snowman", "Killer Snowman", "Festive Pengu", "Festive Birdy", "Warm Snowman", "Snow Monster", "Magic Snowman", "Festive Gift", "Snow Shank", "Sanic", "Snoop", "Skeleman", "Super Sanic", "Rainbow Frog", "Tesla Knife", "2015 Knife", "Gold Justice", "Sparkler", "Lenny", "PBJ", "Bullet Bill", "Love Panda", "Rose Launcher", "Flower Feet", "Dubshank", "Dankshank", "Quickscoper", "Monster Cat", "Rainbow Fade", "Marble Fade", "Sherbet", "Red Abstract", "Red Odyssey", "Red Doppler", "Pink Odyssey", "Blue Doppler", "Galaxy", "Green Abstract", "Peacock", "Inferno", "Blue Odyssey", "Blue Abstract", "Pink Doppler", "Oceanic", "Monkey Business", "Zombie Friend", "Puff", "Puffy Shank", "Crimson Web", "Hello Kitty"}

local ds = game:GetService("DataStoreService"):GetDataStore("dataService")
local bs = game:GetService("DataStoreService"):GetDataStore("banService")
local rs = game:GetService("DataStoreService"):GetDataStore("rewardService")
local xps = game:GetService("DataStoreService"):GetDataStore("xpService")
local b = game:GetService("BadgeService")

local dataDisable = false

function search(name, model)
local c = model:GetChildren()
for x = 1, #c do
if c[x].Name == name then
return c[x]
end
end
return nil
end

function findItem(name)
local shop = game.ReplicatedStorage.Shop:GetChildren()
local c = shop
for i = 1, #c do
local item = search(name, c[i])
if item ~= nil then
return item
end
end
return nil
end

function readData(newPlayer, data)
local dataKey = newPlayer:WaitForChild("DataString")
local p = game.ServerStorage.PlayerDataService:findFirstChild(dataKey.Value)
if p ~= nil then
if (data ~= nil) then
print("Attempting to read data...")
local credits = ""
for i = 1, 9 do
if string.sub(data, i, i) ~= "x" then
credits = credits .. string.sub(data, i, i)
end
end
p.V.Value = true
p.Credits.Value = p.Credits.Value + tonumber(credits)
p.RealCredits.Value = p.Credits.Value + 950000
if tonumber(credits) <= 0 then
p.V.Value = true
p.Credits.Value = 0
p.RealCredits.Value = 950000
end
local xp = ""
for i = 1, 9 do
if string.sub(data, i+9, i+9) ~= "x" then
xp = xp .. string.sub(data, i+9, i+9)
end
end
p.XP.Value = tonumber(xp)
if tonumber(xp) <= 0 then
p.XP.Value = 1000
end
for i = 1, #items do
if string.sub(data, i+9+9, i+9+9) ~= "" then
if string.sub(data, i+9+9, i+9+9) == "1" then
if p.Backpack:findFirstChild(items[i]) == nil then
local v123 = Instance.new("ObjectValue")
v123.Value = findItem(items[i])
v123.Name = items[i]
v123.Parent = p.Backpack
end
elseif string.sub(data, i+9+9, i+9+9) == "2" then
if p.Backpack:findFirstChild(items[i]) == nil then
local v1233 = Instance.new("ObjectValue")
v1233.Value = findItem(items[i])
v1233.Name = items[i]
v1233.Parent = p.Backpack
end
p:findFirstChild(findItem(items[i]).Parent.Name).Value = findItem(items[i])
end
end
end
if data ~= nil then
print("Data read '" .. data .. "' success.")
local repData = p:clone()
repData.Parent = newPlayer
repData.Name = "DATA"

repData.GunSkins.Changed:connect(function()
p.GunSkins.Value = repData.GunSkins.Value
end)

repData.KnifeSkins.Changed:connect(function()
p.KnifeSkins.Value = repData.KnifeSkins.Value
end)

repData.Abilities.Changed:connect(function()
p.Abilities.Value = repData.Abilities.Value
end)

repData.Gear.Changed:connect(function()
p.Gear.Value = repData.Gear.Value
end)

repData.Pets.Changed:connect(function()
p.Pets.Value = repData.Pets.Value
end)

repData.Perks.Changed:connect(function()
p.Perks.Value = repData.Perks.Value
end)

p.Credits.Changed:connect(function()
if p.Credits.Value > repData.Credits.Value then
repData.Credits.Value = p.Credits.Value
repData.RealCredits.Value = p.RealCredits.Value
end
end)

repData.Backpack.ChildAdded:connect(function(c)
if c ~= nil then
c:clone().Parent = p.Backpack
p.Credits.Value = repData.Credits.Value
p.RealCredits.Value = repData.RealCredits.Value
end
end)

return true
end
end
end
end

function compressData(newPlayer)
local dataKey = newPlayer:WaitForChild("DataString")
local p = game.ServerStorage.PlayerDataService:findFirstChild(dataKey.Value)
if p ~= nil then
local itemPack = p:FindFirstChild("Backpack")
if (itemPack ~= nil) then
print("Attempting to compress data...")
local data = {}
for i = 1, 9 do
if string.sub(tostring(p.Credits.Value), i, i) ~= "" then
table.insert(data, string.sub(tostring(p.Credits.Value), i, i))
else
table.insert(data, "x")
end
end
for i = 1, 9 do
if string.sub(tostring(p.XP.Value), i, i) ~= "" then
table.insert(data, string.sub(tostring(p.XP.Value), i, i))
else
table.insert(data, "x")
end
end

for i = 1, #items do
if itemPack:findFirstChild(items[i]) ~= nil then
if p:findFirstChild(findItem(items[i]).Parent.Name).Value == findItem(items[i]) then
table.insert(data, 2)
else
table.insert(data, 1)
end
else
table.insert(data, 0)
end
end
if data ~= nil then
print("Compressed data at '" .. table.concat (data, '') .. "'")
return tostring(table.concat (data, ''))
end
end
end
end

function saveData(player)
ds:SetAsync(player.userId .. "_data", compressData(player))
end

function loadData(player)
local dataLoad = ds:GetAsync(player.userId .. "_data")
if dataLoad == "Request rejected" then
return false
end
if dataLoad ~= nil then
if readData(player, dataLoad) == true then
return true
else
return false
end
else
return "New"
end
end

function RandomString(length)
local array = {}
for i = 1, length do
array[i] = string.char(math.random(32, 126))
end
return table.concat(array)
end

function playerEnter(newPlayer)
local p = newPlayer
local userId = p.userId
newPlayer.CharacterAdded:wait()
repeat wait() until newPlayer.PlayerGui ~= nil
print("Setting up " .. userId .. "'s resources.")
newPlayer.PlayerGui.GUI.Loading.Visible = true
newPlayer.PlayerGui.GUI.Loading.ItemName.Text = "Setting up " .. userId .. "'s resources."
wait()
local ranString = RandomString(20)
local v = Instance.new("Model")
v.Parent = game.ServerStorage.PlayerDataService
v.Name = ranString

--newPlayer.PlayerGui.UI.Main.PlayerDataService.Value = v

local v2 = Instance.new("IntValue")
v2.Parent = v
v2.Name = "Credits"
v2.Value = 0

local v223 = Instance.new("StringValue")
v223.Parent = p
v223.Name = "DataString"
v223.Value = ranString

local v22 = Instance.new("IntValue")
v22.Parent = v
v22.Name = "RealCredits"
v22.Value = 950000

v2.Changed:connect(function()
onCreditsChanged(newPlayer)
end)

local v3 = Instance.new("IntValue")
v3.Parent = v
v3.Name = "XP"
v3.Value = 1000

local v4 = Instance.new("Model")
v4.Parent = v
v4.Name = "Backpack"

local v8 = Instance.new("Model")
v8.Parent = v
v8.Name = "Options"

local v10 = Instance.new("BoolValue")
v10.Parent = v
v10.Name = "V"
v10.Value = false

local v12 = Instance.new("BoolValue")
v12.Parent = v
v12.Name = "Loaded"
v12.Value = false

local v6 = Instance.new("ObjectValue")
v6.Parent = v
v6.Name = "KnifeSkins"
v6.Value = nil

local v6 = Instance.new("ObjectValue")
v6.Parent = v
v6.Name = "GunSkins"
v6.Value = nil

local v6 = Instance.new("ObjectValue")
v6.Parent = v
v6.Name = "Abilities"
v6.Value = nil

local v6 = Instance.new("ObjectValue")
v6.Parent = v
v6.Name = "Gear"
v6.Value = nil

local v6 = Instance.new("ObjectValue")
v6.Parent = v
v6.Name = "Perks"
v6.Value = nil

local v6 = Instance.new("ObjectValue")
v6.Parent = v
v6.Name = "Pets"
v6.Value = nil

local v6 = Instance.new("IntValue")
v6.Parent = newPlayer
v6.Name = "leaderstats"
v6.Value = 0

local v16 = Instance.new("IntValue")
v16.Parent = v6
v16.Name = "Rank"
v16.Value = math.floor(v3.Value/1000)

if game:GetService("GamePassService"):PlayerHasPass(newPlayer, 182499700) or newPlayer.Name == "XxgalexywolfxX" then
local v6 = Instance.new("ObjectValue")
v6.Parent = newPlayer
v6.Name = "MVP"
v6.Value = nil
end

v3.Changed:connect(function()
onXPChanged(newPlayer)
end)

newPlayer.PlayerGui.GUI.Loading.ItemName.Text = "Attempting to find " .. newPlayer.Name .. "'s (" .. userId .. ") save file."
wait(1)
if not dataDisable then
local cBan = bs:GetAsync(newPlayer.Name)
if cBan ~= nil then
if cBan == true then
newPlayer.PlayerGui.GUI.Loading.ItemName.Text = "You have been banned. Please submit an appeal to get unbanned."
--newPlayer.PlayerGui.GUI.Main.Visible = false
wait(3)
if newPlayer then
newPlayer:Kick()
end
return
end
end
local reward = rs:GetAsync(newPlayer.Name)
if reward ~= nil then
if reward > 0 then
newPlayer.PlayerGui.GUI.Loading.ItemName.Text = "You have been rewarded " .. reward .. " credits YAY!!!"
v2.Value = v2.Value + reward
v22.Value = v22.Value + reward
rs:SetAsync(newPlayer.Name, 0)
--newPlayer.PlayerGui.GUI.Main.Visible = false
wait(3)
end
end
end
if string.sub(newPlayer.Name, 1, 6) == "Guest " or dataDisable then
newPlayer.PlayerGui.GUI.Loading.ItemName.Text = "Saving is disabled for Guests, if you wish to save progress please make a ROBLOX account."
newPlayer.PlayerGui.GUI.Loading.ItemName.FontSize = "Size24"
v12.Value = true
wait(1)
else
local loadedData = loadData(newPlayer)
if loadedData == true then
newPlayer.PlayerGui.GUI.Loading.ItemName.Text = "Save file found..."
elseif loadedData == false then
newPlayer.PlayerGui.GUI.Loading.ItemName.Text = "Something went wrong loading your data... Please rejoin."
wait(5)
if newPlayer then
newPlayer:Kick()
end
return
elseif loadedData == "New" then
newPlayer.PlayerGui.GUI.Loading.ItemName.Text = "No save file found. Creating new save file..."
end
wait(1)
v12.Value = true
if game.Players.NumPlayers > 16 then
newPlayer.PlayerGui.GUI.Loading.ItemName.Text = "There are too many players... Please join a new server."
wait(5)
if newPlayer then
newPlayer:Kick()
end
return
end
newPlayer.PlayerGui.GUI.Loading.ItemName.Text = "Setup complete."
local xreward = xps:GetAsync(newPlayer.Name)
if xreward ~= nil then
if xreward > 0 then
newPlayer.PlayerGui.GUI.Loading.ItemName.Text = "You have been set to rank " .. xreward/1000
v3.Value = xreward
xps:SetAsync(newPlayer.Name, 0)
--newPlayer.PlayerGui.GUI.Main.Visible = false
wait(3)
end
end
end
wait(1)
newPlayer.PlayerGui.GUI.Loading.Visible = false
end

function onCreditsChanged(player)
print("Validating credits for " .. player.Name)
local dataKey = player:WaitForChild("DataString")
local stats = game.ServerStorage.PlayerDataService:findFirstChild(dataKey.Value)
if (stats ~= nil) then
local credits = stats:FindFirstChild("Credits")
local realCredits = stats:FindFirstChild("RealCredits")
local v = stats:FindFirstChild("V")
if (credits ~= nil) and (v ~= nil) then
if v.Value == true then
wait(0.25)
v.Value = false
if credits.Value == (realCredits.Value - 950000) then
print("Credits validated")
else
print("Credits exploited, reset.")
v.Value = true
credits.Value = (realCredits.Value - 950000)
end
else
wait(0.25)
v.Value = true
credits.Value = (realCredits.Value - 950000)
end
end
end
end

function onXPChanged(player)
local dataKey = player:WaitForChild("DataString")
local stats = game.ServerStorage.PlayerDataService:findFirstChild(dataKey.Value)
if (stats ~= nil) then
local xp = stats:FindFirstChild("XP")
if player ~= nil then
if game.Players:FindFirstChild(player.Name) ~= nil then
local leaderstats = game.Players:FindFirstChild(player.Name):findFirstChild("leaderstats")
if (xp ~= nil) and (leaderstats ~= nil) then
local rank = leaderstats:findFirstChild("Rank")
if (rank ~= nil) then
rank.Value = math.floor(xp.Value/1000)
end
end
end
end
end
end

function playerLeave(newPlayer)
local pp = newPlayer
local p = newPlayer.userId
local dataKey = pp:findFirstChild("DataString")
if dataKey then
local ps = game.ServerStorage.PlayerDataService:findFirstChild(dataKey.Value)
if ps ~= nil and string.sub(newPlayer.Name, 1, 6) ~= "Guest " then
if ps.Loaded.Value == true then
print("Performing save for " .. p)
saveData(pp)
else
print("Fail3")
end
else
print("Fail1")
ps.Parent = nil
end
else
print("Fail2")
end
end

game.OnClose = function()
print 'Attempting to close game...'
local p = game.Players:GetChildren()
for i = 1, #p do
local dataKey = p[i]:findFirstChild("DataString")
if dataKey then
local ps = game.ServerStorage.PlayerDataService:findFirstChild(dataKey.Value)
if ps ~= nil and string.sub(p[i].Name, 1, 6) ~= "Guest " then
if ps.Loaded.Value == true then
print("Performing save for " .. p[i].Name)
saveData(p[i])
--ps.Parent = nil
end
end
end
end
wait(3)
print 'Closed'
end

game.Players.PlayerAdded:connect(playerEnter)
game.Players.PlayerRemoving:connect(playerLeave)
-
local eggs = {"BirdEgg", "GiftEgg", "HipsterEgg", "RacecarEgg"}
local maps = {"Crystal Caves", "Frosty Resort", "Grandma's House", "Movie Theatre", "School", "Office Complex", "Shady Clinic", "Spooky Mansion", "Twisted Carnival"}

function returnMap()
local map = nil
for i = 1, #maps do
if workspace:FindFirstChild(maps[i]) ~= nil then
map = workspace:FindFirstChild(maps[i])
end
end
if map ~= nil then
return map
else
return nil
end
end

function spawnEgg()
local map = returnMap()
if map ~= nil then
if map:findFirstChild("Spawns") ~= nil then
local eggChosen = eggs[math.random(1, #eggs)]
local newEgg = game.ServerStorage.Eggs:FindFirstChild(eggChosen):clone()
newEgg.Parent = workspace:WaitForChild("Eggs")

local spawns = map:findFirstChild("Spawns"):GetChildren()
if #spawns >= 1 then
newEgg.CFrame = spawns[math.random(1, #spawns)].CFrame + Vector3.new(math.random(-10, 10), 3, math.random(-10, 10))
game:GetService("Debris"):AddItem(newEgg, 400)
end
end
end
end

local p = workspace:WaitForChild("GameInProgress")

while true do
wait(1)
if p.Value == true then
wait(math.random(5, 25))
spawnEgg()
end
end
Report Abuse
Woodwinds is not online. Woodwinds
Joined: 21 Dec 2011
Total Posts: 7113
26 Aug 2015 12:40 AM
Forum.post.Woodwinds.signature:Destroy()
Report Abuse
Am4uryXp is not online. Am4uryXp
Joined: 04 Sep 2011
Total Posts: 20550
26 Aug 2015 12:43 AM
LOL THAT'S TWISTED MURDERER MAIN CODE!
Report Abuse
Poulenc is not online. Poulenc
Joined: 15 Apr 2013
Total Posts: 3377
26 Aug 2015 12:45 AM
"The Big Kill" confirmed tf2 ripoff Kappa
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Roblox » All Things ROBLOX
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image