So annoying. The line where it breaks is line 13 or print("Work T_T")
--Variables
m = game.Players.LocalPlayer:GetMouse()
--Main Variables
local AnimationId = "246170494"
local anmtool = game.Lighting["Ham"..game.Players.LocalPlayer.Other.Hammer.Value]:Clone()
local Random = math.random(1,2)
local Part = game.Lighting[Random.."Wood"]:Clone()
local Part2 = game.Lighting[Random.."Wood2"]
local range = 10
print("Work T_T")
--Main Variables
local on = true
local undercon = game.Lighting.Under:Clone()
local player = game.Players.LocalPlayer
local wlk = game.Players.LocalPlayer.Character.Humanoid.WalkSpeed
local bin = Instance.new("Message")
bin.Name = 'LocalBin'
bin.Parent = player.Character
Part.Parent = bin
--Variables
-- FUNCTIONS
function Fade123123()
wait(1)
for i = 0,1,0.1 do
script.Parent.Parent.Parent.Building.Building2.TextLabel.BackgroundTransparency = i
script.Parent.Parent.Parent.Building.BackgroundTransparency = 0.5 + i
script.Parent.Parent.Parent.Building.Building2.TextLabel.TextTransparency = i
script.Parent.Parent.Parent.Building.Building2.TextLabel.TextStrokeTransparency = i
script.Parent.Parent.Parent.MODE.TextTransparency = i
script.Parent.Parent.Parent.MODE.TextStrokeTransparency = i
script.Parent.Parent.Parent.MODE.BackgroundTransparency = i
wait()
end end
function movemodel(model,pos)
local r = 0
local list = {}
c = model:GetChildren()
for i = 1,#c do
if c[i].ClassName == "Part" and c[i].Name ~= "Base" then
r = r + 1
list[r] = c[i]
r = r + 1
list[r] = c[i].Position - model.Base.Position
end end
model.Base.CFrame = CFrame.new(pos.X,pos.Y,pos.Z)
for i = 1,#c do
if c[i].Name ~= "Base" and c[i].ClassName == "Part" then
for m = 1,#list do
if list[m] == c[i] then
c[i].CFrame = model.Base.CFrame * CFrame.new(list[m+1].X,list[m+1].Y,list[m+1].Z)
end end end end end
function move()
if on == true then
movemodel(Part,( Vector3.new(2222,2.5-6,0)))
end end
function death()
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = wlk
Part:Destroy()
script.Parent.NoiseScript.Disabled = true
undercon:Destroy()
anmtool:Destroy()
if game.Players.LocalPlayer.Character:FindFirstChild("Animate") then
game.Players.LocalPlayer.Character.Animate.Disabled = false
end
script.Parent.Parent.Parent.Building.Visible = false
script.Parent.Parent.Parent.MODE.Visible = false
script.Parent.Parent.Visible = true
script.Disabled = true
end
--FUNCTIONS
--MOUSE MOVED
m.Move:connect(function( )
if on == true then
if m.Target ~= nil then
if (m.Target.Position - game.Players.LocalPlayer.Character.Torso.Position).Magnitude <= range then
if m.Target.Parent ~= Part then
if m.Target.Name == "WallPlacementArea" then
if m.Target.On.Value ~= false then
movemodel(Part,(m.Target.Position + Vector3.new(0,2.5-6,0)))
end else move() end else move() end else move() end else move() end else move() end end)
--MOUSE MOVED
--MOUSE CLICKED
m.Button1Down:connect(function( )
local target = m.Target
if m.Target ~= nil then
if (m.Target.Position - game.Players.LocalPlayer.Character.Torso.Position).Magnitude <= range then
if m.Target.Parent ~= Part then
if m.Target.Name == "WallPlacementArea" then
if m.Target.On.Value ~= false then
if m.Target.High.Value ~= target.Highest.Value then
if on == true then
--FUNCTION
function death()
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = wlk
Part:Destroy()
undercon:Destroy()
anmtool:Destroy()
script.Parent.NoiseScript.Disabled = true
if game.Players.LocalPlayer.Character:FindFirstChild("Animate") then
game.Players.LocalPlayer.Character.Animate.Disabled = false
end
target.On.Value = true
script.Parent.Parent.Parent.Building.Visible = false
script.Parent.Parent.Parent.MODE.Visible = false
script.Parent.Parent.Visible = true
script.Disabled = true
end
--FUNCTION
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 0
script.Parent.Parent.Parent.Building.Visible = true
script.Parent.Parent.Parent.Building.Building2.TextLabel.Size = UDim2.new(0,0,0,40)
script.Parent.Parent.Parent.Building.Building2.TextLabel.BackgroundTransparency = 0
script.Parent.Parent.Parent.Building.BackgroundTransparency = 0.5
script.Parent.Parent.Parent.Building.Building2.TextLabel.TextTransparency = 0
script.Parent.Parent.Parent.Building.Building2.TextLabel.TextStrokeTransparency = 0
on = false
if game.Players.LocalPlayer.Character:FindFirstChild("Animate") then
game.Players.LocalPlayer.Character.Animate.Disabled = true
end
local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/Asset?ID="..AnimationId
local animTrack = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(animation)
animTrack:Play()
undercon.Parent = game.Workspace
movemodel(undercon,(target.Position + Vector3.new(0,(5.1/2)-0.1,0)))
Part:Destroy()
target.On.Value = false
anmtool.Parent = workspace
local w = Instance.new("ManualWeld")
w.Parent = anmtool
w.Part0 = anmtool
w.Part1 = game.Players.LocalPlayer.Character["Right Arm"]
w.C0 = CFrame.new(1, 0, 0)*CFrame.Angles(0, math.rad(180), math.rad(90))
script.Parent.NoiseScript.Disabled = false
for i = 1,game.Players.LocalPlayer.Other.BuildTime.Value,0.25 do
script.Parent.Parent.Parent.Building.Building2.TextLabel:TweenSize(UDim2.new(i/game.Players.LocalPlayer.Other.BuildTime.Value,0,0,40), "Out", "Quad", 0.25, true)
script.Parent.Parent.Parent.Building.Building2.TextLabel.BackgroundColor3 = Color3.new(((255 - ((i/game.Players.LocalPlayer.Other.BuildTime.Value) * 255))/255),(((i/game.Players.LocalPlayer.Other.BuildTime.Value) * 255)/255),0)
wait(0.25)
end
script.Parent.NoiseScript.Disabled = true
anmtool:Destroy()
undercon:Destroy()
if game.Players.LocalPlayer.Character:FindFirstChild("Animate") then
game.Players.LocalPlayer.Character.Animate.Disabled = false
end
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = wlk
game.Players.LocalPlayer.leaderstats.Cash.Value = game.Players.LocalPlayer.leaderstats.Cash.Value - 2
local b = Part2:Clone()
b.Parent = game.Workspace
movemodel(b,(target.Position + Vector3.new(0,(5.1/2)-0.1,0)))
target.CFrame = CFrame.new(target.Position + Vector3.new(0,5.2,0))
target.High.Value = target.High.Value + 1
if target.High.Value == target.Highest.Value then
target:Destroy()
end
if target:FindFirstChild("On") then
target.On.Value = true
end
Fade123123()
script.Parent.Parent.Parent.MODE.Visible = false
script.Parent.Parent.Visible = true
script.Disabled = true
else death() end else death() end else death() end else death() end else death() end else death() end end end)
--MOUSE CLICKED

2 comments
Line 13 is whitespace...
I put 2 enters at start.. so..