Car Script: REQUESTED BY MATTEO MAN

View previous topic View next topic Go down

Car Script: REQUESTED BY MATTEO MAN

Post  MrHavik on Sat Nov 03, 2012 4:17 pm

receiver = game.Players.YOURNAMEHERE

color = BrickColor.Red()
colorB = BrickColor.Black()

mc = Instance.new("Model")
mc.Name = "Plane"
mc.Parent = receiver.Character

v = Instance.new("IntValue")
v.Name = "PlaneCheck"
v.Value = 0
v.Parent = mc

v = Instance.new("IntValue")
v.Name = "Stunt"
v.Value = 0
v.Parent = mc

md = Instance.new("Model")
md.Name = "Parts"
md.Parent = mc

x = Instance.new("Part")
x.formFactor = "Plate"
x.BackSurface = "Smooth"
x.FrontSurface = "Smooth"
x.TopSurface = "Weld"
x.Size = Vector3.new(6, 0.4, 6)
x.BrickColor = color
x.Position = Vector3.new(-13, 6.2, 6)
x.Parent = md

a = Instance.new("Part")
a.formFactor = "Plate"
a.BackSurface = "Weld"
a.FrontSurface = "Weld"
a.TopSurface = "Weld"
a.LeftSurface = "Motor"
a.RightSurface = "Motor"
a.LeftSurfaceInput = "Constant"
a.RightSurfaceInput = "Constant"
a.LeftParamB = 0
a.RightParamB = 0
a.Size = Vector3.new(2, 0.4, 2)
a.BrickColor = color
a.Position = Vector3.new(-13, 6.2, 10)
a.Name = "backAxle"
a.Parent = md

g = Instance.new("Part")
g.formFactor = "Plate"
g.BackSurface = "Weld"
g.FrontSurface = "Weld"
g.TopSurface = "Weld"
g.LeftSurface = "Motor"
g.RightSurface = "Motor"
g.LeftSurfaceInput = "Constant"
g.RightSurfaceInput = "Constant"
g.LeftParamB = 0
g.RightParamB = 0
g.Size = Vector3.new(2, 0.4, 2)
g.BrickColor = color
g.Position = Vector3.new(-13, 6.2, 2)
g.Parent = md

s = Instance.new("Script")
s.Source = "while true do script.Parent.RightParamB = script.Parent.Parent.backAxle.RightParamB script.Parent.LeftParamB = script.Parent.Parent.backAxle.LeftParamB wait() end "
s.Parent = g

s = Instance.new("Part")
s.Shape = "Cylinder"
s.TopSurface = "Smooth"
s.BottomSurface = "Smooth"
s.Size = Vector3.new(2,2,2)
s.BrickColor = BrickColor.Black()
s.Position = Vector3.new(-15, 6.2, 10)
s.Parent = md

s = Instance.new("Part")
s.Shape = "Cylinder"
s.TopSurface = "Smooth"
s.BottomSurface = "Smooth"
s.Size = Vector3.new(2,2,2)
s.BrickColor = BrickColor.Black()
s.Position = Vector3.new(-15, 6.2, 2)
s.Parent = md

s = Instance.new("Part")
s.Shape = "Cylinder"
s.TopSurface = "Smooth"
s.BottomSurface = "Smooth"
s.Size = Vector3.new(2,2,2)
s.BrickColor = BrickColor.Black()
s.Position = Vector3.new(-11, 6.2, 10)
s.Parent = md

s = Instance.new("Part")
s.Shape = "Cylinder"
s.TopSurface = "Smooth"
s.BottomSurface = "Smooth"
s.Size = Vector3.new(2,2,2)
s.BrickColor = BrickColor.Black()
s.Position = Vector3.new(-11, 6.2, 2)
s.Parent = md

x = Instance.new("Part")
x.formFactor = "Plate"
x.BackSurface = "Smooth"
x.FrontSurface = "Smooth"
x.TopSurface = "Weld"
x.Size = Vector3.new(1, 1.2, 3)
x.BrickColor = color
x.Position = Vector3.new(-15.5, 7, 6.5)
x.Parent = md

x = Instance.new("Part")
x.formFactor = "Plate"
x.BackSurface = "Smooth"
x.FrontSurface = "Smooth"
x.TopSurface = "Weld"
x.Size = Vector3.new(2, 1.2, 2)
x.BrickColor = color
x.Position = Vector3.new(-13, 6.99, 2)
x.Parent = md

