Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <roblox xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.roblox.com/roblox.xsd" version="4">
- <External>null</External>
- <External>nil</External>
- <Item class="Model" referent="RBX0">
- <Properties>
- <CoordinateFrame name="ModelInPrimary">
- <X>0</X>
- <Y>0</Y>
- <Z>0</Z>
- <R00>1</R00>
- <R01>0</R01>
- <R02>0</R02>
- <R10>0</R10>
- <R11>1</R11>
- <R12>0</R12>
- <R20>0</R20>
- <R21>0</R21>
- <R22>1</R22>
- </CoordinateFrame>
- <string name="Name">UNGROUP</string>
- <Ref name="PrimaryPart">null</Ref>
- <bool name="archivable">true</bool>
- </Properties>
- <Item class="VehicleSeat" referent="RBX1">
- <Properties>
- <bool name="Anchored">false</bool>
- <float name="BackParamA">-0.5</float>
- <float name="BackParamB">0.5</float>
- <token name="BackSurface">0</token>
- <token name="BackSurfaceInput">0</token>
- <float name="BottomParamA">-0.5</float>
- <float name="BottomParamB">0.5</float>
- <token name="BottomSurface">4</token>
- <token name="BottomSurfaceInput">0</token>
- <int name="BrickColor">194</int>
- <CoordinateFrame name="CFrame">
- <X>95.3804474</X>
- <Y>5.68335772</Y>
- <Z>11.8235426</Z>
- <R00>0.91354084</R00>
- <R01>1.35512062e-006</R01>
- <R02>-0.406746984</R02>
- <R10>-8.75583169e-007</R10>
- <R11>1</R11>
- <R12>1.36507367e-006</R12>
- <R20>0.406746984</R20>
- <R21>-8.90909803e-007</R21>
- <R22>0.91354084</R22>
- </CoordinateFrame>
- <bool name="CanCollide">true</bool>
- <bool name="DraggingV1">false</bool>
- <float name="Elasticity">0.5</float>
- <float name="Friction">0.300000012</float>
- <float name="FrontParamA">-0.5</float>
- <float name="FrontParamB">0.5</float>
- <token name="FrontSurface">6</token>
- <token name="FrontSurfaceInput">0</token>
- <bool name="HeadsUpDisplay">true</bool>
- <float name="LeftParamA">-0.5</float>
- <float name="LeftParamB">0.5</float>
- <token name="LeftSurface">0</token>
- <token name="LeftSurfaceInput">0</token>
- <bool name="Locked">false</bool>
- <token name="Material">256</token>
- <float name="MaxSpeed">25</float>
- <string name="Name">VehicleSeat</string>
- <float name="Reflectance">0</float>
- <float name="RightParamA">-0.5</float>
- <float name="RightParamB">0.5</float>
- <token name="RightSurface">0</token>
- <token name="RightSurfaceInput">0</token>
- <Vector3 name="RotVelocity">
- <X>5.4011025e-006</X>
- <Y>6.77609351e-005</Y>
- <Z>8.21515277e-006</Z>
- </Vector3>
- <int name="Steer">0</int>
- <int name="Throttle">0</int>
- <float name="TopParamA">-0.5</float>
- <float name="TopParamB">0.5</float>
- <token name="TopSurface">3</token>
- <token name="TopSurfaceInput">0</token>
- <float name="Torque">10</float>
- <float name="Transparency">0</float>
- <float name="TurnSpeed">1</float>
- <Vector3 name="Velocity">
- <X>3.96365576e-005</X>
- <Y>0.00100359623</Y>
- <Z>2.21235859e-005</Z>
- </Vector3>
- <bool name="archivable">true</bool>
- <Vector3 name="size">
- <X>2</X>
- <Y>1</Y>
- <Z>2</Z>
- </Vector3>
- </Properties>
- </Item>
- <Item class="Part" referent="RBX2">
- <Properties>
- <bool name="Anchored">false</bool>
- <float name="BackParamA">-0.5</float>
- <float name="BackParamB">0.5</float>
- <token name="BackSurface">0</token>
- <token name="BackSurfaceInput">0</token>
- <float name="BottomParamA">-0.5</float>
- <float name="BottomParamB">0.5</float>
- <token name="BottomSurface">4</token>
- <token name="BottomSurfaceInput">0</token>
- <int name="BrickColor">194</int>
- <CoordinateFrame name="CFrame">
- <X>95.7871933</X>
- <Y>4.98335648</Y>
- <Z>10.9100027</Z>
- <R00>0.91354084</R00>
- <R01>1.35512062e-006</R01>
- <R02>-0.406746984</R02>
- <R10>-8.75583169e-007</R10>
- <R11>1</R11>
- <R12>1.36507367e-006</R12>
- <R20>0.406746984</R20>
- <R21>-8.90909803e-007</R21>
- <R22>0.91354084</R22>
- </CoordinateFrame>
- <bool name="CanCollide">true</bool>
- <bool name="DraggingV1">false</bool>
- <float name="Elasticity">0.5</float>
- <token name="FormFactor">2</token>
- <float name="Friction">0.300000012</float>
- <float name="FrontParamA">-0.5</float>
- <float name="FrontParamB">0.5</float>
- <token name="FrontSurface">6</token>
- <token name="FrontSurfaceInput">0</token>
- <float name="LeftParamA">-0.5</float>
- <float name="LeftParamB">0.5</float>
- <token name="LeftSurface">0</token>
- <token name="LeftSurfaceInput">0</token>
- <bool name="Locked">false</bool>
- <token name="Material">256</token>
- <string name="Name">Part</string>
- <float name="Reflectance">0</float>
- <float name="RightParamA">-0.5</float>
- <float name="RightParamB">0.5</float>
- <token name="RightSurface">0</token>
- <token name="RightSurfaceInput">0</token>
- <Vector3 name="RotVelocity">
- <X>5.4011025e-006</X>
- <Y>6.77609351e-005</Y>
- <Z>8.21515277e-006</Z>
- </Vector3>
- <float name="TopParamA">-0.5</float>
- <float name="TopParamB">0.5</float>
- <token name="TopSurface">3</token>
- <token name="TopSurfaceInput">0</token>
- <float name="Transparency">0</float>
- <Vector3 name="Velocity">
- <X>-1.65151414e-005</X>
- <Y>0.00101187185</Y>
- <Z>-9.21867559e-006</Z>
- </Vector3>
- <bool name="archivable">true</bool>
- <token name="shape">1</token>
- <Vector3 name="size">
- <X>4</X>
- <Y>0.400000006</Y>
- <Z>6</Z>
- </Vector3>
- </Properties>
- <Item class="BodyPosition" referent="RBX3">
- <Properties>
- <float name="D">1250</float>
- <string name="Name">BodyPosition</string>
- <float name="P">10000</float>
- <bool name="archivable">true</bool>
- <Vector3 name="maxForce">
- <X>0</X>
- <Y>400000</Y>
- <Z>0</Z>
- </Vector3>
- <Vector3 name="position">
- <X>78.8674698</X>
- <Y>5.00322914</Y>
- <Z>55.26474</Z>
- </Vector3>
- </Properties>
- </Item>
- <Item class="BodyGyro" referent="RBX4">
- <Properties>
- <float name="D">500</float>
- <string name="Name">BodyGyro</string>
- <float name="P">3000</float>
- <bool name="archivable">true</bool>
- <CoordinateFrame name="cframe">
- <X>0</X>
- <Y>0</Y>
- <Z>0</Z>
- <R00>0.91354543</R00>
- <R01>0</R01>
- <R02>-0.406736642</R02>
- <R10>0</R10>
- <R11>1</R11>
- <R12>0</R12>
- <R20>0.406736642</R20>
- <R21>0</R21>
- <R22>0.91354543</R22>
- </CoordinateFrame>
- <Vector3 name="maxTorque">
- <X>400000</X>
- <Y>400000</Y>
- <Z>400000</Z>
- </Vector3>
- </Properties>
- </Item>
- <Item class="BodyVelocity" referent="RBX5">
- <Properties>
- <string name="Name">BodyVelocity</string>
- <float name="P">1250</float>
- <bool name="archivable">true</bool>
- <Vector3 name="maxForce">
- <X>4000</X>
- <Y>4000</Y>
- <Z>4000</Z>
- </Vector3>
- <Vector3 name="velocity">
- <X>0</X>
- <Y>-0</Y>
- <Z>-0</Z>
- </Vector3>
- </Properties>
- </Item>
- <Item class="ObjectValue" referent="RBX6">
- <Properties>
- <string name="Name">Seat</string>
- <Ref name="Value">RBX1</Ref>
- <bool name="archivable">true</bool>
- </Properties>
- <Item class="Script" referent="RBX7">
- <Properties>
- <bool name="Disabled">false</bool>
- <Content name="LinkedSource"><null></null></Content>
- <string name="Name">Script</string>
- <string name="Source">script.Parent.Value=nil </string>
- <bool name="archivable">true</bool>
- </Properties>
- </Item>
- </Item>
- <Item class="Script" referent="RBX8">
- <Properties>
- <bool name="Disabled">false</bool>
- <Content name="LinkedSource"><null></null></Content>
- <string name="Name">Script</string>
- <string name="Source">print("hover craft script loaded")
- seat=script.Parent.Seat
- steer=0
- while true do
- if seat.Value~=nil then
- pos=RayCast((script.Parent.CFrame*CFrame.new(0,-1,0)).p,(script.Parent.CFrame*CFrame.new(0,-10,0)).p)
- script.Parent.BodyVelocity.velocity=(script.Parent.CFrame.lookVector*20)*seat.Value.Throttle
- script.Parent.BodyGyro.cframe=CFrame.fromEulerAnglesXYZ(0,math.rad(steer),0)
- if pos then
- dist=script.Parent.Position-pos
- script.Parent.BodyPosition.position=(script.Parent.CFrame*CFrame.new(0,-dist.magnitude+5,0)).p
- end
- steer=steer+(-seat.Value.Steer*8)
- else
- for _,v in pairs(game.JointsService:GetChildren())do
- if v.Part0==script.Parent then
- if v.Part1.className=="VehicleSeat" then
- seat.Value=v.Part1
- v.Part1.Parent.ChildRemoved:connect(function()
- if v.Part1.Parent==nil then
- seat.Value=nil
- end
- end)
- end
- end
- if v.Part1==script.Parent then
- if v.Part0.className=="VehicleSeat" then
- seat.Value=v.Part0
- v.Part0.Parent.ChildRemoved:connect(function()
- if v.Part0.Parent==nil then
- seat.Value=nil
- end
- end)
- v.Parent.ChildRemoved:connect(function()
- if v.Parent==nil then
- seat.Value=nil
- end
- end)
- end
- end
- end
- end
- wait(.25)
- end </string>
- <bool name="archivable">true</bool>
- </Properties>
- </Item>
- </Item>
- <Item class="Script" referent="RBX9">
- <Properties>
- <bool name="Disabled">false</bool>
- <Content name="LinkedSource"><null></null></Content>
- <string name="Name">Script</string>
- <string name="Source">--this will return false if it makes it to point2 and hits nothing, otherwise it will return the position that it hit
- function _G.pointInPart(point,part)
- if not pcall(function()x=part.Shape end) then return end
- if part.Shape==Enum.PartType.Block then
- local size = part.Size
- local pos = part.Position
- local a = (part.CFrame * CFrame.new(size.x/-2, size.y/2, size.z/2)).p
- local b = (part.CFrame * CFrame.new(size.x/2, size.y/-2, size.z/2)).p
- local c = (part.CFrame * CFrame.new(size.x/2, size.y/2, size.z/-2)).p
- local d = (part.CFrame * CFrame.new(size.x/-2, size.y/-2, size.z/2)).p
- local e = (part.CFrame * CFrame.new(size.x/2, size.y/-2, size.z/-2)).p
- local f = (part.CFrame * CFrame.new(size.x/-2, size.y/2, size.z/-2)).p
- local g = (part.CFrame * CFrame.new(size.x/-2, size.y/-2, size.z/-2)).p
- local h = (part.CFrame * CFrame.new(size.x/2, size.y/2, size.z/2)).p
- local f1 = (c+a)/2
- local f2 = (c+g)/2
- local f3 = (g+a)/2
- local f4 = (c+b)/2
- local f5 = (b+a)/2
- local f6 = (b+g)/2
- if
- (CFrame.new(pos,f1).lookVector-CFrame.new(f1,point).lookVector).magnitude >= math.sqrt(2) and
- (CFrame.new(pos,f2).lookVector-CFrame.new(f2,point).lookVector).magnitude >= math.sqrt(2) and
- (CFrame.new(pos,f3).lookVector-CFrame.new(f3,point).lookVector).magnitude >= math.sqrt(2) and
- (CFrame.new(pos,f4).lookVector-CFrame.new(f4,point).lookVector).magnitude >= math.sqrt(2) and
- (CFrame.new(pos,f5).lookVector-CFrame.new(f5,point).lookVector).magnitude >= math.sqrt(2) and
- (CFrame.new(pos,f6).lookVector-CFrame.new(f6,point).lookVector).magnitude >= math.sqrt(2)
- then
- return true
- else
- return false
- end
- elseif part.Shape==Enum.PartType.Ball then
- local dist=point-part.Position
- if dist.magnitude<part.Size.x then
- return true
- else
- return false
- end
- end
- end
- function _G.RayCast(point1,point2)
- dist=point2-point1
- pos=point1
- for i=1,math.ceil(dist.magnitude) do
- for _,v in pairs(workspace:GetChildren())do
- if v:IsA("BasePart") then
- if pointInPart(pos,v) then
- return pos
- end
- end
- end
- pos=pos+dist.unit
- end
- return false
- end </string>
- <bool name="archivable">true</bool>
- </Properties>
- </Item>
- </Item>
- </roblox>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement