Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Created with ttyyuu12345's compiler
- --Errors:
- Create = function(itemClass,tabl)
- local item = Instance.new(itemClass)
- for i,v in pairs(tabl) do
- local a,b = ypcall(function() return item[i] end)
- if a then
- item[i] = tabl[i]
- end
- end
- return item
- end
- function runDummyScript(f,scri)
- local oldenv = getfenv(f)
- local newenv = setmetatable({}, {
- __index = function(_, k)
- if k:lower() == 'script' then
- return scri
- else
- return oldenv[k]
- end
- end
- })
- setfenv(f, newenv)
- ypcall(function() f() end)
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- mas.Name = "CompiledModel"
- o1 = Create("Model",{
- ["Parent"] = mas,
- })
- o2 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(26.4227295, 2.66054916, -13.432435),
- ["Rotation"] = Vector3.new(-0.0241738874, 0.274998069, 90.0016556),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(0.00407344196, 0.00816245843, -0.00538428081),
- ["CFrame"] = CFrame.new(26.4227295, 2.66054916, -13.432435, -2.89382788e-005, -0.999988496, 0.00479960302, 0.999999344, -2.69108059e-005, 0.000421908335, -0.000421774777, 0.00479962304, 0.999986708),
- ["FormFactor"] = Enum.FormFactor.Symmetric,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(3, 1, 3),
- ["BackSurface"] = Enum.SurfaceType.Weld,
- ["BottomSurface"] = Enum.SurfaceType.Smooth,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o3 = Create("SpecialMesh",{
- ["Parent"] = o2,
- ["MeshType"] = Enum.MeshType.Wedge,
- })
- o4 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o2,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o4)
- end))
- o5 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(30.9346199, 4.56172371, -10.9548693),
- ["Rotation"] = Vector3.new(-0.0241738874, 0.274998069, 0.00165806036),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(0.00263186963, 0.00771822594, -0.00241815206),
- ["CFrame"] = CFrame.new(30.9346199, 4.56172371, -10.9548693, 0.999988496, -2.89382788e-005, 0.00479960302, 2.69108059e-005, 0.999999344, 0.000421908335, -0.00479962304, -0.000421774777, 0.999986708),
- ["CanCollide"] = false,
- ["FormFactor"] = Enum.FormFactor.Plate,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(10, 0.800000012, 2),
- ["BackSurface"] = Enum.SurfaceType.Weld,
- ["BottomSurface"] = Enum.SurfaceType.Weld,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o6 = Create("SpecialMesh",{
- ["Parent"] = o5,
- ["MeshType"] = Enum.MeshType.Wedge,
- })
- o7 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o5,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o7)
- end))
- o8 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(30.9322758, 2.66151428, -11.4540596),
- ["Rotation"] = Vector3.new(-0.0241738874, 0.274998128, 0.00165805197),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(0.00326095917, 0.00801011827, -0.00353221782),
- ["CFrame"] = CFrame.new(30.9322758, 2.66151428, -11.4540596, 0.999988496, -2.89381333e-005, 0.00479960395, 2.69109532e-005, 0.999999404, 0.000421908422, -0.00479962304, -0.000421774806, 0.999986887),
- ["FormFactor"] = Enum.FormFactor.Symmetric,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(10, 3, 1),
- ["BottomSurface"] = Enum.SurfaceType.Smooth,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o9 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o8,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o9)
- end))
- o10 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(30.9226837, 2.66067004, -13.4540319),
- ["Rotation"] = Vector3.new(-90.0241699, -0.00165800785, 0.274998248),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(0.00408228207, 0.00917951949, -0.00353665068),
- ["CFrame"] = CFrame.new(30.9226837, 2.66067004, -13.4540319, 0.999988496, -0.00479960674, -2.89376967e-005, 2.69113953e-005, -0.000421908684, 0.999999583, -0.00479962304, -0.999987423, -0.000421774923),
- ["FormFactor"] = Enum.FormFactor.Symmetric,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(8, 3, 3),
- ["BottomSurface"] = Enum.SurfaceType.Weld,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o11 = Create("SpecialMesh",{
- ["Parent"] = o10,
- ["MeshType"] = Enum.MeshType.Wedge,
- })
- o12 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o10,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o12)
- end))
- o13 = Create("Part",{
- ["Name"] = "Button1",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright violet"),
- ["Position"] = Vector3.new(23, 0.595140994, -14),
- ["Rotation"] = Vector3.new(-0, -90, 0),
- ["Anchored"] = true,
- ["CFrame"] = CFrame.new(23, 0.595140994, -14, 0, 0, -1, 0, 1, -0, 1, 0, -0),
- ["FormFactor"] = Enum.FormFactor.Plate,
- ["Size"] = Vector3.new(4, 0.800000012, 4),
- ["BottomSurface"] = Enum.SurfaceType.Smooth,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.419608, 0.196078, 0.486275),
- })
- o14 = Create("Script",{
- ["Name"] = "Activate",
- ["Parent"] = o13,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- button = script.Parent
- regen = button.Parent.Regen
- local debounce = false
- function onTouch(hit)
- local h = hit.Parent:FindFirstChild("Humanoid")
- if h ~= nil and debounce == false then
- debounce = true
- button.BrickColor = BrickColor.Black()
- regen.Value = 1
- wait()
- regen.Value = 0
- wait(7)
- button.BrickColor = BrickColor.new(104)
- debounce = false
- end
- end
- button.Touched:connect(onTouch)
- end,o14)
- end))
- o15 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o13,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o15)
- end))
- o16 = Create("Part",{
- ["Name"] = "Smooth Block Model",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(28, 2.39513707, -15.5999975),
- ["Rotation"] = Vector3.new(-90, 90, 0),
- ["Anchored"] = true,
- ["CFrame"] = CFrame.new(28, 2.39513707, -15.5999975, -0, -0, 1, -1, -0, 0, -0, -1, 0),
- ["Size"] = Vector3.new(2, 1.20000005, 2),
- ["BottomSurface"] = Enum.SurfaceType.Weld,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o17 = Create("SpecialMesh",{
- ["Parent"] = o16,
- ["MeshType"] = Enum.MeshType.Wedge,
- })
- o18 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o16,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o18)
- end))
- o19 = Create("Part",{
- ["Name"] = "Smooth Block Model",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(34, 2.38995409, -15.5999975),
- ["Rotation"] = Vector3.new(-90, -90, 0),
- ["Anchored"] = true,
- ["CFrame"] = CFrame.new(34, 2.38995409, -15.5999975, 7.61277789e-019, -1.19142998e-019, -1, 1, 5.28964011e-018, 7.61277789e-019, 5.28964011e-018, -1, 1.19142998e-019),
- ["Size"] = Vector3.new(2, 1.20000005, 2),
- ["BottomSurface"] = Enum.SurfaceType.Weld,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o20 = Create("SpecialMesh",{
- ["Parent"] = o19,
- ["MeshType"] = Enum.MeshType.Wedge,
- })
- o21 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o19,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o21)
- end))
- o22 = Create("Part",{
- ["Name"] = "Smooth Block Model",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(30.9226074, 4.76056004, -13.4548836),
- ["Rotation"] = Vector3.new(-0.0204525962, 0.273823172, 0.00274687447),
- ["RotVelocity"] = Vector3.new(0.012324336, -0.00660226587, -0.00843543652),
- ["Velocity"] = Vector3.new(0.00244965777, -0.0256919079, 0.0264996756),
- ["Anchored"] = true,
- ["CFrame"] = CFrame.new(30.9226074, 4.76056004, -13.4548836, 0.999988556, -4.79414521e-005, 0.00477909762, 4.62360258e-005, 0.99999994, 0.000356961042, -0.00477911439, -0.000356736011, 0.999988496),
- ["Size"] = Vector3.new(4, 1.20000005, 3),
- ["BackSurface"] = Enum.SurfaceType.Glue,
- ["BottomSurface"] = Enum.SurfaceType.Glue,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o23 = Create("SpecialMesh",{
- ["Parent"] = o22,
- ["MeshType"] = Enum.MeshType.Wedge,
- })
- o24 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o22,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o24)
- end))
- o25 = Create("Part",{
- ["Name"] = "Smooth Block Model",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Light stone grey"),
- ["Transparency"] = 0.40000000596046,
- ["Position"] = Vector3.new(27.9226532, 4.76061678, -13.4405279),
- ["Rotation"] = Vector3.new(-0.0240184013, 0.274550021, 0.00172842201),
- ["Anchored"] = true,
- ["CFrame"] = CFrame.new(27.9226532, 4.76061678, -13.4405279, 0.999988258, -3.01663003e-005, 0.00479178363, 2.8157483e-005, 0.999999881, 0.000419195305, -0.00479179993, -0.000419055345, 0.999988377),
- ["Size"] = Vector3.new(2, 1.20000005, 3),
- ["BackSurface"] = Enum.SurfaceType.Glue,
- ["BottomSurface"] = Enum.SurfaceType.Glue,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.898039, 0.894118, 0.87451),
- })
- o26 = Create("SpecialMesh",{
- ["Parent"] = o25,
- ["MeshType"] = Enum.MeshType.Wedge,
- })
- o27 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o25,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o27)
- end))
- o28 = Create("Part",{
- ["Name"] = "Smooth Block Model",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Light stone grey"),
- ["Transparency"] = 0.40000000596046,
- ["Position"] = Vector3.new(33.9225845, 4.76072502, -13.4693317),
- ["Rotation"] = Vector3.new(-0.0240837075, 0.273946673, 0.00137095316),
- ["Anchored"] = true,
- ["CFrame"] = CFrame.new(33.9225845, 4.76072502, -13.4693317, 0.999988556, -2.39273722e-005, 0.00478125317, 2.1917891e-005, 0.99999994, 0.000420335185, -0.00478126248, -0.00042022561, 0.999988496),
- ["Size"] = Vector3.new(2, 1.20000005, 3),
- ["BackSurface"] = Enum.SurfaceType.Glue,
- ["BottomSurface"] = Enum.SurfaceType.Glue,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.898039, 0.894118, 0.87451),
- })
- o29 = Create("SpecialMesh",{
- ["Parent"] = o28,
- ["MeshType"] = Enum.MeshType.Wedge,
- })
- o30 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o28,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o30)
- end))
- o31 = Create("Part",{
- ["Name"] = "Smooth Block Model",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(31, 2.5899539, -15.5),
- ["Rotation"] = Vector3.new(3.03074053e-016, 6.82639114e-018, -4.36180046e-017),
- ["Anchored"] = true,
- ["CFrame"] = CFrame.new(31, 2.5899539, -15.5, 1, 7.61277789e-019, 1.19142998e-019, -7.61277789e-019, 1, -5.28964011e-018, -1.19142998e-019, 5.28964011e-018, 1),
- ["Size"] = Vector3.new(4, 2.4000001, 1),
- ["BackSurface"] = Enum.SurfaceType.Weld,
- ["BottomSurface"] = Enum.SurfaceType.Glue,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o32 = Create("SpecialMesh",{
- ["Parent"] = o31,
- ["MeshType"] = Enum.MeshType.Wedge,
- })
- o33 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o31,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o33)
- end))
- o34 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(30.9370747, 2.661937, -10.454071),
- ["Rotation"] = Vector3.new(-0.0241738874, 0.27499795, 0.001658077),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(0.00285029644, 0.00742541673, -0.00352999987),
- ["CFrame"] = CFrame.new(30.9370747, 2.661937, -10.454071, 0.999988496, -2.89385698e-005, 0.00479960116, 2.69105112e-005, 0.999999225, 0.000421908189, -0.00479962304, -0.000421774719, 0.999986351),
- ["CanCollide"] = false,
- ["FormFactor"] = Enum.FormFactor.Symmetric,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(10, 3, 1),
- ["BottomSurface"] = Enum.SurfaceType.Smooth,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o35 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o34,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o35)
- end))
- o36 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(35.4226227, 2.66079211, -13.4756289),
- ["Rotation"] = Vector3.new(-0.0241738893, 0.27499795, -89.9983444),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(0.00409112219, 0.0101965778, -0.0016890259),
- ["CFrame"] = CFrame.new(35.4226227, 2.66079211, -13.4756289, 2.89385698e-005, 0.999988496, 0.00479960116, -0.999999225, 2.69105112e-005, 0.000421908218, 0.000421774748, -0.00479962304, 0.999986351),
- ["FormFactor"] = Enum.FormFactor.Symmetric,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(3, 1, 3),
- ["BackSurface"] = Enum.SurfaceType.Weld,
- ["BottomSurface"] = Enum.SurfaceType.Smooth,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o37 = Create("SpecialMesh",{
- ["Parent"] = o36,
- ["MeshType"] = Enum.MeshType.Wedge,
- })
- o38 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o36,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o38)
- end))
- o39 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(30.9442139, 4.76256561, -8.95497513),
- ["Rotation"] = Vector3.new(-0.0241738893, 0.274996817, 0.00165826862),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(0.00176593824, 0.00654887082, -0.00229656417),
- ["CFrame"] = CFrame.new(30.9442139, 4.76256561, -8.95497513, 0.999988496, -2.89419149e-005, 0.00479958113, 2.69071261e-005, 0.999997854, 0.000421906472, -0.00479962351, -0.000421774079, 0.999982238),
- ["FormFactor"] = Enum.FormFactor.Plate,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(10, 0.400000006, 2),
- ["BottomSurface"] = Enum.SurfaceType.Weld,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o40 = Create("SpecialMesh",{
- ["Parent"] = o39,
- ["MeshType"] = Enum.MeshType.Wedge,
- })
- o41 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o39,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o41)
- end))
- o42 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(30.9490318, 4.36299276, -7.95482349),
- ["Rotation"] = Vector3.new(-0.0241738874, 0.27499795, 0.001658077),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(0.00144448958, 0.00596407801, -0.00252864743),
- ["CFrame"] = CFrame.new(30.9490318, 4.36299276, -7.95482349, 0.999988496, -2.89385698e-005, 0.00479960116, 2.69105112e-005, 0.999999225, 0.000421908189, -0.00479962304, -0.000421774719, 0.999986351),
- ["FormFactor"] = Enum.FormFactor.Plate,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(10, 0.400000006, 4),
- ["BottomSurface"] = Enum.SurfaceType.Hinge,
- ["FrontSurface"] = Enum.SurfaceType.Weld,
- ["TopSurface"] = Enum.SurfaceType.Weld,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o43 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o42,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o43)
- end))
- o44 = Create("Part",{
- ["Name"] = "Engine",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(30.9491882, 2.66557693, -7.95410681),
- ["Rotation"] = Vector3.new(-0.0237888172, 2.37317777, 0.00409172568),
- ["RotVelocity"] = Vector3.new(-0.00259006186, 0.0120498231, 0.00164121145),
- ["Velocity"] = Vector3.new(0.0546290465, 0.0387015305, 0.0111816591),
- ["CFrame"] = CFrame.new(30.9491882, 2.66557693, -7.95410681, 0.999142349, -7.13528352e-005, 0.0414079241, 5.42217931e-005, 0.99999994, 0.000414837064, -0.0414079502, -0.000412236055, 0.99914223),
- ["FormFactor"] = Enum.FormFactor.Symmetric,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(2, 3, 4),
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o45 = Create("IntValue",{
- ["Name"] = "Count",
- ["Parent"] = o44,
- })
- o46 = Create("Script",{
- ["Parent"] = o44,
- ["Disabled"] = true,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- model = script.Parent.Parent.Parent
- backup = model:clone()
- local debounce = false
- function onTouch(part)
- if (part.Name == "Safe") and (debounce == false) and (script.Parent.Count.Value == 0) then
- debounce = true
- wait(2)
- model = backup:clone()
- model.Parent = game.Workspace
- model:makeJoints()
- script.Parent.Count.Value = 1
- debounce = false
- end
- end
- script.Parent.Touched:connect(onTouch)
- end,o46)
- end))
- o47 = Create("BodyGyro",{
- ["Parent"] = o44,
- ["maxTorque"] = Vector3.new(0, 0, 0),
- ["MaxTorque"] = Vector3.new(0, 0, 0),
- })
- o48 = Create("BodyPosition",{
- ["Parent"] = o44,
- ["Position"] = Vector3.new(-1.5, 3, -48),
- ["position"] = Vector3.new(-1.5, 3, -48),
- })
- o49 = Create("BodyVelocity",{
- ["Name"] = "Drift",
- ["Parent"] = o44,
- ["Velocity"] = Vector3.new(0, 0, 0),
- ["velocity"] = Vector3.new(0, 0, 0),
- })
- o50 = Create("Part",{
- ["Name"] = "r1",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Black"),
- ["Position"] = Vector3.new(33.9465981, 2.17914009, -8.07807541),
- ["Rotation"] = Vector3.new(177.766663, -2.36328077, 179.723846),
- ["RotVelocity"] = Vector3.new(-0.00262437644, -0.00938839372, -0.0045224335),
- ["Velocity"] = Vector3.new(-0.036915198, -0.0857948661, 0.00106593408),
- ["CFrame"] = CFrame.new(33.9465981, 2.17914009, -8.07807541, -0.999137819, -0.00481563015, -0.0412353352, -0.00320917275, 0.999236524, -0.0389362052, 0.0413913541, -0.0387703031, -0.998390496),
- ["FormFactor"] = Enum.FormFactor.Symmetric,
- ["Shape"] = Enum.PartType.Cylinder,
- ["Size"] = Vector3.new(4, 4, 4),
- ["BottomSurface"] = Enum.SurfaceType.Smooth,
- ["RightSurface"] = Enum.SurfaceType.Motor,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.105882, 0.164706, 0.207843),
- })
- o51 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o50,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o51)
- end))
- o52 = Create("Part",{
- ["Name"] = "l1",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Black"),
- ["Position"] = Vector3.new(27.9518204, 2.1790359, -7.8296752),
- ["Rotation"] = Vector3.new(4.87922573, 2.34957361, -0.381645203),
- ["RotVelocity"] = Vector3.new(-0.00079275429, -0.0129950475, 0.00951036438),
- ["Velocity"] = Vector3.new(-0.0373558775, -0.0793795735, 0.00459635723),
- ["CFrame"] = CFrame.new(27.9518204, 2.1790359, -7.8296752, 0.999137104, 0.00665531587, 0.0409963019, -0.00314988731, 0.996377349, -0.084984161, -0.0414133817, 0.0847816989, 0.995538533),
- ["FormFactor"] = Enum.FormFactor.Symmetric,
- ["Shape"] = Enum.PartType.Cylinder,
- ["Size"] = Vector3.new(4, 4, 4),
- ["BottomSurface"] = Enum.SurfaceType.Smooth,
- ["RightSurface"] = Enum.SurfaceType.Motor,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.105882, 0.164706, 0.207843),
- })
- o53 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(30.9538116, 4.76340961, -6.95504141),
- ["Rotation"] = Vector3.new(179.97583, -0.274998069, 179.998337),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(0.000944631232, 0.00537949335, -0.00229212898),
- ["CFrame"] = CFrame.new(30.9538116, 4.76340961, -6.95504141, -0.999988496, -2.89266482e-005, -0.00479960302, -2.68985896e-005, 0.999999225, -0.00042190816, 0.0047996249, -0.000421774748, -0.999986351),
- ["FormFactor"] = Enum.FormFactor.Plate,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(10, 0.400000006, 2),
- ["BackSurface"] = Enum.SurfaceType.Weld,
- ["BottomSurface"] = Enum.SurfaceType.Weld,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o54 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o53,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o54)
- end))
- o55 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(30.961071, 2.96405602, -5.45425844),
- ["Rotation"] = Vector3.new(-0.0241738893, 0.274996132, 0.00165838539),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(0.00073007436, 0.00450198632, -0.0033431726),
- ["CFrame"] = CFrame.new(30.961071, 2.96405602, -5.45425844, 0.999988496, -2.89439522e-005, 0.00479956903, 2.6905067e-005, 0.99999702, 0.000421905424, -0.00479962397, -0.000421773759, 0.999979734),
- ["CanCollide"] = false,
- ["FormFactor"] = Enum.FormFactor.Symmetric,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(10, 4, 1),
- ["BottomSurface"] = Enum.SurfaceType.Smooth,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o56 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o55,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o56)
- end))
- o57 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright blue"),
- ["Transparency"] = 0.30000001192093,
- ["Position"] = Vector3.new(30.9585762, 5.96383238, -5.95551777),
- ["Rotation"] = Vector3.new(-0.0241738912, 0.274997383, 0.001658177),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(0.00026631396, 0.00479505677, -0.00158698997),
- ["CFrame"] = CFrame.new(30.9585762, 5.96383238, -5.95551777, 0.999988496, -2.8940316e-005, 0.00479959091, 2.69087468e-005, 0.99999851, 0.000421907345, -0.00479962351, -0.000421774457, 0.999984205),
- ["CanCollide"] = false,
- ["FormFactor"] = Enum.FormFactor.Symmetric,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(8, 2, 4),
- ["BottomSurface"] = Enum.SurfaceType.Weld,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.0509804, 0.411765, 0.67451),
- })
- o58 = Create("SpecialMesh",{
- ["Parent"] = o57,
- ["MeshType"] = Enum.MeshType.Wedge,
- })
- o59 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o57,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o59)
- end))
- o60 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(34.4705315, 5.76497507, -3.47224236),
- ["Rotation"] = Vector3.new(-0.0241738949, 0.274993777, 0.00165877689),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(-0.000708865817, 0.00412428984, -0.000261562585),
- ["CFrame"] = CFrame.new(34.4705315, 5.76497507, -3.47224236, 0.999988496, -2.89507843e-005, 0.00479952805, 2.68981512e-005, 0.999994218, 0.000421901961, -0.0047996249, -0.000421772565, 0.99997133),
- ["CanCollide"] = false,
- ["FormFactor"] = Enum.FormFactor.Plate,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(1, 1.60000002, 1),
- ["BottomSurface"] = Enum.SurfaceType.Weld,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o61 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o60,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o61)
- end))
- o62 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(35.4778061, 3.16563177, -1.9759686),
- ["Rotation"] = Vector3.new(-179.678925, 89.725174, 179.654388),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(-0.000743009965, 0.00347263203, -0.00137064443),
- ["CFrame"] = CFrame.new(35.4778061, 3.16563177, -1.9759686, -0.00479952432, -2.895137e-005, 0.999988496, -0.000421901612, 0.99999398, 2.689756e-005, -0.999970615, -0.000421772478, -0.0047996249),
- ["CanCollide"] = false,
- ["FormFactor"] = Enum.FormFactor.Plate,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(6, 3.60000014, 1),
- ["BottomSurface"] = Enum.SurfaceType.Weld,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o63 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o62,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o63)
- end))
- o64 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(34.4753647, 4.36540794, -2.47170997),
- ["Rotation"] = Vector3.new(-179.678818, 89.725174, 179.65448),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(-0.000807267556, 0.00353927747, -0.00107941567),
- ["CFrame"] = CFrame.new(34.4753647, 4.36540794, -2.47170997, -0.00479956996, -2.89438049e-005, 0.999988496, -0.000421905512, 0.999997079, 2.69052143e-005, -0.999979913, -0.000421773788, -0.00479962397),
- ["CanCollide"] = false,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(5, 1.20000005, 1),
- ["BottomSurface"] = Enum.SurfaceType.Weld,
- ["LeftSurface"] = Enum.SurfaceType.Weld,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o65 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o64,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o65)
- end))
- o66 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(27.4706154, 5.76478624, -3.43863916),
- ["Rotation"] = Vector3.new(-0.0241738949, 0.274993777, 0.00165877689),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(-0.000722620229, 0.00254219235, -0.00313564972),
- ["CFrame"] = CFrame.new(27.4706154, 5.76478624, -3.43863916, 0.999988496, -2.89507843e-005, 0.00479952805, 2.68981512e-005, 0.999994218, 0.000421901961, -0.0047996249, -0.000421772565, 0.99997133),
- ["CanCollide"] = false,
- ["FormFactor"] = Enum.FormFactor.Plate,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(1, 1.60000002, 1),
- ["BottomSurface"] = Enum.SurfaceType.Weld,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o67 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o66,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o67)
- end))
- o68 = Create("Seat",{
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Reddish brown"),
- ["Position"] = Vector3.new(28.985117, 1.56610036, -0.444140196),
- ["Rotation"] = Vector3.new(-0.0241738912, 0.274993569, 0.00165881042),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(-0.00101491448, 0.00112612057, -0.00497333938),
- ["CFrame"] = CFrame.new(28.985117, 1.56610036, -0.444140196, 0.999988496, -2.895137e-005, 0.00479952432, 2.689756e-005, 0.99999398, 0.000421901612, -0.0047996249, -0.000421772478, 0.999970615),
- ["FormFactor"] = Enum.FormFactor.Plate,
- ["Size"] = Vector3.new(2, 0.400000006, 1),
- ["BackSurface"] = Enum.SurfaceType.Weld,
- ["BottomSurface"] = Enum.SurfaceType.Weld,
- ["FrontSurface"] = Enum.SurfaceType.Weld,
- ["LeftSurface"] = Enum.SurfaceType.Weld,
- ["RightSurface"] = Enum.SurfaceType.Weld,
- ["TopSurface"] = Enum.SurfaceType.Weld,
- ["Color"] = Color3.new(0.411765, 0.25098, 0.156863),
- })
- o69 = Create("SpecialMesh",{
- ["Parent"] = o68,
- ["MeshType"] = Enum.MeshType.Brick,
- })
- o70 = Create("Seat",{
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Reddish brown"),
- ["Position"] = Vector3.new(32.9850731, 1.56620836, -0.463338733),
- ["Rotation"] = Vector3.new(-0.0241738912, 0.274993569, 0.00165881042),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(-0.00100705621, 0.00203017518, -0.00333100231),
- ["CFrame"] = CFrame.new(32.9850731, 1.56620836, -0.463338733, 0.999988496, -2.895137e-005, 0.00479952432, 2.689756e-005, 0.99999398, 0.000421901612, -0.0047996249, -0.000421772478, 0.999970615),
- ["FormFactor"] = Enum.FormFactor.Plate,
- ["Size"] = Vector3.new(2, 0.400000006, 1),
- ["BackSurface"] = Enum.SurfaceType.Weld,
- ["BottomSurface"] = Enum.SurfaceType.Weld,
- ["FrontSurface"] = Enum.SurfaceType.Weld,
- ["LeftSurface"] = Enum.SurfaceType.Weld,
- ["RightSurface"] = Enum.SurfaceType.Weld,
- ["TopSurface"] = Enum.SurfaceType.Weld,
- ["Color"] = Color3.new(0.411765, 0.25098, 0.156863),
- })
- o71 = Create("SpecialMesh",{
- ["Parent"] = o70,
- ["MeshType"] = Enum.MeshType.Brick,
- })
- o72 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(30.9803219, 1.16574824, -1.45358086),
- ["Rotation"] = Vector3.new(179.97583, -0.274996072, 179.998337),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(-0.000511105056, 0.00216276897, -0.00438868022),
- ["CFrame"] = CFrame.new(30.9803219, 1.16574824, -1.45358086, -0.999988496, -2.89440977e-005, -0.00479956809, -2.69049197e-005, 0.99999696, -0.000421905337, 0.00479962397, -0.00042177373, -0.999979556),
- ["FormFactor"] = Enum.FormFactor.Plate,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(10, 0.400000006, 7),
- ["BackSurface"] = Enum.SurfaceType.Weld,
- ["BottomSurface"] = Enum.SurfaceType.Smooth,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o73 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o72,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o73)
- end))
- o74 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(26.4779167, 3.16539097, -1.93277133),
- ["Rotation"] = Vector3.new(-179.678925, 89.725174, 179.654388),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(-0.000760691881, 0.0014385113, -0.00506589655),
- ["CFrame"] = CFrame.new(26.4779167, 3.16539097, -1.93277133, -0.00479952432, -2.895137e-005, 0.999988496, -0.000421901612, 0.99999398, 2.689756e-005, -0.999970615, -0.000421772478, -0.0047996249),
- ["CanCollide"] = false,
- ["FormFactor"] = Enum.FormFactor.Plate,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(6, 3.60000014, 1),
- ["BottomSurface"] = Enum.SurfaceType.Weld,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o75 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o74,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o75)
- end))
- o76 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(30.9801369, 6.76566076, -1.45595598),
- ["Rotation"] = Vector3.new(-0.0241738781, 0.274996459, 0.00165479386),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(-0.00176005613, 0.00216411892, -0.00110844336),
- ["CFrame"] = CFrame.new(30.9801369, 6.76566076, -1.45595598, 0.999988496, -2.8881268e-005, 0.00479957508, 2.68420881e-005, 0.99999696, 0.000421905163, -0.00479963096, -0.000421773875, 0.999979556),
- ["CanCollide"] = false,
- ["FormFactor"] = Enum.FormFactor.Plate,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(8, 0.400000006, 5),
- ["BottomSurface"] = Enum.SurfaceType.Smooth,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o77 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o76,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o77)
- end))
- o78 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright blue"),
- ["Transparency"] = 0.30000001192093,
- ["Position"] = Vector3.new(27.4825974, 5.76579666, -0.938771427),
- ["Rotation"] = Vector3.new(-0.0241738781, 0.274996459, 0.00165479386),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(-0.0017492238, 0.001080496, -0.00313013815),
- ["CFrame"] = CFrame.new(27.4825974, 5.76579666, -0.938771427, 0.999988496, -2.8881268e-005, 0.00479957508, 2.68420881e-005, 0.99999696, 0.000421905163, -0.00479963096, -0.000421773875, 0.999979556),
- ["CanCollide"] = false,
- ["FormFactor"] = Enum.FormFactor.Plate,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(1, 1.60000002, 4),
- ["BottomSurface"] = Enum.SurfaceType.Weld,
- ["TopSurface"] = Enum.SurfaceType.Weld,
- ["Color"] = Color3.new(0.0509804, 0.411765, 0.67451),
- })
- o79 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o78,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o79)
- end))
- o80 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(27.475462, 4.36521816, -2.43811083),
- ["Rotation"] = Vector3.new(-179.678818, 89.725174, 179.65448),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(-0.000821020047, 0.00195718533, -0.00395349786),
- ["CFrame"] = CFrame.new(27.475462, 4.36521816, -2.43811083, -0.00479956996, -2.89438049e-005, 0.999988496, -0.000421905512, 0.999997079, 2.69052143e-005, -0.999979913, -0.000421773788, -0.00479962397),
- ["CanCollide"] = false,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(5, 1.20000005, 1),
- ["BottomSurface"] = Enum.SurfaceType.Weld,
- ["LeftSurface"] = Enum.SurfaceType.Weld,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o81 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o80,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o81)
- end))
- o82 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright blue"),
- ["Transparency"] = 0.30000001192093,
- ["Position"] = Vector3.new(34.4825172, 5.76597404, -0.972384095),
- ["Rotation"] = Vector3.new(-0.0241738781, 0.274996579, 0.00165398442),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(-0.00173546304, 0.00266260002, -0.00025605649),
- ["CFrame"] = CFrame.new(34.4825172, 5.76597404, -0.972384095, 0.999988496, -2.88671417e-005, 0.00479957694, 2.68279618e-005, 0.99999696, 0.000421905133, -0.00479963282, -0.000421773904, 0.999979556),
- ["CanCollide"] = false,
- ["FormFactor"] = Enum.FormFactor.Plate,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(1, 1.60000002, 4),
- ["BottomSurface"] = Enum.SurfaceType.Weld,
- ["TopSurface"] = Enum.SurfaceType.Weld,
- ["Color"] = Color3.new(0.0509804, 0.411765, 0.67451),
- })
- o83 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o82,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o83)
- end))
- o84 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(30.994648, 3.16698885, 1.54552555),
- ["Rotation"] = Vector3.new(179.97583, -0.274993569, 179.998337),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(-0.0021891431, 0.000409152126, -0.00321051292),
- ["CFrame"] = CFrame.new(30.994648, 3.16698885, 1.54552555, -0.999988496, -2.895137e-005, -0.00479952432, -2.689756e-005, 0.99999398, -0.000421901612, 0.0047996249, -0.000421772478, -0.999970615),
- ["FormFactor"] = Enum.FormFactor.Plate,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(10, 3.60000014, 1),
- ["BottomSurface"] = Enum.SurfaceType.Weld,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o85 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o84,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o85)
- end))
- o86 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright blue"),
- ["Transparency"] = 0.30000001192093,
- ["Position"] = Vector3.new(30.9897499, 5.76652336, 0.544373512),
- ["Rotation"] = Vector3.new(-179.67923, 89.725174, 179.654892),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(-0.00235832529, 0.000994512928, -0.00168977049),
- ["CFrame"] = CFrame.new(30.9897499, 5.76652336, 0.544373512, -0.00479957182, -2.89095206e-005, 0.999988496, -0.00042190525, 0.99999696, 2.68703425e-005, -0.999979556, -0.000421773817, -0.0047996277),
- ["CanCollide"] = false,
- ["FormFactor"] = Enum.FormFactor.Plate,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(1, 1.60000002, 4),
- ["BottomSurface"] = Enum.SurfaceType.Weld,
- ["TopSurface"] = Enum.SurfaceType.Weld,
- ["Color"] = Color3.new(0.0509804, 0.411765, 0.67451),
- })
- o87 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o86,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o87)
- end))
- o88 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(33.4897346, 5.76659107, 0.532374263),
- ["Rotation"] = Vector3.new(-179.67923, 89.725174, 179.654892),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(-0.00235341373, 0.00155954994, -0.000663304818),
- ["CFrame"] = CFrame.new(33.4897346, 5.76659107, 0.532374263, -0.00479957182, -2.89095206e-005, 0.999988496, -0.00042190525, 0.99999696, 2.68703425e-005, -0.999979556, -0.000421773817, -0.0047996277),
- ["CanCollide"] = false,
- ["FormFactor"] = Enum.FormFactor.Plate,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(1, 1.60000002, 1),
- ["BottomSurface"] = Enum.SurfaceType.Weld,
- ["TopSurface"] = Enum.SurfaceType.Weld,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o89 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o88,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o89)
- end))
- o90 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(28.4897861, 5.76645279, 0.556406915),
- ["Rotation"] = Vector3.new(-179.67923, 89.725174, 179.654892),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(-0.00236325013, 0.000429460604, -0.0027162293),
- ["CFrame"] = CFrame.new(28.4897861, 5.76645279, 0.556406915, -0.00479957182, -2.89095206e-005, 0.999988496, -0.00042190525, 0.99999696, 2.68703425e-005, -0.999979556, -0.000421773817, -0.0047996277),
- ["CanCollide"] = false,
- ["FormFactor"] = Enum.FormFactor.Plate,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(1, 1.60000002, 1),
- ["BottomSurface"] = Enum.SurfaceType.Weld,
- ["TopSurface"] = Enum.SurfaceType.Weld,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o91 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o90,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o91)
- end))
- o92 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(30.9898624, 3.1664772, 0.545401335),
- ["Rotation"] = Vector3.new(179.97583, -0.274996638, 179.998352),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(-0.00177840504, 0.000993935973, -0.00321277743),
- ["CFrame"] = CFrame.new(30.9898624, 3.1664772, 0.545401335, -0.999988496, -2.88641786e-005, -0.00479957834, -2.68249969e-005, 0.99999696, -0.000421905279, 0.00479963422, -0.00042177405, -0.999979556),
- ["FormFactor"] = Enum.FormFactor.Plate,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(8, 3.60000014, 1),
- ["BottomSurface"] = Enum.SurfaceType.Weld,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o93 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o92,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o93)
- end))
- o94 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(33.9945068, 6.76706648, 1.52966166),
- ["Rotation"] = Vector3.new(179.97583, -0.274993658, 179.998337),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(-0.00298618362, 0.00108802714, 0.000129999069),
- ["CFrame"] = CFrame.new(33.9945068, 6.76706648, 1.52966166, -0.999988496, -2.89366526e-005, -0.00479952618, -2.68828426e-005, 0.99999398, -0.000421901583, 0.00479962677, -0.000421772507, -0.999970615),
- ["FormFactor"] = Enum.FormFactor.Plate,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(2, 0.400000006, 1),
- ["BottomSurface"] = Enum.SurfaceType.Weld,
- ["TopSurface"] = Enum.SurfaceType.Weld,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o95 = Create("SpecialMesh",{
- ["Parent"] = o94,
- ["MeshType"] = Enum.MeshType.Wedge,
- })
- o96 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o94,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o96)
- end))
- o97 = Create("Part",{
- ["Name"] = "sbm",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Bright red"),
- ["Position"] = Vector3.new(33.994545, 5.76706886, 1.53008914),
- ["Rotation"] = Vector3.new(179.97583, -0.274993658, 179.998337),
- ["RotVelocity"] = Vector3.new(0.000585779315, -0.000410572946, 0.000223204595),
- ["Velocity"] = Vector3.new(-0.00276315515, 0.00108778523, -0.000455763191),
- ["CFrame"] = CFrame.new(33.994545, 5.76706886, 1.53008914, -0.999988496, -2.89366526e-005, -0.00479952618, -2.68828426e-005, 0.99999398, -0.000421901583, 0.00479962677, -0.000421772507, -0.999970615),
- ["FormFactor"] = Enum.FormFactor.Plate,
- ["Friction"] = 0,
- ["Size"] = Vector3.new(2, 1.60000002, 1),
- ["BottomSurface"] = Enum.SurfaceType.Weld,
- ["TopSurface"] = Enum.SurfaceType.Weld,
- ["Color"] = Color3.new(0.768628, 0.156863, 0.109804),
- })
- o98 = Create("Script",{
- ["Name"] = "Breaker",
- ["Parent"] = o97,
- })
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- --[[
- Designed By TGazza
- IMPORTANT!!! this script should be a child of the Collision Detect script or it wont work
- Leave these comments here if you use this in your place
- ]]--
- deBounce = false;
- BreakSpeed = 90-- adjust this for the kind of enviroment your using thi in, dont set it too low or ou cant drive/fly your model, stupid but funny if you do
- KillSpeed = 100 -- this shouldn't be lower then the break script or you may die wile driving
- function onTouch(hit)
- if(hit.Name ~= "Collision Brick") then
- if(deBounce == false)then
- h = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
- if(h == nil) then -- not a player
- deBounce = true
- collisionForce = GetImpactVelocity(hit,script.Parent);
- print(collisionForce)
- if(collisionForce > BreakSpeed) then
- script.Parent:BreakJoints();
- end
- deBounce = false
- else -- we've hit a player
- deBounce = true;
- collisionForce = GetImpactVelocity(hit,script.Parent);
- --print(collisionForce);
- if(collisionForce > KillSpeed) then
- --script.Parent:BreakJoints();
- hit:BreakJoints();
- end
- deBounce = false;
- end
- end
- end
- end
- function GetImpactVelocity(part,Other) -- main function handling the forces of impact
- pPos = part.Velocity;
- oPos = Other.Velocity;
- pRspeed = {x=0,y=0,z=0}
- oRspeed = {x=0,y=0,z=0}
- pRspeed.x = math.floor(pPos.x);
- pRspeed.y = math.floor(pPos.y);
- pRspeed.z = math.floor(pPos.z);
- oRspeed.x = math.floor(oPos.x);
- oRspeed.y = math.floor(oPos.y);
- oRspeed.z = math.floor(oPos.z);
- IForce = {x=0,y=0,z=0}
- IForce.x = pRspeed.x + -oRspeed.x
- IForce.y = pRspeed.y + -oRspeed.y
- IForce.z = pRspeed.z + -oRspeed.z
- if(IForce.x < 0)then IForce.x = -IForce.x; end
- if(IForce.y < 0)then IForce.y = -IForce.y; end
- if(IForce.z < 0)then IForce.z = -IForce.z; end
- speed = math.max(IForce.x,IForce.y,IForce.z);
- return speed;
- end
- if(script.Parent.className ~= "Script") then -- disable our break script until its inserted by the mother script
- script.Parent.Touched:connect(onTouch)
- end
- end,o98)
- end))
- o99 = Create("Part",{
- ["Name"] = "r2",
- ["Parent"] = o1,
- ["BrickColor"] = BrickColor.new("Black"),
- ["Position"] = Vector3.new(34.0066605, 2.18099093, 4.03157377),
- ["Rotation"] = Vector3.new(-178.524811, -0.277937382, 179.83252),
- ["RotVelocity"] = Vector3.new(-0.000398593955, 0.0629324019, -0.0108854147),
- ["Velocity"] = Vector3.new(0.0507682972, 0.0495156161, 0.0245162379),
- ["CFrame"] = CFrame.new(34.0066605, 2.18099093, 4.03157377, -0.999984026, -0.00292308908, -0.00485090353, -0.00304703694, 0.999663949, 0.0257439334, 0.00477402145, 0.0257583018, -0.999656856),
- ["FormFactor"] = Enum.FormFactor.Symmetric,
- ["Shape"] = Enum.PartType.Cylinder,
- ["Size"] = Vector3.new(4, 4, 4),
- ["BottomSurface"] = Enum.SurfaceType.Smooth,
- ["RightSurface"] = Enum.SurfaceType.Motor,
- ["TopSurface"] = Enum.SurfaceType.Smooth,
- ["Color"] = Color3.new(0.105882, 0.164706, 0.207843),
- })
Advertisement
Add Comment
Please, Sign In to add comment