x = Instance.new("Part")
x.formFactor = "Plate"
x.BackSurface = "Smooth"
x.FrontSurface = "Smooth"
x.TopSurface = "Weld"
x.Size = Vector3.new(6, 1.2, 2)
x.BrickColor = color
x.Position = Vector3.new(-13, 6.99, 4)
x.Parent = md

x = Instance.new("Part")
x.formFactor = "Plate"
x.BackSurface = "Smooth"
x.FrontSurface = "Smooth"
x.TopSurface = "Weld"
x.Size = Vector3.new(6, 1.6, 1)
x.BrickColor = color
x.Position = Vector3.new(-13, 6.79, 11.5)
x.Parent = md

x = Instance.new("Part")
x.formFactor = "Plate"
x.BackSurface = "Smooth"
x.FrontSurface = "Smooth"
x.TopSurface = "Smooth"
x.Size = Vector3.new(6, 0.4, 5)
x.BrickColor = color
x.Position = Vector3.new(-13, 7.79, 2.5)
x.Parent = md

x = Instance.new("Part")
x.formFactor = "Plate"
x.BackSurface = "Smooth"
x.FrontSurface = "Smooth"
x.TopSurface = "Weld"
x.Size = Vector3.new(1, 1.2, 3)
x.BrickColor = color
x.Name = "Engine"
x.Position = Vector3.new(-10.5, 6.99, 6.5)
x.Parent = md

x = Instance.new("Part")
x.formFactor = "Plate"
x.BackSurface = "Smooth"
x.FrontSurface = "Smooth"
x.TopSurface = "Weld"
x.Size = Vector3.new(2, 1.2, 2)
x.BrickColor = color
x.Position = Vector3.new(-13, 6.99, 10)
x.Parent = md

x = Instance.new("Part")
x.formFactor = "Plate"
x.BackSurface = "Smooth"
x.FrontSurface = "Smooth"
x.TopSurface = "Smooth"
x.Size = Vector3.new(6, 0.4, 4)
x.BrickColor = color
x.Position = Vector3.new(-13, 7.79, 10)
x.Parent = md

x = Instance.new("Part")
x.formFactor = "Plate"
x.BackSurface = "Smooth"
x.FrontSurface = "Smooth"
x.TopSurface = "Weld"
x.Size = Vector3.new(6, 1.6, 1)
x.BrickColor = color
x.Position = Vector3.new(-13, 6.79, 0.5)
x.Parent = md

x = Instance.new("Part")
x.formFactor = "Plate"
x.BackSurface = "Smooth"
x.FrontSurface = "Smooth"
x.TopSurface = "Weld"
x.Size = Vector3.new(6, 1.2, 1)
x.BrickColor = color
x.Position = Vector3.new(-13, 6.99, 8.5)
x.Parent = md

x = Instance.new("Part")
x.formFactor = "Plate"
x.BackSurface = "Smooth"
x.FrontSurface = "Smooth"
x.TopSurface = "Smooth"
x.BottomSurface = "Weld"
x.Size = Vector3.new(6, 1.2, 1)
x.BrickColor = BrickColor.White()
x.Position = Vector3.new(-13, 8.6, 4.5)
x.Transparency = 0.5
x.Parent = md

x = Instance.new("Seat")
x.formFactor = "Plate"
x.BackSurface = "Smooth"
x.FrontSurface = "Smooth"
x.TopSurface = "Smooth"
x.BottomSurface = "Weld"
x.Size = Vector3.new(2, 0.4, 2)
x.BrickColor = colorB
x.Name = "Seat2"
x.Position = Vector3.new(-12, 6.6, 7)
x.Parent = md

x = Instance.new("Seat")
x.formFactor = "Plate"
x.BackSurface = "Smooth"
x.FrontSurface = "Smooth"
x.TopSurface = "Smooth"
x.BottomSurface = "Weld"
x.Size = Vector3.new(2, 0.4, 2)
x.BrickColor = colorB
x.Position = Vector3.new(-14, 6.6, 7)
x.Parent = md

x = Instance.new("Part")
x.formFactor = "Plate"
x.BackSurface = "Smooth"
x.FrontSurface = "Smooth"
x.TopSurface = "Smooth"
x.BottomSurface = "Weld"
x.Size = Vector3.new(1, 0.4, 2)
x.BrickColor = color
x.Position = Vector3.new(-11.5, 8.2, 11)
x.Parent = md

x = Instance.new("Part")
x.formFactor = "Plate"
x.BackSurface = "Smooth"
x.FrontSurface = "Smooth"
x.TopSurface = "Smooth"
x.BottomSurface = "Weld"
x.Size = Vector3.new(2, 0.4, 2)
x.BrickColor = color
x.Position = Vector3.new(-13, 8.2, 2)
x.Parent = md

x = Instance.new("Part")
x.formFactor = "Plate"
x.BackSurface = "Smooth"
x.FrontSurface = "Smooth"
x.TopSurface = "Smooth"
x.BottomSurface = "Weld"
x.Size = Vector3.new(6, 0.4, 1)
x.BrickColor = color
x.Position = Vector3.new(-13, 8.6, 11.5)
x.Parent = md

x = Instance.new("Part")
x.formFactor = "Plate"
x.BackSurface = "Smooth"
x.FrontSurface = "Smooth"
x.TopSurface = "Smooth"
x.BottomSurface = "Weld"
x.Size = Vector3.new(1, 0.4, 2)
x.BrickColor = color
x.Position = Vector3.new(-14.5, 8.2, 11)
x.Parent = md

r = Instance.new("Part")
r.formFactor = "Plate"
r.BackSurface = "Weld"
r.FrontSurface = "Smooth"
r.TopSurface = "Smooth"
r.BottomSurface = "Smooth"
r.Size = Vector3.new(1, 0.8, 1)
r.BrickColor = color
r.Position = Vector3.new(-10.5, 7.2, -0.5)
r.Transparency = 1
r.Parent = md

s = Instance.new("Part")
s.formFactor = "Plate"
s.BackSurface = "Weld"
s.FrontSurface = "Smooth"
s.TopSurface = "Smooth"
s.BottomSurface = "Smooth"
s.Size = Vector3.new(1, 0.8, 1)
s.BrickColor = color
s.Position = Vector3.new(-15.5, 7.2, -0.5)
s.Transparency = 1
s.Parent = md

md:makeJoints()

b = md:children()
for i=1,#b do
if (b[i].className == "Part") then
b[i].Locked = true
end
end

t = Instance.new("HopperBin")
t.Name = "VI Car tool"
t.Parent = receiver.Backpack

s = Instance.new("Script")
s.Source = [[bin=script.Parent
plane=nil
hold=false
local debounce = false
local planedebounce = false
local stuntdebounce = false
local controlling = false

function onSelected(mouse)
mouse.KeyDown:connect(onKeyDown)
while true do
mouse.Icon = "rbxasset://textures\\W_Key.png"
wait(1)
mouse.Icon = "rbxasset://textures\\A_Key.png"
wait(1)
mouse.Icon = "rbxasset://textures\\S_Key.png"
wait(1)
mouse.Icon = "rbxasset://textures\\D_Key.png"
wait(1)
end
end

function onKeyDown(key)
if (key~=nil) then
key = key:lower()
local vehicle = script.Parent.Parent.Parent.Character:findFirstChild("Plane")
if (vehicle==nil) then return end
plane = vehicle.Parts
local engine = vehicle.Parts.Engine

if (key=="x") and planedebounce == false then
engine.Parent.backAxle.RightParamB = 0
engine.Parent.backAxle.LeftParamB = 0
end
if (key=="s" and engine.Parent.backAxle.RightParamB == 0 and engine.Parent.backAxle.LeftParamB == 0) then
engine.Parent.backAxle.RightParamB = 1
engine.Parent.backAxle.LeftParamB = -1
end
if (key=="s" and engine.Parent.backAxle.RightParamB == 0 and engine.Parent.backAxle.LeftParamB ~= 0) then
engine.Parent.backAxle.RightParamB = engine.Parent.backAxle.LeftParamB * -1
end
if (key=="s" and engine.Parent.backAxle.RightParamB ~= 0 and engine.Parent.backAxle.LeftParamB == 0) then
engine.Parent.backAxle.LeftParamB = engine.Parent.backAxle.RightParamB * -1
end
if (key=="w" and engine.Parent.backAxle.RightParamB == 0 and engine.Parent.backAxle.LeftParamB == 0) then
engine.Parent.backAxle.RightParamB = -1
engine.Parent.backAxle.LeftParamB = 1
end
if (key=="w" and engine.Parent.backAxle.RightParamB == 0 and engine.Parent.backAxle.LeftParamB ~= 0) then
engine.Parent.backAxle.RightParamB = engine.Parent.backAxle.LeftParamB * -1
end
if (key=="w" and engine.Parent.backAxle.RightParamB ~= 0 and engine.Parent.backAxle.LeftParamB == 0) then
engine.Parent.backAxle.LeftParamB = engine.Parent.backAxle.RightParamB * -1
end
if (key=="d") then
engine.Parent.backAxle.LeftParamB = engine.Parent.backAxle.RightParamB * -1
engine.Parent.backAxle.RightParamB = 0
end
if (key=="a") then
engine.Parent.backAxle.RightParamB = engine.Parent.backAxle.LeftParamB * -1
engine.Parent.backAxle.LeftParamB = 0
end
if (key=="n") then
engine.Parent.backAxle.RightParamB = engine.Parent.backAxle.RightParamB + 0.1
engine.Parent.backAxle.LeftParamB = engine.Parent.backAxle.LeftParamB - 0.1
end
if (key=="m") then
engine.Parent.backAxle.RightParamB = engine.Parent.backAxle.RightParamB - 0.1
engine.Parent.backAxle.LeftParamB = engine.Parent.backAxle.LeftParamB + 0.1
end
end
end

bin.Selected:connect(onSelected)]]

