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 » Game Creation and Development » Scripters
Home Search
 

Re: Can anyone fix this? (Large fix; willing to pay a lot)

Previous Thread :: Next Thread 
MRMCC7 is not online. MRMCC7
Joined: 24 Oct 2013
Total Posts: 3395
01 May 2015 10:57 AM
Anyways, I'm trying to re-vamp the inventory system from Survival Apoc (2010) and the scripts kinda broke a few months ago. I was wondering if anyone can do some tweaking and fix it to be in working condition? I'm willing to pay 5,000 ROBUX.

I uncopy locked the place for anyone who wants to try: http://www.roblox.com/games/188697990/Testing
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
01 May 2015 10:58 AM
So you can make tons of Robux off of other people scripting.

K.
Report Abuse
MRMCC7 is not online. MRMCC7
Joined: 24 Oct 2013
Total Posts: 3395
01 May 2015 11:00 AM
The ROBUX is kinda irrelevant to me. The game is going to be on a personal server so I won't be making money, its just something I could be able to play with my friends and pass the time.
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
01 May 2015 11:02 AM
Well, most of us are lazy people who can't be bothered to go open an instance of ROBLOX Studio and see the scripts. Post them here.

(I would open it, but I'm stuck on Chromebook.) :/
Report Abuse
MRMCC7 is not online. MRMCC7
Joined: 24 Oct 2013
Total Posts: 3395
01 May 2015 11:05 AM
Uhhh, there's a lot of it; you sure?
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
01 May 2015 11:06 AM
Show me the chunk that errors.
Report Abuse
MRMCC7 is not online. MRMCC7
Joined: 24 Oct 2013
Total Posts: 3395
01 May 2015 11:07 AM
Craft tool:

ZSP = script.Parent.Parent.Parent.Name
wait(1)

local tool = script.Parent
local frame = tool.Frame
local label = frame.Label
local list = frame.List
local createTool = frame.CreateTool
local createItem = frame.CreateItem
local processItem = frame.Process
local clear = frame.Clear

local ingTable = {}

function getDist(a, b)
return (a - b).magnitude
end

function checkIngTable(part)
for index, child in pairs(ingTable) do
if part == child then
return true
end
end

return false
end

function ing(index)
local ing = ingTable[index]

if ing ~= nil then
return ing.Name
else
return ""
end
end

function ingReal(index)
local ing = ingTable[index]

if ing ~= nil then
return ing
end
end

function saveIng(index)
local ing = ingReal(index)

if ing ~= nil then
table.remove(ingTable, index)
end
end

function setListName()
for index, child in pairs(ingTable) do
if index == 1 then
list.Text = child.Name
else
list.Text = list.Text..", "..child.Name
end
end
end

function alert(text)
delay(0, function()
for num = 1, 20 do
label.Text = text
wait()
end
end)
end

function clearTable()
ingTable = {}
list.Text = ""
end

function deleteTable()
for index, child in pairs(ingTable) do
child:remove()
end

clearTable()
end

function choices(choiceTab)
local buttons = tool.Parent.Parent.PlayerGui.ScreenGui:GetChildren()

for index, child in pairs(buttons) do
if child.Name == "ChoiceButton" then
child:remove()
end
end

local clicked = nil
local buttonText = ""
local buttonTab = {}

for index, child in pairs(choiceTab) do
local button = Instance.new("TextButton")
button.Position = UDim2.new(0.5, 0, index * 0.05 - 0.05)
button.Size = UDim2.new(0.1, 0, 0.05, 0)
button.BackgroundColor3 = Color3.new(1, 1, 1)
button.Name = "ChoiceButton"
button.Text = child
button.MouseButton1Down:connect(function() clicked = button print("Picked a choice") end)
button.Parent = tool.Parent.Parent.PlayerGui.ScreenGui

table.insert(buttonTab, button)
end

while clicked == nil do
wait()
print("Looped")
end

buttonText = clicked.Text

for index, child in pairs(buttonTab) do
child:remove()
end

return buttonText
end

function makeTool()
local made = ""

if ing(1) == "Burning Metal" and ing(2) == "" then
made = "Metal Bar"
end

if ing(1) == "Scrap Metal" then
made = "Rusty Metal Bar"
end

if ing(1) == "Pistol" then
made = "Pistol"
end

if ing(1) == "Rifle" then
made = "Rifle"
end

if ing(1) == "Hammer" then
made = "Hammer"
end

if ing(1) == "Fishing Pole" then
made = "Fishing Pole"
end

if ing(1) == "Burining Metal" and ing(2) == "Rope" then
made = "Metal Bucket"
end

if ing(1) == "Stock Wood" and ing(2) == "Nail" then
made = "Nailed Wood"
end

if ing(1) == "Discarded Plastic" and ing(2) == "Gasoline" then
made = "Faulty Lighter"
end

if ing(1) == "Battery" and ing(2) == "Wire" then
made = "FlashLight"
end

if ing(1) == "Wire" and ing(2) == "Wire" and ing(3) == "Battery" then
made = "Tazer"
end

if ing(1) == "Battery" and ing(2) == "Wire" and ing(3) == "Wire" then
made = "CellPhone"
end

if ing(1) == "Tied Metal Bar" and ing(2) == "Tied Metal Bar" and ing(3) == "Wooden Barricade" then
made = "Small Shelter"
end

if ing(1) == "Wooden Barricade" and ing(2) == "Tied Metal Bar" and ing(3) == "Glass Pane" then
made = "Garage"
end

if ing(1) == "Tied Metal Bar" and ing(2) == "Tied Metal Bar" and ing(3) == "Gasoline" then
made = "Rusty Car"
end

if ing(1) == "Gasoline" and ing(2) == "Tied Metal Bar" and ing(3) == "Tied Metal Bar" then
made = "Rusty Truck"
end

if ing(1) == "Bonded Metal Bar" and ing(2) == "Scrap Metal" and ing(3) == "Wooden Barricade" then
made = "Large House"
end

if ing(1) == "Bonded Metal Bar" and ing(2) == "Tied Metal Bar" and ing(3) == "Wooden Barricade" then
made = "Armored Wall"
end

if ing(1) == "Tied Metal Bar" and ing(2) == "Scrap Metal" and ing(3) == "Wooden Barricade" then
made = "Small Home"
end

if ing(1) == "Bonded Metal Bar" and ing(2) == "Bonded Metal Bar" and ing(3) == "Scrap Metal" and ing(4) == "Wooden Barricade" and ing(5) == "Glass Pane" then
made = "Hotel"
end

if ing(1) == "Tied Metal Bar" and ing(2) == "Tied Metal Bar" and ing(3) == "Tied Metal Bar" and ing(4) == "Wooden Barricade" and ing(5) == "Glass Pane" then
made = "Med. Shelter"
end

if ing(1) == "Pure Plastic" and ing(2) == "Gasoline" then
made = "Plastic Lighter"
end

if ing(1) == "Pure Plastic" and ing(2) == "Gasoline" and ing(3) == "Stock Wood" then
made = "Lighter Kit"
end

if ing(1) == "Pure Plastic" and ing(2) == "Pure Plastic" and ing(3) == "Gasoline" then
made = "Gas Container"
end

if ing(1) == "Wooden Barricade" and ing(2) == "Wooden Barricade" and ing(3) == "Scrap Metal" then
made = "Self Storage"
end

if ing(1) == "Wooden Barricade" and ing(2) == "Wooden Barricade" and ing(3) == "Metal Bar" then
made = "Gun Storage"
end

if ing(1) == "Tied Metal Bar" and ing(2) == "Tied Metal Bar" and ing(3) == "Scrap Metal" and ing(4) == "Wooden Barricade" then
made = "Warehouse"
end

if ing(1) == "Battery" and ing(2) == "Wire" and ing(3) == "Brick Barricade" and ing(4) == "Tied Metal Bar" then
made = "Electric Brick Gate"
end

if ing(1) == "Wire" and ing(2) == "Battery" and ing(3) == "Brick Barricade" and ing(4) == "Tied Metal Bar" then
made = "Electric Brick Wall"
end

if ing(1) == "Wire" and ing(2) == "Battery" and ing(3) == "Stock Wood" and ing(4) == "Stock Wood" then
made = "Electric Fence"
end

if ing(1) == "Wire" and ing(2) == "Battery" and ing(3) == "Brick Barricade" and ing(4) == "Tied Metal Bar" and ing(5) == "Glass Pane" then
made = "Electric Brick Shelter"
end

if ing(1) == "Tied Metal Bar" and ing(2) == "Tied Metal Bar" and ing(3) == "Wooden Barricade" and ing(4) == "Stock Wood" then
made = choices({"Makeshift Gate", "Dock"})
end

if ing(1) == "Tied Metal Bar" and ing(2) == "Wooden Barricade" and ing(3) == "Wooden Barricade" and ing(4) == "Wooden Barricade" then
made = "Makeshift Wall"
end

if ing(1) == "Tied Metal Bar" and ing(2) == "Stock Wood" and ing(3) == "Stock Wood" then
made = "Ladder"
end

if ing(1) == "Tied Metal Bar" and ing(2) == "Wooden Barricade" and ing(3) == "Stock Wood" then
made = "Makeshift Mill"
end

if ing(1) == "Stock Wood" and ing(2) == "Stock Wood" then
made = "Makeshift Raft"
end

if ing(1) == "Bonded Metal Bar" and ing(2) == "Bonded Metal Bar" and ing(3) == "Bonded Metal Bar" and ing(4) == "Wooden Barricade" then
made = "Stable Tower"
end

if ing(1) == "Tied Metal Bar" and ing(2) == "Tied Metal Bar" and ing(3) == "Tied Metal Bar" and ing(4) == "Wooden Barricade" then
made = "Makeshift Tower"
end

if ing(1) == "Bonded Metal Bar" and ing(2) == "Bonded Metal Bar" and ing(3) == "Wooden Barricade" and ing(4) == "Wooden Barricade" and ing(5) == "Stock Wood" and ing(6) == "Glass Pane" then
made = "Large Shelter"
end

if ing(1) == "Tied Metal Bar" and ing(2) == "Tied Metal Bar" and ing(3) == "Wooden Barricade" and ing(4) == "Wooden Barricade" and ing(5) == "Stock Wood" and ing(6) == "Glass Pane" then
made = "Mansion"
end

if ing(1) == "Bonded Metal Bar" and ing(2) == "Pile of Bricks" and ing(3) == "Pile of Bricks" and ing(4) == "Pile of Bricks" and ing(5) == "Glass Pane" then
made = "Brick Fort"
end

if ing(1) == "Wooden Barricade" and ing(2) == "Pile of Bricks" and ing(3) == "Pile of Bricks" and ing(4) == "Pile of Bricks" and ing(5) == "Glass Pane" then
made = "Brick Wall"
end

if ing(1) == "Tied Metal Bar" and ing(2) == "Tied Metal Bar" and ing(3) == "Scrap Metal" and ing(4) == "Wooden Barricade" and ing(5) == "Stock Wood" then
made = "Large Warehouse"
end

if ing(1) == "Tied Metal Bar" and ing(2) == "Scrap Metal" and ing(3) == "Pile of Sand" then
made = "Sand Water Filter"
end

if ing(1) == "Pile of Bricks" and ing(2) == "Pile of Bricks" and ing(3) == "Scrap Metal" and ing(4) == "Stock Wood" and ing(5) == "Stock Wood" then
made = "Forge"
end

if ing(1) == "Tied Metal Bar" and ing(2) == "Glass Pane" and ing(3) == "Glass Pane" then
made = "Green House"
end

if ing(1) == "Bonded Metal Bar" and ing(2) == "Bonded Metal Bar" and ing(3) == "Wooden Barricade" and ing(4) == "Stock Wood" then
made = "Stable Gate"
end

if ing(1) == "Bonded Metal Bar" and ing(2) == "Wooden Barricade" and ing(3) == "Wooden Barricade" and ing(4) == "Wooden Barricade" then
made = "Stable Wall"
end

if ing(1) == "Bonded Metal Bar" and ing(2) == "Wooden Barricade" and ing(3) == "Stock Wood" then
made = "Stable Mill"
end

if ing(1) == "Wooden Barricade" and ing(2) == "Wooden Barricade" and ing(3) == "Wooden Barricade" then
made = "Big Raft"
end

if ing(1) == "Pistol" and ing(2) == "Pistol" and ing(3) == "Pistol" then
made = "Rifle"
end

if ing(1) == "Pistol" and ing(2) == "Ammo Pack" and ing(3) == "Stock Wood" then
made = "Gun Kit"
end

if ing(1) == "Fertile Soil" and ing(2) == "Stock Wood" and ing(3) == "Stock Wood" then
made = "Farming Kit"
end

if ing(1) == "Pistol" and ing(2) == "Pistol" and ing(3) == "Scrap Metal" then
made = "870 Combat"
end

if ing(1) == "Pistol" and ing(2) == "Scrap Metal" then
made = "GOL-SM"
end

local real = game.Lighting.Tools:findFirstChild(made)

if real ~= nil then
local player = tool.Parent.Parent

local given = real:clone()
given.Parent = player.Backpack

alert(given.Name.." created!")

deleteTable()
else
alert("Nothing created...")
end

clearTable()
end

function makeItem()
local made = ""

if ing(1) == "Stock Wood" and ing(2) == "Stock Wood" then
made = "Wooden Barricade"
end

if ing(1) == "Pile of Bricks" and ing(2) == "Pile of Bricks" then
made = "Brick Barricade"
end

if ing(1) == "Scrap Metal" and ing(2) == "Scrap Metal" then
made = "Tied Metal Bar"
end

if ing(1) == "Burning Metal" and ing(2) == "Burning Metal" then
made = "Bonded Metal Bar"
end

if ing(1) == "Glass" and ing(2) == "Glass" then
made = "Glass Pane"
end

if ing(1) == "Wheat" and ing(2) == "Wheat" then
made = "Wheat Bundle"
end

if ing(1) == "Stalk" then
made = "Rope"
end

if ing(1) == "Dough" and ing(2) == nil then
made = "Uncooked Bread"
end

if ing(1) == "Dough" and ing(2) == "Corn" then
made = "Uncooked Corn Bread"
end

if ing(1) == "Dough" and ing(2) == "Pumpkin" then
made = "Uncooked Pumpkin Pie"
end

local real = game.Lighting.Items:findFirstChild(made)

if real ~= nil then
local player = tool.Parent.Parent
if player.Inventory.One.Value == nil then

local given = real:clone()
given.Parent = player.Inventory
player.Inventory.One.Value = given

alert(given.Name.." created!")

deleteTable()
elseif player.Inventory.Two.Value == nil then

local given = real:clone()
given.Parent = player.Inventory
player.Inventory.Two.Value = given

alert(given.Name.." created!")

deleteTable()
elseif player.Inventory.Three.Value == nil then

local given = real:clone()
given.Parent = player.Inventory
player.Inventory.Three.Value = given

alert(given.Name.." created!")

deleteTable()
elseif player.Inventory.Four.Value == nil then

local given = real:clone()
given.Parent = player.Inventory
player.Inventory.Four.Value = given

alert(given.Name.." created!")

deleteTable()
elseif player.Inventory.Five.Value == nil then

local given = real:clone()
given.Parent = player.Inventory
player.Inventory.Five.Value = given

alert(given.Name.." created!")

deleteTable()
elseif player.Inventory.Six.Value == nil then

local given = real:clone()
given.Parent = player.Inventory
player.Inventory.Six.Value = given

alert(given.Name.." created!")

deleteTable()
elseif player.Inventory.Seven.Value == nil then

local given = real:clone()
given.Parent = player.Inventory
player.Inventory.Seven.Value = given

alert(given.Name.." created!")

deleteTable()
elseif player.Inventory.Eight.Value == nil then

local given = real:clone()
given.Parent = player.Inventory
player.Inventory.Eight.Value = given

alert(given.Name.." created!")

deleteTable()
elseif player.Inventory.Nine.Value == nil then

local given = real:clone()
given.Parent = player.Inventory
player.Inventory.Nine.Value = given

alert(given.Name.." created!")

deleteTable()
elseif player.Inventory.Ten.Value == nil then

local given = real:clone()
given.Parent = player.Inventory
player.Inventory.Ten.Value = given

alert(given.Name.." created!")

deleteTable()
elseif player.Inventory.Ten.Value ~= nil then

alert("Not Enough Space!!")
wait(1.5)

end
else
alert("Nothing created...")
end

clearTable()
end

function process()
local hasCreated = false

if ing(1) == "Small Leaves" and ing(2) == "" then
addToService("Composting", ingReal(1))
alert("Began Composting!")
hasCreated = true
end

if ing(1) == "Large Leaves" and ing(2) == "" then
addToService("Composting", ingReal(1))
alert("Began Composting!")
hasCreated = true
end

if ing(1) == "Fertile Soil" and ing(2) == "Beef Jerky Seed" then
plant(ingReal(1), ingReal(2))
addToService("Farming", ingReal(2))
alert("Planted Beef Jerky Seed!")
hasCreated = true
end

if ing(1) == "Fertile Soil" and ing(2) == "Wheat Seed" then
plant(ingReal(1), ingReal(2))
addToService("Farming", ingReal(2))
alert("Planted Wheat!")
hasCreated = true
end

if ing(1) == "Fertile Soil" and ing(2) == "Corn" then
plant(ingReal(1), ingReal(2))
addToService("Farming", ingReal(2))
alert("Planted Corn!")
hasCreated = true
end

if ing(1) == "Fertile Soil" and ing(2) == "Grape" then
plant(ingReal(1), ingReal(2))
addToService("Farming", ingReal(2))
alert("Planted Grape!")
hasCreated = true
end

if ing(1) == "Fertile Soil" and ing(2) == "Pumpkin Seed" then
plant(ingReal(1), ingReal(2))
addToService("Farming", ingReal(2))
alert("Planted Pumpkin!")
hasCreated = true
end

if ing(1) == "Fertile Soil" and ing(2) == "Pumpkin Seed Pack" then
plant(ingReal(1), ingReal(2))
addToService("Farming", ingReal(2))
alert("Planted Pumpkin!")
hasCreated = true
end

if ing(1) == "Fertile Soil" and ing(2) == "Corn Seed Pack" then
plant(ingReal(1), ingReal(2))
addToService("Farming", ingReal(2))
alert("Planted Corn!")
hasCreated = true
end

if ing(1) == "Fertile Soil" and ing(2) == "Carrot Seed Pack" then
plant(ingReal(1), ingReal(2))
addToService("Farming", ingReal(2))
alert("Planted Carrot!")
hasCreated = true
end

if ing(1) == "Fertile Soil" and ing(2) == "Grape Seed Pack" then
plant(ingReal(1), ingReal(2))
addToService("Farming", ingReal(2))
alert("Planted Grape!")
hasCreated = true
end

if ing(1) == "Fertile Soil" and ing(2) == "Wheat Seed Pack" then
plant(ingReal(1), ingReal(2))
addToService("Farming", ingReal(2))
alert("Planted Wheat!")
hasCreated = true
end

if ing(1) == "Fertile Soil" and ing(2) == "Carrot Flower" then
plant(ingReal(1), ingReal(2))
addToService("Farming", ingReal(2))
alert("Planted Carrot!")
hasCreated = true
end

if ing(1) == "Fertile Soil" and ing(2) == "Apple" then
plant(ingReal(1), ingReal(2))
addToService("Farming", ingReal(2))
alert("Planted Apple!")
hasCreated = true
end

if ing(1) == "Fertile Soil" and ing(2) == "Blueberry" then
plant(ingReal(1), ingReal(2))
addToService("Farming", ingReal(2))
alert("Planted Berry!")
hasCreated = true
end

if ing(1) == "Fertile Soil" and ing(2) == "Zombie Seed" then
plant(ingReal(1), ingReal(2))
addToService("Farming", ingReal(2))
alert("Planted A Brain Eating Zombie Plant!")
hasCreated = true
ZSPALERT = Instance.new("StringValue")
ZSPALERT.Parent = workspace.Services.Farming
ZSPALERT.Value = ZSP
end

if ing(1) == "Bento Hide" and ing(2) == "" then
addToService("Tanning", ingReal(1))
alert("Began Tanning!")
hasCreated = true
end

if not hasCreated then
alert("Nothing happened...")
end

clearTable()
end

function plant(compost, seed)
seed.Locked = true
seed.Anchored = true
compost.Locked = true

seed.CFrame = compost.CFrame

local val = Instance.new("ObjectValue")
val.Name = "MyCompost"
val.Value = compost
val.Parent = seed
end

function addToService(serviceName, part)
local ov = Instance.new("ObjectValue")
ov.Value = part
ov.Parent = game.Workspace.Services:findFirstChild(serviceName)
end

function canCraft(targ)
local criteria1 = (not targ.Locked)
local criteria2 = (targ:findFirstChild("CanCraft") ~= nil)

return (criteria1 or criteria2)
end

function onSelected(mouse)
local player = tool.Parent.Parent

frame.Parent = player.PlayerGui.ScreenGui

mouse.Move:connect(function()
local targ = mouse.Target

local player = tool.Parent.Parent
local char = player.Character
local head = char.Head

label.Text = ""

if targ ~= nil then
if canCraft(targ) then
if getDist(head.Position, mouse.hit.p) < 15 then
label.Text = targ.Name
end
end
end
end)

mouse.Button1Down:connect(function()
local char = player.Character
local head = char.Head

local targ = mouse.Target

if targ ~= nil then
if canCraft(targ) then
if getDist(head.Position, mouse.hit.p) < 15 then
if not checkIngTable(targ) then
table.insert(ingTable, targ)

setListName()
else
alert("You already have that!")
end
end
end
end
end)
end

function onDeselected()
frame.Parent = tool

if example ~= nil then
example.Parent = nil
end

local buttons = tool.Parent.Parent.PlayerGui.ScreenGui:GetChildren()

for index, child in pairs(buttons) do
if child.Name == "ChoiceButton" then
child:remove()
end
end
end

tool.Selected:connect(onSelected)
tool.Deselected:connect(onDeselected)
clear.MouseButton1Down:connect(function()
clearTable()

local buttons = tool.Parent.Parent.PlayerGui.ScreenGui:GetChildren()

for index, child in pairs(buttons) do
if child.Name == "ChoiceButton" then
child:remove()
end
end

end)
createTool.MouseButton1Down:connect(makeTool)
createItem.MouseButton1Down:connect(makeItem)
processItem.MouseButton1Down:connect(process)
Report Abuse
MRMCC7 is not online. MRMCC7
Joined: 24 Oct 2013
Total Posts: 3395
01 May 2015 11:07 AM
Forage:

wait(1)

local tool = script.Parent
local frame = tool.Frame
local label = frame.Label
local timeBar = frame.TimeBar

local debounce = true

function getDist(a, b)
return (a - b).magnitude
end

function getForage(part)
local parent = part.Parent

if parent ~= nil then
local val = parent:findFirstChild("Forage")

if val == nil then
val = part:findFirstChild("IForage")
end

if val == nil then
val = part:findFirstChild("CForage")
end

if val == nil then
return false, nil
else
return true, val
end
end
end

function getLabel(part)
local string = part.Name

return string
end

function onMouseMove(mouse)
local targ = mouse.Target

local player = tool.Parent.Parent
local char = player.Character
local head = char.Head

label.Text = ""

if targ ~= nil then
local can, type = getForage(targ)
if (can and type.Name == "Forage") or not targ.Locked then
if getDist(head.Position, mouse.hit.p) < 15 then
label.Text = getLabel(targ)
end
elseif can and type.Name == "IForage" then
if getDist(head.Position, mouse.hit.p) < 15 then
local real = game.Lighting.IF:findFirstChild(type.Value)
if real ~= nil then
label.Text = getLabel(real)
end
end
elseif can and type.Name == "CForage" then
if getDist(head.Position, mouse.hit.p) < 15 then
local ot = game.Lighting.CF:findFirstChild(type.Value)
if ot ~= nil then
real = math.random(1, 2)
if real == 1 then
real = "Pizza"
elseif real == 2 then
real = "Lemonade"
end
label.Text = getLabel(real)
end
end
end
end
end

function onSelected(mouse)
local player = tool.Parent.Parent

frame.Parent = player.PlayerGui.ScreenGui

mouse.Move:connect(function() onMouseMove(mouse) end)

mouse.Button1Down:connect(function()
local char = player.Character
local head = char.Head
local inven = player.Inventory:GetChildren()

local targ = mouse.Target

if targ ~= nil then
local can, type = getForage(targ)
if (can and type.Name == "Forage") or not targ.Locked then
if getDist(head.Position, mouse.hit.p) < 15 then
if debounce then
if player.Inventory.One.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = targ:GetMass() / 25

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.One.Value = targ

targ.Parent = player.Inventory

elseif player.Inventory.Two.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = targ:GetMass() / 25

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Two.Value = targ

targ.Parent = player.Inventory

elseif player.Inventory.Three.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = targ:GetMass() / 25

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Three.Value = targ

targ.Parent = player.Inventory

elseif player.Inventory.Four.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = targ:GetMass() / 25

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Four.Value = targ

targ.Parent = player.Inventory

elseif player.Inventory.Five.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = targ:GetMass() / 25

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Five.Value = targ

targ.Parent = player.Inventory

elseif player.Inventory.Six.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = targ:GetMass() / 25

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Six.Value = targ

targ.Parent = player.Inventory

elseif player.Inventory.Seven.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = targ:GetMass() / 25

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Seven.Value = targ

targ.Parent = player.Inventory

elseif player.Inventory.Eight.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = targ:GetMass() / 25

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Eight.Value = targ

targ.Parent = player.Inventory

elseif player.Inventory.Nine.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = targ:GetMass() / 25

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Nine.Value = targ

targ.Parent = player.Inventory

elseif player.Inventory.Ten.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = targ:GetMass() / 25

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Ten.Value = targ

targ.Parent = player.Inventory
end
end
end
elseif can and type.Name == "IForage" then
if getDist(head.Position, mouse.hit.p) < 15 then
if debounce then
local real = game.Lighting.IF:findFirstChild(type.Value)
if real ~= nil then
c = real:Clone()
if player.Inventory.One.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = c:GetMass() / 5

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.One.Value = c

c.Parent = player.Inventory
elseif player.Inventory.Two.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = c:GetMass() / 5

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Two.Value = c

c.Parent = player.Inventory

elseif player.Inventory.Three.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = c:GetMass() / 5

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Three.Value = c

c.Parent = player.Inventory

elseif player.Inventory.Four.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = c:GetMass() / 5

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Four.Value = c

c.Parent = player.Inventory

elseif player.Inventory.Five.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = c:GetMass() / 5

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Five.Value = c

c.Parent = player.Inventory

elseif player.Inventory.Six.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = c:GetMass() / 5

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Six.Value = c

c.Parent = player.Inventory

elseif player.Inventory.Seven.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = c:GetMass() / 5

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Seven.Value = c

c.Parent = player.Inventory

elseif player.Inventory.Eight.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = c:GetMass() / 5

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Eight.Value = c

c.Parent = player.Inventory

elseif player.Inventory.Nine.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = c:GetMass() / 5

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Nine.Value = c

c.Parent = player.Inventory

elseif player.Inventory.Ten.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = c:GetMass() / 5

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Ten.Value = c

c.Parent = player.Inventory
end
end
end
end

elseif can and type.Name == "CForage" then
if getDist(head.Position, mouse.hit.p) < 15 then
if debounce then
local ot = game.Lighting.CF:findFirstChild(type.Value)
real = math.random(1, 2)
if real == 1 then
real = ot.Pizza
elseif real == 2 then
real = ot.Lemonade
end
if real ~= nil then
c = real:Clone()
if player.Inventory.One.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = c:GetMass() / 5

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.One.Value = c

c.Parent = player.Inventory
elseif player.Inventory.Two.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = c:GetMass() / 5

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Two.Value = c

c.Parent = player.Inventory

elseif player.Inventory.Three.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = c:GetMass() / 5

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Three.Value = c

c.Parent = player.Inventory

elseif player.Inventory.Four.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = c:GetMass() / 5

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Four.Value = c

c.Parent = player.Inventory

elseif player.Inventory.Five.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = c:GetMass() / 5

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Five.Value = c

c.Parent = player.Inventory

elseif player.Inventory.Six.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = c:GetMass() / 5

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Six.Value = c

c.Parent = player.Inventory

elseif player.Inventory.Seven.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = c:GetMass() / 5

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Seven.Value = c

c.Parent = player.Inventory

elseif player.Inventory.Eight.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = c:GetMass() / 5

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Eight.Value = c

c.Parent = player.Inventory

elseif player.Inventory.Nine.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = c:GetMass() / 5

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Nine.Value = c

c.Parent = player.Inventory

elseif player.Inventory.Ten.Value == nil then

local bp = targ:findFirstChild("BodyPosition")

if bp ~= nil then
bp:remove()
end

local time = c:GetMass() / 5

local spd = char.Humanoid.WalkSpeed
char.Humanoid.WalkSpeed = 0

debounce = false

for t = 0, time, 0.05 do
timeBar.Size = UDim2.new(t / time, 0, 1, 0)
wait(0.05)
end

debounce = true

char.Humanoid.WalkSpeed = spd

timeBar.Size = UDim2.new(0, 0, 1, 0)

player.Inventory.Ten.Value = c

c.Parent = player.Inventory
end
end
end
end
end
end
end)
end

function onDeselected()
frame.Parent = tool

if example ~= nil then
example.Parent = nil
end
end

tool.Selected:connect(onSelected)
tool.Deselected:connect(onDeselected)
Report Abuse
affectless is not online. affectless
Joined: 28 Dec 2014
Total Posts: 1084
01 May 2015 11:08 AM
..
Report Abuse
MRMCC7 is not online. MRMCC7
Joined: 24 Oct 2013
Total Posts: 3395
01 May 2015 11:08 AM
Inventory:

local tool = script.Parent
local frame = tool.Frame

local b1 = frame.Box1
local b2 = frame.Box2
local b3 = frame.Box3
local b4 = frame.Box4
local b5 = frame.Box5
local b6 = frame.Box6
local b7 = frame.Box7
local b8 = frame.Box8
local b9 = frame.Box9
local b10 = frame.Box10

function changeValues()
local player = tool.Parent.Parent
if player.Inventory.One.Value ~= nil then
b1.Object.Value = player.Inventory.One.Value
b1.Text = player.Inventory.One.Value.Name
b1.Object.Value.Locked = false
end
if player.Inventory.Two.Value ~= nil then
b2.Object.Value = player.Inventory.Two.Value
b2.Text = player.Inventory.Two.Value.Name
b2.Object.Value.Locked = false
end
if player.Inventory.Three.Value ~= nil then
b3.Object.Value = player.Inventory.Three.Value
b3.Text = player.Inventory.Three.Value.Name
b3.Object.Value.Locked = false
end
if player.Inventory.Four.Value ~= nil then
b4.Object.Value = player.Inventory.Four.Value
b4.Text = player.Inventory.Four.Value.Name
b4.Object.Value.Locked = false
end
if player.Inventory.Five.Value ~= nil then
b5.Object.Value = player.Inventory.Five.Value
b5.Text = player.Inventory.Five.Value.Name
b5.Object.Value.Locked = false
end
if player.Inventory.Six.Value ~= nil then
b6.Object.Value = player.Inventory.Six.Value
b6.Text = player.Inventory.Six.Value.Name
b6.Object.Value.Locked = false
end
if player.Inventory.Seven.Value ~= nil then
b7.Object.Value = player.Inventory.Seven.Value
b7.Text = player.Inventory.Seven.Value.Name
b7.Object.Value.Locked = false
end
if player.Inventory.Eight.Value ~= nil then
b8.Object.Value = player.Inventory.Eight.Value
b8.Text = player.Inventory.Eight.Value.Name
b8.Object.Value.Locked = false
end
if player.Inventory.Nine.Value ~= nil then
b9.Object.Value = player.Inventory.Nine.Value
b9.Text = player.Inventory.Nine.Value.Name
b9.Object.Value.Locked = false
end
if player.Inventory.Ten.Value ~= nil then
b10.Object.Value = player.Inventory.Ten.Value
b10.Text = player.Inventory.Ten.Value.Name
b10.Object.Value.Locked = false
end
end

function onMB1D()
local player = tool.Parent.Parent
local char = player.Character
local obj = b1.Object
if obj.Value ~= nil then
obj.Value.Parent = Workspace
obj.Value.Position = char.Torso.Position + Vector3.new(0, -1, 2)
obj.Value = nil
player.Inventory.One.Value = nil
b1.Text = "Nothing"
end
end

function onMB1D2()
local player = tool.Parent.Parent
local char = player.Character
local obj = b2.Object
if obj.Value ~= nil then
obj.Value.Parent = Workspace
obj.Value.Position = char.Torso.Position + Vector3.new(0, -1, 2)
obj.Value = nil
player.Inventory.Two.Value = nil
b2.Text = "Nothing"
end
end

function onMB1D3()
local player = tool.Parent.Parent
local char = player.Character
local obj = b3.Object
if obj.Value ~= nil then
obj.Value.Parent = Workspace
obj.Value.Position = char.Torso.Position + Vector3.new(0, -1, 2)
obj.Value = nil
player.Inventory.Three.Value = nil
b3.Text = "Nothing"
end
end

function onMB1D4()
local player = tool.Parent.Parent
local char = player.Character
local obj = b4.Object
if obj.Value ~= nil then
obj.Value.Parent = Workspace
obj.Value.Position = char.Torso.Position + Vector3.new(0, -1, 2)
obj.Value = nil
player.Inventory.Four.Value = nil
b4.Text = "Nothing"
end
end

function onMB1D5()
local player = tool.Parent.Parent
local char = player.Character
local obj = b5.Object
if obj.Value ~= nil then
obj.Value.Parent = Workspace
obj.Value.Position = char.Torso.Position + Vector3.new(0, -1, 2)
obj.Value = nil
player.Inventory.Five.Value = nil
b5.Text = "Nothing"
end
end

function onMB1D6()
local player = tool.Parent.Parent
local char = player.Character
local obj = b6.Object
if obj.Value ~= nil then
obj.Value.Parent = Workspace
obj.Value.Position = char.Torso.Position + Vector3.new(0, -1, 2)
obj.Value = nil
player.Inventory.Six.Value = nil
b6.Text = "Nothing"
end
end

function onMB1D7()
local player = tool.Parent.Parent
local char = player.Character
local obj = b7.Object
if obj.Value ~= nil then
obj.Value.Parent = Workspace
obj.Value.Position = char.Torso.Position + Vector3.new(0, -1, 2)
obj.Value = nil
player.Inventory.Seven.Value = nil
b7.Text = "Nothing"
end
end

function onMB1D8()
local player = tool.Parent.Parent
local char = player.Character
local obj = b8.Object
if obj.Value ~= nil then
obj.Value.Parent = Workspace
obj.Value.Position = char.Torso.Position + Vector3.new(0, -1, 2)
obj.Value = nil
player.Inventory.Eight.Value = nil
b8.Text = "Nothing"
end
end

function onMB1D9()
local player = tool.Parent.Parent
local char = player.Character
local obj = b9.Object
if obj.Value ~= nil then
obj.Value.Parent = Workspace
obj.Value.Position = char.Torso.Position + Vector3.new(0, -1, 2)
obj.Value = nil
player.Inventory.Nine.Value = nil
b9.Text = "Nothing"
end
end

function onMB1D10()
local player = tool.Parent.Parent
local char = player.Character
local obj = b10.Object
if obj.Value ~= nil then
obj.Value.Parent = Workspace
obj.Value.Position = char.Torso.Position + Vector3.new(0, -1, 2)
obj.Value = nil
player.Inventory.Ten.Value = nil
b10.Text = "Nothing"
end
end

function onSelected()
local player = tool.Parent.Parent
local char = player.Character
frame.Parent = player.PlayerGui.ScreenGui
changeValues()
frame.Parent = player.PlayerGui.ScreenGui
end

function onDeselected()
frame.Parent = script.Parent
end

tool.Selected:connect(onSelected)
tool.Deselected:connect(onDeselected)
b1.MouseButton1Down:connect(onMB1D)
b2.MouseButton1Down:connect(onMB1D2)
b3.MouseButton1Down:connect(onMB1D3)
b4.MouseButton1Down:connect(onMB1D4)
b5.MouseButton1Down:connect(onMB1D5)
b6.MouseButton1Down:connect(onMB1D6)
b7.MouseButton1Down:connect(onMB1D7)
b8.MouseButton1Down:connect(onMB1D8)
b9.MouseButton1Down:connect(onMB1D9)
b10.MouseButton1Down:connect(onMB1D10)
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
01 May 2015 11:09 AM
Ever heard of elseif?
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
01 May 2015 11:09 AM
...

.-.

-.-

Long much?

Inefficient much?

Report Abuse
MRMCC7 is not online. MRMCC7
Joined: 24 Oct 2013
Total Posts: 3395
01 May 2015 11:13 AM
Yeaaaah, I'm not nearly intelligent enough to clean it up.

The errors I'm getting are here:

script.Parent.Humanoid:MoveTo(Vector3.new(math.random(-100,100),0,math.random(-100,100)), game.Workspace.Base)



*And here*


connection = script.Parent.Handle10.Touched:connect(blow) or script.Parent.Handle11.Touched:connect(blow) or script.Parent.Handle12.Touched:connect(blow) or dscript.Parent.Handle13.Touched:connect(blow) or script.Parent.Handle14.Touched:connect(blow) or script.Parent.Handle15.Touched:connect(blow)


*And here*


local stat = player.stats:findFirstChild(statName)

Report Abuse
MRMCC7 is not online. MRMCC7
Joined: 24 Oct 2013
Total Posts: 3395
01 May 2015 02:16 PM
b1
Report Abuse
9draco is not online. 9draco
Joined: 13 Nov 2010
Total Posts: 5841
01 May 2015 03:16 PM
He did say show me the errors. And you probably didn't bother to read the Output.
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
01 May 2015 03:19 PM
will do for 5k

most recurring problem here is there are obvious signs that whoever wrote this didn't nearly finish the basics.

Loops, tables, will save you about a hundred or so lines here, and make it easier to edit.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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