while wait(.2)do if script.Parent.Parent.Parent:FindFirstChild("\084\111\117\099\104\071\117\105")then script.Parent.Parent.Parent.TouchGui.Enabled=false script.Parent.Parent.MobileControls.Visible=true script.Parent.Parent.PCHandbrake.Visible=false else script.Parent.Parent.MobileControls.Visible=false script.Parent.Parent.PCHandbrake.Visible=true end if Humanoid.SeatPart~=nil and Humanoid.SeatPart.Parent:FindFirstChild("\083\116\097\116\115")then local t=Char.Head.Velocity.magnitude if Old_Magnitude~=nil and t-Old_Magnitude<-70 then end Old_Magnitude=t end end
---It's a while wait() because of how badly it interacts with framerate changes
while wait(0.2) do
	---Activating/Dezactivating the mobile controls
	if script.Parent.Parent.Parent:FindFirstChild("TouchGui") then
		script.Parent.Parent.Parent["TouchGui"].Enabled = false
		script.Parent.Parent.MobileControls.Visible = true
		script.Parent.Parent.PCHandbrake.Visible = false
	else
		script.Parent.Parent.MobileControls.Visible = false
		script.Parent.Parent.PCHandbrake.Visible = true
	end

	if Humanoid.SeatPart ~= nil and Humanoid.SeatPart.Parent:FindFirstChild("Stats") then
		local Cached_Magnitude = Char.Head.Velocity.magnitude
		---Camera shake on collision
		--if Old_Magnitude ~= nil then
		--	print(Cached_Magnitude)
		--	print(Old_Magnitude)
		--	print(Cached_Magnitude - Old_Magnitude)
		--	print("__")
		--end

		if Old_Magnitude ~= nil and Cached_Magnitude - Old_Magnitude < -70 then
			--print("Collision")
			--Sound
			--game.SoundService.CrashSound:Play(0.1)

			-- Explosion shake:
			--camShake:Shake(CameraShaker.Presets.Explosion)
		end
		Old_Magnitude = Cached_Magnitude
	end
end