s.Disabled = false
s.Parent = t

--Removing this message or editing it's content is punishable by law.

msg = Instance.new("Message")
msg.Text = "MrHavic's script builder car loaded for " .. receiver.Name
msg.Parent = game.Workspace
wait(3)
msg.Parent = nil
avatar
MrHavik
Admin of HavikMotion
Admin of HavikMotion

Posts : 72
Join date : 2012-10-27
Age : 20
Location : Unknown

View user profile http://havikmotion.forumotion.com

Back to top Go down

Thank you but......

Post  matteo101man on Sat Nov 03, 2012 5:46 pm

thank you but the problem is that it just spawns a red brick with a motor or something behind it that breaks instantly
avatar
matteo101man

Posts : 11
Join date : 2012-11-01

View user profile

Back to top Go down

Re: Car Script: REQUESTED BY MATTEO MAN

Post  MrHavik on Sat Nov 03, 2012 5:54 pm

matteo101man wrote:thank you but the problem is that it just spawns a red brick with a motor or something behind it that breaks instantly
Make another version. Invite your friends for a tank script Smile
avatar
MrHavik
Admin of HavikMotion
Admin of HavikMotion

Posts : 72
Join date : 2012-10-27
Age : 20
Location : Unknown

View user profile http://havikmotion.forumotion.com

Back to top Go down

Ok

Post  matteo101man on Sat Nov 03, 2012 6:01 pm

ok even though im a beginner in lua its worth trying and btw thank you Smile
avatar
matteo101man

Posts : 11
Join date : 2012-11-01

View user profile

Back to top Go down

Re: Car Script: REQUESTED BY MATTEO MAN

Post  MrHavik on Sat Nov 03, 2012 6:04 pm

matteo101man wrote:ok even though im a beginner in lua its worth trying and btw thank you Smile
No i meant ill make another version
avatar
MrHavik
Admin of HavikMotion
Admin of HavikMotion

Posts : 72
Join date : 2012-10-27
Age : 20
Location : Unknown

View user profile http://havikmotion.forumotion.com

Back to top Go down

Re: Car Script: REQUESTED BY MATTEO MAN

Post  matteo101man on Sat Nov 03, 2012 6:07 pm

oh ok and (random) also have you thought about trying to add a chatbox or something to this website,i think it would be cool if it had one thanks
avatar
matteo101man

Posts : 11
Join date : 2012-11-01

View user profile

Back to top Go down

Re: Car Script: REQUESTED BY MATTEO MAN

Post  MrHavik on Sat Nov 03, 2012 6:11 pm

matteo101man wrote:oh ok and (random) also have you thought about trying to add a chatbox or something to this website,i think it would be cool if it had one thanks
Im already on that
avatar
MrHavik
Admin of HavikMotion
Admin of HavikMotion

Posts : 72
Join date : 2012-10-27
Age : 20
Location : Unknown

View user profile http://havikmotion.forumotion.com

Back to top Go down

:|

Post  matteo101man on Sat Nov 03, 2012 6:33 pm

i say thanks and thank you to much and right now i noticed
avatar
matteo101man

Posts : 11
Join date : 2012-11-01

View user profile

Back to top Go down

Re: Car Script: REQUESTED BY MATTEO MAN

Post  MrHavik on Sat Nov 03, 2012 7:05 pm

matteo101man wrote:i say thanks and thank you to much and right now i noticed
lol

Invite friends for a tank script Very Happy
avatar
MrHavik
Admin of HavikMotion
Admin of HavikMotion

Posts : 72
Join date : 2012-10-27
Age : 20
Location : Unknown

View user profile http://havikmotion.forumotion.com

Back to top Go down

Re: Car Script: REQUESTED BY MATTEO MAN

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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