Advertisement
BobMe

BrickYeeterLocal

Jul 2nd, 2020 (edited)
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.36 KB | None | 0 0
  1. wait(2)
  2. local size = 5
  3.  
  4. -- don't mind my messy, unorganized code, just focus on the beauty of the script!
  5. local VRService = game:GetService("VRService")
  6. local RunService = game:GetService("RunService")
  7. local lh = Instance.new("Part",workspace)
  8. local mode = 0
  9. local lastmode = 0
  10. local maxmodes = 8
  11. local pensize = size/5
  12. local distance = 1*pensize
  13. local player = game.Players.LocalPlayer
  14. local us = game:GetService("UserInputService")
  15. local drawing = false
  16. local lastpart = nil
  17. local lastpart2 = nil
  18. local lastline = nil
  19. local folder = nil
  20. --
  21. local oldpart = nil
  22. local currentpartR = nil
  23. local currentcfR = nil
  24. local currentpartL = nil
  25. local currentcfL = nil
  26. local velR = Vector3.new(0,0,0)
  27. local lastposR = Vector3.new(0,0,0)
  28. local velL = Vector3.new(0,0,0)
  29. local lastposL = Vector3.new(0,0,0)
  30. local yeetstr = 1.45
  31.  
  32. local npR = false
  33. local npL = false
  34.  
  35. while workspace:FindFirstChild("dksfbfkhsdhbfsjhd") ~= nil do
  36. workspace:FindFirstChild("dksfbfkhsdhbfsjhd"):Destroy()
  37. end
  38.  
  39. lh.Transparency = 0
  40. lh.Size = Vector3.new(0.2,0.2,0.6) * Vector3.new(size,size,size)
  41. lh.Material = "Metal"
  42. lh.Color = Color3.fromRGB(255,100,255)
  43. lh.Name = "dksfbfkhsdhbfsjhd"
  44. lh.CanCollide = false
  45. lh.Anchored = true
  46. local rh = Instance.new("Part",workspace)
  47. rh.Transparency = 0
  48. rh.Size = Vector3.new(0.2,0.2,0.6) * Vector3.new(size,size,size)
  49. rh.Material = "Metal"
  50. rh.Name = "dksfbfkhsdhbfsjhd"
  51. rh.Color = Color3.fromRGB(255,100,255)
  52. rh.CanCollide = false
  53. rh.Anchored = true
  54. local selec1 = Instance.new("SelectionBox",lh)
  55. selec1.Color3 = Color3.fromRGB(255,0,255)
  56. selec1.LineThickness = 0.15
  57. local selec2 = Instance.new("SelectionBox",rh)
  58. selec2.Color3 = Color3.fromRGB(255,0,255)
  59. selec2.LineThickness = 0.15
  60. local he = Instance.new("Part",workspace)
  61. he.Size = Vector3.new(2,2,2) * Vector3.new(size,size,size)
  62. he.CanCollide = false
  63. he.Transparency = 1
  64. he.Anchored = true
  65. local antispamright = false
  66. local antispamleft = false
  67.  
  68. local laserrh = Instance.new("Part")
  69. laserrh.Color = Color3.fromRGB(255, 75, 230)
  70. laserrh.Name = "dksfbfkhsdhbfsjhd"
  71. laserrh.Material = "Neon"
  72. laserrh.Transparency = 1
  73. laserrh.Parent = workspace
  74. laserrh.CanCollide = false
  75. laserrh.Anchored = true
  76. local laserlh = Instance.new("Part")
  77. laserlh.Color = Color3.fromRGB(255, 75, 230)
  78. laserlh.Material = "Neon"
  79. laserlh.Transparency = 1
  80. laserlh.Name = "dksfbfkhsdhbfsjhd"
  81. laserlh.Parent = workspace
  82. laserlh.CanCollide = false
  83. laserlh.Anchored = true
  84.  
  85. game.StarterGui:SetCore("VRLaserPointerMode", 0)
  86. game.StarterGui:SetCore("VREnableControllerModels", false)
  87.  
  88. local Partt = Instance.new("Part")
  89. local SurfaceGui = Instance.new("SurfaceGui")
  90. local OuterFrame = Instance.new("Frame")
  91. local _0 = Instance.new("Frame")
  92. local TextLabel = Instance.new("TextLabel")
  93. local _1 = Instance.new("Frame")
  94. local TextLabel_2 = Instance.new("TextLabel")
  95. local _2 = Instance.new("Frame")
  96. local TextLabel_3 = Instance.new("TextLabel")
  97. local _3 = Instance.new("Frame")
  98. local TextLabel_4 = Instance.new("TextLabel")
  99. local _4 = Instance.new("Frame")
  100. local TextLabel_5 = Instance.new("TextLabel")
  101. local _5 = Instance.new("Frame")
  102. local TextLabel_6 = Instance.new("TextLabel")
  103. local _6 = Instance.new("Frame")
  104. local TextLabel_7 = Instance.new("TextLabel")
  105. local _7 = Instance.new("Frame")
  106. local TextLabel_8 = Instance.new("TextLabel")
  107. local _8 = Instance.new("Frame")
  108. local TextLabel_9 = Instance.new("TextLabel")
  109. local _9 = Instance.new("Frame")
  110. local TextLabel_10 = Instance.new("TextLabel")
  111. local _10 = Instance.new("Frame")
  112. local TextLabel_11 = Instance.new("TextLabel")
  113.  
  114. --Properties:
  115.  
  116. Partt.Transparency = 1
  117. Partt.CanCollide = false
  118. Partt.Size = Vector3.new(0.668*size, 0.77*size, 0.05*size)
  119. Partt.Anchored = true
  120. Partt.Name = "dksfbfkhsdhbfsjhd"
  121. Partt.Parent = workspace
  122.  
  123. SurfaceGui.Parent = Partt
  124. SurfaceGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  125. SurfaceGui.AlwaysOnTop = true
  126. SurfaceGui.CanvasSize = Vector2.new(1600, 1700)
  127.  
  128. OuterFrame.Name = "OuterFrame"
  129. OuterFrame.Parent = SurfaceGui
  130. OuterFrame.AnchorPoint = Vector2.new(1, 0)
  131. OuterFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  132. OuterFrame.BackgroundTransparency = 1.000
  133. OuterFrame.Position = UDim2.new(1, 0, 0, 0)
  134. OuterFrame.Size = UDim2.new(1, 0, 1, 0)
  135.  
  136. _0.Name = "0"
  137. _0.Parent = OuterFrame
  138. _0.BackgroundColor3 = Color3.fromRGB(255, 160, 251)
  139. _0.BackgroundTransparency = 0.400
  140. _0.BorderSizePixel = 0
  141. _0.Size = UDim2.new(1, 0, 0.0909090936, 0)
  142.  
  143. TextLabel.Parent = _0
  144. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  145. TextLabel.BackgroundTransparency = 1.000
  146. TextLabel.Size = UDim2.new(1, 0, 1, 0)
  147. TextLabel.Font = Enum.Font.SourceSans
  148. TextLabel.Text = ""
  149. TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
  150. TextLabel.TextScaled = true
  151. TextLabel.TextSize = 14.000
  152. TextLabel.TextWrapped = true
  153. TextLabel.TextXAlignment = Enum.TextXAlignment.Left
  154.  
  155. _1.Name = "1"
  156. _1.Parent = OuterFrame
  157. _1.BackgroundColor3 = Color3.fromRGB(255, 160, 251)
  158. _1.BackgroundTransparency = 0.400
  159. _1.BorderSizePixel = 0
  160. _1.Position = UDim2.new(0, 0, 0.0909090936, 0)
  161. _1.Size = UDim2.new(1, 0, 0.0909090936, 0)
  162.  
  163. TextLabel_2.Parent = _1
  164. TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  165. TextLabel_2.BackgroundTransparency = 1.000
  166. TextLabel_2.Size = UDim2.new(1, 0, 1, 0)
  167. TextLabel_2.Font = Enum.Font.SourceSans
  168. TextLabel_2.Text = ""
  169. TextLabel_2.TextColor3 = Color3.fromRGB(0, 0, 0)
  170. TextLabel_2.TextScaled = true
  171. TextLabel_2.TextSize = 14.000
  172. TextLabel_2.TextWrapped = true
  173. TextLabel_2.TextXAlignment = Enum.TextXAlignment.Left
  174.  
  175. _2.Name = "2"
  176. _2.Parent = OuterFrame
  177. _2.BackgroundColor3 = Color3.fromRGB(255, 160, 251)
  178. _2.BackgroundTransparency = 0.400
  179. _2.BorderSizePixel = 0
  180. _2.Position = UDim2.new(0, 0, 0.181818187, 0)
  181. _2.Size = UDim2.new(1, 0, 0.0909090936, 0)
  182.  
  183. TextLabel_3.Parent = _2
  184. TextLabel_3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  185. TextLabel_3.BackgroundTransparency = 1.000
  186. TextLabel_3.Size = UDim2.new(1, 0, 1, 0)
  187. TextLabel_3.Font = Enum.Font.SourceSans
  188. TextLabel_3.Text = ""
  189. TextLabel_3.TextColor3 = Color3.fromRGB(0, 0, 0)
  190. TextLabel_3.TextScaled = true
  191. TextLabel_3.TextSize = 14.000
  192. TextLabel_3.TextWrapped = true
  193. TextLabel_3.TextXAlignment = Enum.TextXAlignment.Left
  194.  
  195. _3.Name = "3"
  196. _3.Parent = OuterFrame
  197. _3.BackgroundColor3 = Color3.fromRGB(255, 160, 251)
  198. _3.BackgroundTransparency = 0.400
  199. _3.BorderSizePixel = 0
  200. _3.Position = UDim2.new(0, 0, 0.272727281, 0)
  201. _3.Size = UDim2.new(1, 0, 0.0909090936, 0)
  202.  
  203. TextLabel_4.Parent = _3
  204. TextLabel_4.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  205. TextLabel_4.BackgroundTransparency = 1.000
  206. TextLabel_4.Size = UDim2.new(1, 0, 1, 0)
  207. TextLabel_4.Font = Enum.Font.SourceSans
  208. TextLabel_4.Text = ""
  209. TextLabel_4.TextColor3 = Color3.fromRGB(0, 0, 0)
  210. TextLabel_4.TextScaled = true
  211. TextLabel_4.TextSize = 14.000
  212. TextLabel_4.TextWrapped = true
  213. TextLabel_4.TextXAlignment = Enum.TextXAlignment.Left
  214.  
  215. _4.Name = "4"
  216. _4.Parent = OuterFrame
  217. _4.BackgroundColor3 = Color3.fromRGB(255, 160, 251)
  218. _4.BackgroundTransparency = 0.400
  219. _4.BorderSizePixel = 0
  220. _4.Position = UDim2.new(0, 0, 0.363636374, 0)
  221. _4.Size = UDim2.new(1, 0, 0.0909090936, 0)
  222.  
  223. TextLabel_5.Parent = _4
  224. TextLabel_5.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  225. TextLabel_5.BackgroundTransparency = 1.000
  226. TextLabel_5.Size = UDim2.new(1, 0, 1, 0)
  227. TextLabel_5.Font = Enum.Font.SourceSans
  228. TextLabel_5.Text = ""
  229. TextLabel_5.TextColor3 = Color3.fromRGB(0, 0, 0)
  230. TextLabel_5.TextScaled = true
  231. TextLabel_5.TextSize = 14.000
  232. TextLabel_5.TextWrapped = true
  233. TextLabel_5.TextXAlignment = Enum.TextXAlignment.Left
  234.  
  235. _5.Name = "5"
  236. _5.Parent = OuterFrame
  237. _5.BackgroundColor3 = Color3.fromRGB(255, 160, 251)
  238. _5.BackgroundTransparency = 0.400
  239. _5.BorderSizePixel = 0
  240. _5.Position = UDim2.new(0, 0, 0.454545468, 0)
  241. _5.Size = UDim2.new(1, 0, 0.0909090936, 0)
  242.  
  243. TextLabel_6.Parent = _5
  244. TextLabel_6.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  245. TextLabel_6.BackgroundTransparency = 1.000
  246. TextLabel_6.Size = UDim2.new(1, 0, 1, 0)
  247. TextLabel_6.Font = Enum.Font.SourceSans
  248. TextLabel_6.Text = ""
  249. TextLabel_6.TextColor3 = Color3.fromRGB(0, 0, 0)
  250. TextLabel_6.TextScaled = true
  251. TextLabel_6.TextSize = 14.000
  252. TextLabel_6.TextWrapped = true
  253. TextLabel_6.TextXAlignment = Enum.TextXAlignment.Left
  254.  
  255. _6.Name = "6"
  256. _6.Parent = OuterFrame
  257. _6.BackgroundColor3 = Color3.fromRGB(255, 160, 251)
  258. _6.BackgroundTransparency = 0.400
  259. _6.BorderSizePixel = 0
  260. _6.Position = UDim2.new(0, 0, 0.545454562, 0)
  261. _6.Size = UDim2.new(1, 0, 0.0909090936, 0)
  262.  
  263. TextLabel_7.Parent = _6
  264. TextLabel_7.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  265. TextLabel_7.BackgroundTransparency = 1.000
  266. TextLabel_7.Size = UDim2.new(1, 0, 1, 0)
  267. TextLabel_7.Font = Enum.Font.SourceSans
  268. TextLabel_7.Text = ""
  269. TextLabel_7.TextColor3 = Color3.fromRGB(0, 0, 0)
  270. TextLabel_7.TextScaled = true
  271. TextLabel_7.TextSize = 14.000
  272. TextLabel_7.TextWrapped = true
  273. TextLabel_7.TextXAlignment = Enum.TextXAlignment.Left
  274.  
  275. _7.Name = "7"
  276. _7.Parent = OuterFrame
  277. _7.BackgroundColor3 = Color3.fromRGB(255, 160, 251)
  278. _7.BackgroundTransparency = 0.400
  279. _7.BorderSizePixel = 0
  280. _7.Position = UDim2.new(0, 0, 0.636363626, 0)
  281. _7.Size = UDim2.new(1, 0, 0.0909090936, 0)
  282.  
  283. TextLabel_8.Parent = _7
  284. TextLabel_8.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  285. TextLabel_8.BackgroundTransparency = 1.000
  286. TextLabel_8.Size = UDim2.new(1, 0, 1, 0)
  287. TextLabel_8.Font = Enum.Font.SourceSans
  288. TextLabel_8.Text = ""
  289. TextLabel_8.TextColor3 = Color3.fromRGB(0, 0, 0)
  290. TextLabel_8.TextScaled = true
  291. TextLabel_8.TextSize = 14.000
  292. TextLabel_8.TextWrapped = true
  293. TextLabel_8.TextXAlignment = Enum.TextXAlignment.Left
  294.  
  295. _8.Name = "8"
  296. _8.Parent = OuterFrame
  297. _8.BackgroundColor3 = Color3.fromRGB(255, 160, 251)
  298. _8.BackgroundTransparency = 0.400
  299. _8.BorderSizePixel = 0
  300. _8.Position = UDim2.new(0, 0, 0.727272749, 0)
  301. _8.Size = UDim2.new(1, 0, 0.0909090936, 0)
  302.  
  303. TextLabel_9.Parent = _8
  304. TextLabel_9.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  305. TextLabel_9.BackgroundTransparency = 1.000
  306. TextLabel_9.Size = UDim2.new(1, 0, 1, 0)
  307. TextLabel_9.Font = Enum.Font.SourceSans
  308. TextLabel_9.Text = ""
  309. TextLabel_9.TextColor3 = Color3.fromRGB(0, 0, 0)
  310. TextLabel_9.TextScaled = true
  311. TextLabel_9.TextSize = 14.000
  312. TextLabel_9.TextWrapped = true
  313. TextLabel_9.TextXAlignment = Enum.TextXAlignment.Left
  314.  
  315. _9.Name = "9"
  316. _9.Parent = OuterFrame
  317. _9.BackgroundColor3 = Color3.fromRGB(255, 160, 251)
  318. _9.BackgroundTransparency = 0.400
  319. _9.BorderSizePixel = 0
  320. _9.Position = UDim2.new(0, 0, 0.818181813, 0)
  321. _9.Size = UDim2.new(1, 0, 0.0909090936, 0)
  322.  
  323. TextLabel_10.Parent = _9
  324. TextLabel_10.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  325. TextLabel_10.BackgroundTransparency = 1.000
  326. TextLabel_10.Size = UDim2.new(1, 0, 1, 0)
  327. TextLabel_10.Font = Enum.Font.SourceSans
  328. TextLabel_10.Text = ""
  329. TextLabel_10.TextColor3 = Color3.fromRGB(0, 0, 0)
  330. TextLabel_10.TextScaled = true
  331. TextLabel_10.TextSize = 14.000
  332. TextLabel_10.TextWrapped = true
  333. TextLabel_10.TextXAlignment = Enum.TextXAlignment.Left
  334.  
  335. _10.Name = "10"
  336. _10.Parent = OuterFrame
  337. _10.BackgroundColor3 = Color3.fromRGB(255, 160, 251)
  338. _10.BackgroundTransparency = 0.400
  339. _10.BorderSizePixel = 0
  340. _10.Position = UDim2.new(0, 0, 0.909090936, 0)
  341. _10.Size = UDim2.new(1, 0, 0.0909090936, 0)
  342.  
  343. TextLabel_11.Parent = _10
  344. TextLabel_11.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  345. TextLabel_11.BackgroundTransparency = 1.000
  346. TextLabel_11.Size = UDim2.new(1, 0, 1, 0)
  347. TextLabel_11.Font = Enum.Font.SourceSans
  348. TextLabel_11.Text = ""
  349. TextLabel_11.TextColor3 = Color3.fromRGB(0, 0, 0)
  350. TextLabel_11.TextScaled = true
  351. TextLabel_11.TextSize = 14.000
  352. TextLabel_11.TextWrapped = true
  353. TextLabel_11.TextXAlignment = Enum.TextXAlignment.Left
  354.  
  355. --now to wait for the server if it isn't called yet!
  356. local remote = game.Players.LocalPlayer:WaitForChild("VrC")
  357. remote:FireServer("Start",size)
  358. wait(.5)
  359.  
  360. workspace:WaitForChild(game.Players.LocalPlayer.Name.."-Head").Transparency = 1
  361. selec1.Adornee = workspace:WaitForChild(game.Players.LocalPlayer.Name.."-LeftHand")
  362. selec2.Adornee = workspace:WaitForChild(game.Players.LocalPlayer.Name.."-RightHand")
  363. workspace:WaitForChild(game.Players.LocalPlayer.Name.."-LeftHand").Transparency = 1
  364. workspace:WaitForChild(game.Players.LocalPlayer.Name.."-RightHand").Transparency = 1
  365. workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
  366. workspace.CurrentCamera.CFrame = CFrame.new(0,0,0) * CFrame.new(0,5*size,0)
  367. workspace.CurrentCamera.HeadScale = size
  368.  
  369. if workspace:FindFirstChild("DrawStuff") == nil then
  370. folder = Instance.new("Folder",workspace)
  371. folder.Name = "DrawStuff"
  372. else
  373. folder = workspace:FindFirstChild("DrawStuff")
  374. end
  375.  
  376. local function updatechat(mes)
  377. local a = Partt.SurfaceGui.OuterFrame["0"].TextLabel
  378. local b = Partt.SurfaceGui.OuterFrame["1"].TextLabel
  379. local c = Partt.SurfaceGui.OuterFrame["2"].TextLabel
  380. local d = Partt.SurfaceGui.OuterFrame["3"].TextLabel
  381. local e = Partt.SurfaceGui.OuterFrame["4"].TextLabel
  382. local f = Partt.SurfaceGui.OuterFrame["5"].TextLabel
  383. local g = Partt.SurfaceGui.OuterFrame["6"].TextLabel
  384. local h = Partt.SurfaceGui.OuterFrame["7"].TextLabel
  385. local i = Partt.SurfaceGui.OuterFrame["8"].TextLabel
  386. local j = Partt.SurfaceGui.OuterFrame["9"].TextLabel
  387. local k = Partt.SurfaceGui.OuterFrame["10"].TextLabel
  388.  
  389. a.Text = b.Text
  390. b.Text = c.Text
  391. c.Text = d.Text
  392. d.Text = e.Text
  393. e.Text = f.Text
  394. f.Text = g.Text
  395. g.Text = h.Text
  396. h.Text = i.Text
  397. i.Text = j.Text
  398. j.Text = k.Text
  399. k.Text = mes
  400. end
  401.  
  402. local function multiplyCFrame(a, b)
  403. local ax, ay, az, a11, a12, a13, a21, a22, a23, a31, a32, a33 = a:components()
  404. local bx, by, bz, b11, b12, b13, b21, b22, b23, b31, b32, b33 = b:components()
  405. local x = ax*bx
  406. local y = ay*by
  407. local z = az*bz
  408. local m11 = a11*b11
  409. local m12 = a12*b12
  410. local m13 = a13*b13
  411. local m21 = a21*b21
  412. local m22 = a22*b22
  413. local m23 = a23*b23
  414. local m31 = a31*b31
  415. local m32 = a32*b32
  416. local m33 = a33*b33
  417. return CFrame.new(x, y, z, m11, m12, m13, m21, m22, m23, m31, m32, m33)
  418. end
  419.  
  420. function update()
  421. local fold = workspace.DrawStuff
  422. local tab = {}
  423. for i,v in pairs(fold:GetChildren()) do
  424. local teb = {}
  425. table.insert(teb,v.CFrame)
  426. table.insert(teb,v.Size)
  427. table.insert(teb,v.Shape)
  428. table.insert(tab,teb)
  429. end
  430. coroutine.resume(coroutine.create(function()
  431. remote:FireServer("UpdateDraw",tab)
  432. wait(.4)
  433. local g = workspace:FindFirstChild("FolderOfDraw"..player.Name)
  434. if g ~= nil then
  435. g:ClearAllChildren()
  436. end
  437. end))
  438. end
  439.  
  440. function drawLine(part1,part2)
  441. local b1 = part1
  442. local b2 = part2
  443. local x = (b1.X+b2.X)/2
  444. local y = (b1.Y+b2.Y)/2
  445. local z = (b1.Z+b2.Z)/2
  446. local midpos = Vector3.new(x,y,z)
  447. local part = Instance.new("Part",folder)
  448. part.Anchored = true
  449. part.CanCollide = false
  450. part.Color = Color3.fromRGB(145,145,145)
  451. part.Position = midpos
  452. part.CFrame = CFrame.new(part.Position,b1)
  453. local mag = (b1 - b2).Magnitude
  454. part.Size = Vector3.new(0.4*(size/6),0.4*(size/6),mag)
  455. part.Material = "Neon"
  456. return part
  457. end
  458.  
  459. function printtable(tab)
  460. for i,v in pairs(tab) do
  461. if type(v) ~= "table" then
  462. print(i.." | "..tostring(v))
  463. else
  464. for ii,vv in pairs(v) do
  465. print(i..", "..ii.." | "..tostring(v))
  466. end
  467. end
  468. end
  469. end
  470.  
  471. function changeMode()
  472. if mode == 0 then
  473. lh.Color = Color3.fromRGB(255,100,255)
  474. rh.Color = Color3.fromRGB(255,100,255)
  475. selec1.Color3 = Color3.fromRGB(255,0,255)
  476. selec2.Color3 = Color3.fromRGB(255,0,255)
  477. laserlh.Color = Color3.fromRGB(255, 75, 230)
  478. laserrh.Color = Color3.fromRGB(255, 75, 230)
  479. elseif mode == 1 then
  480. lh.Color = Color3.fromRGB(100,100,255)
  481. rh.Color = Color3.fromRGB(100,100,255)
  482. selec1.Color3 = Color3.fromRGB(0,0,255)
  483. selec2.Color3 = Color3.fromRGB(0,0,255)
  484. elseif mode == 2 then
  485. lh.Color = Color3.fromRGB(255,100,100)
  486. rh.Color = Color3.fromRGB(255,100,100)
  487. selec1.Color3 = Color3.fromRGB(255,0,0)
  488. selec2.Color3 = Color3.fromRGB(255,0,0)
  489. elseif mode == 3 then
  490. lh.Color = Color3.fromRGB(100,255,100)
  491. rh.Color = Color3.fromRGB(100,255,100)
  492. selec1.Color3 = Color3.fromRGB(0,255,0)
  493. selec2.Color3 = Color3.fromRGB(0,255,0)
  494. laserlh.Color = Color3.fromRGB(100,255,100)
  495. laserrh.Color = Color3.fromRGB(100,255,100)
  496. laserlh.Transparency = 0.875
  497. laserrh.Transparency = 0.875
  498. elseif mode == 4 then
  499. lh.Color = Color3.fromRGB(0,255,178)
  500. rh.Color = Color3.fromRGB(0,255,178)
  501. selec1.Color3 = Color3.fromRGB(0,255,178)
  502. selec2.Color3 = Color3.fromRGB(0,255,178)
  503. laserlh.Color = Color3.fromRGB(0,255,178)
  504. laserrh.Color = Color3.fromRGB(0,255,178)
  505. laserlh.Transparency = 0.875
  506. laserrh.Transparency = 0.875
  507. elseif mode == 5 then
  508. lh.Color = Color3.fromRGB(255,255,100)
  509. rh.Color = Color3.fromRGB(255,255,100)
  510. selec1.Color3 = Color3.fromRGB(255,255,0)
  511. selec2.Color3 = Color3.fromRGB(255,255,0)
  512. elseif mode == 6 then
  513. lh.Color = Color3.fromRGB(100,255,255)
  514. rh.Color = Color3.fromRGB(100,255,255)
  515. lh.Transparency = 0.5
  516. rh.Transparency = 0.5
  517. selec1.Color3 = Color3.fromRGB(0,255,255)
  518. selec2.Color3 = Color3.fromRGB(0,255,255)
  519. elseif mode == 7 then
  520. lh.Color = Color3.fromRGB(255,255,255)
  521. rh.Color = Color3.fromRGB(255,255,255)
  522. selec1.Color3 = Color3.fromRGB(255,255,255)
  523. selec2.Color3 = Color3.fromRGB(255,255,255)
  524. elseif mode == 8 then
  525. lh.Color = Color3.fromRGB(100,100,100)
  526. rh.Color = Color3.fromRGB(100,100,100)
  527. selec1.Color3 = Color3.fromRGB(100,100,100)
  528. selec2.Color3 = Color3.fromRGB(100,100,100)
  529. end
  530. if mode ~= 3 and mode ~= 4 then
  531. laserlh.Transparency = 1
  532. laserrh.Transparency = 1
  533. end
  534. if lastmode == 6 then
  535. coroutine.resume(coroutine.create(function()
  536. lh.Transparency = 0
  537. rh.Transparency = 0
  538. wait(1)
  539. workspace:FindFirstChild(game.Players.LocalPlayer.Name.."-LeftHand").Transparency = 1
  540. workspace:FindFirstChild(game.Players.LocalPlayer.Name.."-RightHand").Transparency = 1
  541. workspace:FindFirstChild(game.Players.LocalPlayer.Name.."-Head").Transparency = 1
  542. end))
  543. elseif lastmode == 7 then
  544. folder:ClearAllChildren()
  545. wait(.25)
  546. update()
  547. end
  548. remote:FireServer("mode",mode)
  549. lastmode = mode
  550. end
  551.  
  552. function subtractcf(a, b)
  553. local x, y, z, m11, m12, m13, m21, m22, m23, m31, m32, m33 = a:components()
  554. return CFrame.new(x - b.x, y - b.y, z - b.z, m11, m12, m13, m21, m22, m23, m31, m32, m33);
  555. end
  556.  
  557. local function multiplyCFrame(a, b)
  558. local ax, ay, az, a11, a12, a13, a21, a22, a23, a31, a32, a33 = a:components()
  559. local bx, by, bz, b11, b12, b13, b21, b22, b23, b31, b32, b33 = b:components()
  560. local x = ax*bx
  561. local y = ay*by
  562. local z = az*bz
  563. local m11 = a11*b11
  564. local m12 = a12*b12
  565. local m13 = a13*b13
  566. local m21 = a21*b21
  567. local m22 = a22*b22
  568. local m23 = a23*b23
  569. local m31 = a31*b31
  570. local m32 = a32*b32
  571. local m33 = a33*b33
  572. return CFrame.new(x, y, z, m11, m12, m13, m21, m22, m23, m31, m32, m33)
  573. end
  574.  
  575. function isValid(targ)
  576. if targ.Anchored == false then
  577. return true
  578. else
  579. return false
  580. end
  581. end
  582.  
  583. RunService.RenderStepped:Connect(function()
  584. workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
  585. local curr = workspace.CurrentCamera.CFrame
  586. local head = (VRService:GetUserCFrame(Enum.UserCFrame.Head) * CFrame.new(0,0,0.2)) + Vector3.new(0,1.25*(4*(1-size)),0)
  587. he.CFrame = multiplyCFrame((curr * head),CFrame.new(size, size, size, 1, 1, 1, 1, 1, 1, 1, 1, 1))
  588. local lefthand = (VRService:GetUserCFrame(Enum.UserCFrame.LeftHand) * CFrame.new(0,0,0.2)) + Vector3.new(0,1.25*(4*(1-size)),0)
  589. lh.CFrame = multiplyCFrame((curr * lefthand),CFrame.new(size, size, size, 1, 1, 1, 1, 1, 1, 1, 1, 1))
  590. local righthand = (VRService:GetUserCFrame(Enum.UserCFrame.RightHand) * CFrame.new(0,0,0.2)) + Vector3.new(0,1.25*(4*(1-size)),0)
  591. rh.CFrame = multiplyCFrame((curr * righthand),CFrame.new(size, size, size, 1, 1, 1, 1, 1, 1, 1, 1, 1))
  592. lh.Size = Vector3.new(0.2,0.2,0.6) * Vector3.new(size,size,size)
  593. rh.Size = Vector3.new(0.2,0.2,0.6) * Vector3.new(size,size,size)
  594. he.Size = Vector3.new(2,2,2) * Vector3.new(size,size,size)
  595. remote:FireServer("update",{lh.CFrame,rh.CFrame,he.CFrame,size})
  596. end)
  597.  
  598. VRService:SetTouchpadMode(Enum.VRTouchpad.Right, Enum.VRTouchpadMode.ABXY)
  599. local UserInputService = game:GetService("UserInputService")
  600. UserInputService.InputBegan:Connect(function(input, gameProcessed)
  601. if input.KeyCode == Enum.KeyCode.ButtonY then
  602. if size >= 1 then
  603. size = size + 1
  604. elseif size >= 10 then
  605. size = size + 2
  606. elseif size >= 50 then
  607. size = size + 5
  608. elseif size >= 200 then
  609. size = size + 20
  610. elseif size < 1 then
  611. size = size * 2
  612. end
  613. pensize = size/5
  614. distance = 1*pensize
  615. workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
  616. local bon = workspace.CurrentCamera.CFrame
  617. workspace.CurrentCamera.CFrame = CFrame.new(bon.X*-1,0,bon.Z*-1) * CFrame.new(0,5*size,0)
  618. workspace.CurrentCamera.HeadScale = size
  619. elseif input.KeyCode == Enum.KeyCode.ButtonA then
  620. if size <= 1 then
  621. size = size / 2
  622. elseif size <= 10 then
  623. size = size - 1
  624. elseif size > 10 then
  625. size = size - 2
  626. end
  627. pensize = size/5
  628. distance = 1*pensize
  629. distance = 1*pensize
  630. workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
  631. local bon = workspace.CurrentCamera.CFrame
  632. workspace.CurrentCamera.CFrame = CFrame.new(bon.X*-1,0,bon.Z*-1) * CFrame.new(0,5*size,0)
  633. workspace.CurrentCamera.HeadScale = size
  634. elseif input.KeyCode == Enum.KeyCode.ButtonR2 and mode == 0 then
  635. if antispamright == false then
  636. laserrh.Transparency = 0.875
  637. local csc = remote:FireServer("chargeright")
  638. antispamright = true
  639. end
  640. elseif input.KeyCode == Enum.KeyCode.ButtonL2 and mode == 0 then
  641. if antispamleft == false then
  642. laserlh.Transparency = 0.875
  643. local csc = remote:FireServer("chargeleft")
  644. antispamleft = true
  645. end
  646. elseif input.KeyCode == Enum.KeyCode.ButtonR2 and mode == 3 then
  647. if false == false then
  648. local csc = remote
  649. local plr = game.Players.LocalPlayer
  650. local ray = Ray.new(rh.CFrame.p,(rh.CFrame.LookVector) * 1000)
  651. print(tostring(workspace:FindPartOnRayWithIgnoreList(ray, {rh,workspace:FindFirstChild(game.Players.LocalPlayer.Name.."-RightHand")})))
  652. csc:FireServer("GrabRight",{workspace:FindPartOnRayWithIgnoreList(ray, {rh,laserrh,laserlh,workspace:FindFirstChild(game.Players.LocalPlayer.Name.."-RightHand")})})
  653. end
  654. elseif input.KeyCode == Enum.KeyCode.ButtonL2 and mode == 3 then
  655. if false == false then
  656. local csc = remote
  657. local plr = game.Players.LocalPlayer
  658. local ray = Ray.new(lh.CFrame.p,(lh.CFrame.LookVector) * 1000)
  659. csc:FireServer("GrabLeft",{workspace:FindPartOnRayWithIgnoreList(ray, {lh,laserrh,laserlh,workspace:FindFirstChild(game.Players.LocalPlayer.Name.."-LeftHand")})})
  660. end
  661. elseif input.KeyCode == Enum.KeyCode.ButtonR2 and mode == 6 then
  662. local hit = (rh.CFrame * CFrame.new(0,0,-0.8*size)).p
  663. lastpart = hit
  664. drawing = true
  665. elseif input.KeyCode == Enum.KeyCode.ButtonL2 and mode == 4 then
  666. local ray = Ray.new(lh.CFrame.p,(lh.CFrame.LookVector) * 1000)
  667. local target = workspace:FindPartOnRayWithIgnoreList(ray, {lh,laserrh,laserlh,workspace:FindFirstChild(game.Players.LocalPlayer.Name.."-RightHand")})
  668. if isValid(target) then
  669. lastposL = target.Position
  670. currentcfL = lh.CFrame:toObjectSpace(target.CFrame)
  671. currentpartL = target
  672. remote:FireServer("anchor",currentpartL)
  673. end
  674. elseif input.KeyCode == Enum.KeyCode.ButtonR2 and mode == 4 then
  675. local ray = Ray.new(rh.CFrame.p,(rh.CFrame.LookVector) * 1000)
  676. local target = workspace:FindPartOnRayWithIgnoreList(ray, {rh,laserrh,laserlh,workspace:FindFirstChild(game.Players.LocalPlayer.Name.."-RightHand")})
  677. if isValid(target) then
  678. lastposR = target.Position
  679. currentcfR = rh.CFrame:toObjectSpace(target.CFrame)
  680. currentpartR = target
  681. remote:FireServer("anchor",currentpartR)
  682. end
  683. elseif input.KeyCode == Enum.KeyCode.ButtonL2 and mode == 8 then
  684. remote:FireServer("SpawnL")
  685. npL = true
  686. elseif input.KeyCode == Enum.KeyCode.ButtonR2 and mode == 8 then
  687. remote:FireServer("SpawnR")
  688. npR = true
  689. elseif input.KeyCode == Enum.KeyCode.ButtonL1 then
  690. if antispamleft == false and antispamright == false then
  691. --grip left
  692. mode = mode - 1
  693. if mode < 0 then
  694. mode = maxmodes
  695. end
  696. changeMode()
  697. end
  698. elseif input.KeyCode == Enum.KeyCode.ButtonR1 then
  699. if antispamleft == false and antispamright == false then
  700. --grip left
  701. mode = mode + 1
  702. if mode > maxmodes then
  703. mode = 0
  704. end
  705. changeMode()
  706. end
  707. end
  708. selec1.LineThickness = 0.0096 * size
  709. selec2.LineThickness = 0.0096 * size
  710. end)
  711.  
  712. UserInputService.InputEnded:Connect(function(input, gameProcessed)
  713. if input.KeyCode == Enum.KeyCode.ButtonR2 and mode == 0 then
  714. if antispamright == true then
  715. local csc = remote
  716. local plr = game.Players.LocalPlayer
  717. local tool = script.Parent
  718. local ray = Ray.new(rh.CFrame.p,(rh.CFrame.LookVector*Vector3.new(-1,-1,-1)) * 1000)
  719. csc:FireServer("ShootRight",{ray,rh.CFrame})
  720. laserrh.Transparency = 1
  721. antispamright = false
  722. end
  723. elseif input.KeyCode == Enum.KeyCode.ButtonL2 and mode == 0 then
  724. if antispamleft == true then
  725. local csc = remote
  726. local plr = game.Players.LocalPlayer
  727. local tool = script.Parent
  728. local ray = Ray.new(rh.CFrame.p,(rh.CFrame.LookVector*Vector3.new(-1,-1,-1)) * 1000)
  729. csc:FireServer("ShootLeft",{ray,lh.CFrame})
  730. laserlh.Transparency = 1
  731. antispamleft = false
  732. end
  733. elseif input.KeyCode == Enum.KeyCode.ButtonR2 and mode == 3 then
  734. remote:FireServer("UngrabRight")
  735. elseif input.KeyCode == Enum.KeyCode.ButtonL2 and mode == 3 then
  736. remote:FireServer("UngrabLeft")
  737. elseif input.KeyCode == Enum.KeyCode.ButtonR2 and mode == 4 then
  738. --currentpart.Velocity = Vector3.new(vel.X*(20*yeetstr),vel.Y*(20*yeetstr),vel.Z*(20*yeetstr))
  739. remote:FireServer("unanchor",{currentpartR,Vector3.new(velR.X*(20*yeetstr),velR.Y*(20*yeetstr),velR.Z*(20*yeetstr))})
  740. velR = Vector3.new(0,0,0)
  741. currentpartR = nil
  742. currentcfR = nil
  743. elseif input.KeyCode == Enum.KeyCode.ButtonL2 and mode == 4 then
  744. --currentpart.Velocity = Vector3.new(vel.X*(20*yeetstr),vel.Y*(20*yeetstr),vel.Z*(20*yeetstr))
  745. remote:FireServer("unanchor",{currentpartL,Vector3.new(velL.X*(20*yeetstr),velL.Y*(20*yeetstr),velL.Z*(20*yeetstr))})
  746. velL = Vector3.new(0,0,0)
  747. currentpartL = nil
  748. currentcfL = nil
  749. elseif input.KeyCode == Enum.KeyCode.ButtonR2 and mode == 6 then
  750. lastpart = nil
  751. drawing = false
  752. update()
  753. elseif input.KeyCode == Enum.KeyCode.ButtonL2 and mode == 8 then
  754. remote:FireServer("DropL")
  755. npL = false
  756. elseif input.KeyCode == Enum.KeyCode.ButtonR2 and mode == 8 then
  757. remote:FireServer("DropR")
  758. npR = false
  759. end
  760. end)
  761.  
  762. function chat(mod,msg)
  763. wait(.2)
  764. updatechat(mod.Name..": "..msg)
  765. local bap = mod.Head:FindFirstChild('bap')
  766. if bap ~= nil then
  767. local textlabel = mod.Head.bap.TextLabel
  768. textlabel.Text = msg
  769. coroutine.resume(coroutine.create(function()
  770. wait(8)
  771. if textlabel.Text == msg then
  772. textlabel.Text = ""
  773. end
  774. end))
  775. else
  776. coroutine.resume(coroutine.create(function()
  777. local bill = Instance.new("BillboardGui",mod.Head)
  778. bill.Name = "bap"
  779. bill.LightInfluence = 0
  780. bill.Size = UDim2.new(10,0,4,0)
  781. bill.StudsOffset = Vector3.new(0,2,0)
  782. local textlabel = Instance.new("TextLabel",bill)
  783. textlabel.Size = UDim2.new(1,0,1,0)
  784. textlabel.BackgroundTransparency = 1
  785. textlabel.TextColor3 = Color3.fromRGB(255,255,255)
  786. textlabel.TextStrokeColor3 = Color3.fromRGB(0,0,0)
  787. textlabel.TextStrokeTransparency = 0
  788. textlabel.Text = msg
  789. coroutine.resume(coroutine.create(function()
  790. wait(8)
  791. if textlabel.Text == msg then
  792. textlabel.Text = ""
  793. end
  794. end))
  795. end))
  796. end
  797. end
  798. for i,v in pairs(game.Players:GetChildren()) do
  799. coroutine.resume(coroutine.create(function()
  800. v.Chatted:Connect(function(msg)
  801. chat(v.Character,msg)
  802. end)
  803. local bill = Instance.new("BillboardGui",v.Character.Head)
  804. bill.Name = "bap"
  805. bill.LightInfluence = 0
  806. bill.Size = UDim2.new(10,0,4,0)
  807. bill.StudsOffset = Vector3.new(0,2,0)
  808. local textlabel = Instance.new("TextLabel",bill)
  809. textlabel.Size = UDim2.new(1,0,1,0)
  810. textlabel.BackgroundTransparency = 1
  811. textlabel.TextColor3 = Color3.fromRGB(255,255,255)
  812. textlabel.TextStrokeColor3 = Color3.fromRGB(0,0,0)
  813. textlabel.TextStrokeTransparency = 0
  814. textlabel.Text = ""
  815. end))
  816. end
  817. game.Players.PlayerAdded:Connect(function(plr)
  818. coroutine.resume(coroutine.create(function()
  819. plr.Chatted:Connect(function(msg)
  820. chat(plr.Character,msg)
  821. end)
  822. local bill = Instance.new("BillboardGui",plr.Character.Head)
  823. bill.Name = "bap"
  824. bill.LightInfluence = 0
  825. bill.Size = UDim2.new(10,0,4,0)
  826. bill.StudsOffset = Vector3.new(0,2,0)
  827. local textlabel = Instance.new("TextLabel",bill)
  828. textlabel.Size = UDim2.new(1,0,1,0)
  829. textlabel.BackgroundTransparency = 1
  830. textlabel.TextColor3 = Color3.fromRGB(255,255,255)
  831. textlabel.TextStrokeColor3 = Color3.fromRGB(0,0,0)
  832. textlabel.TextStrokeTransparency = 0
  833. textlabel.Text = ""
  834. end))
  835. end)
  836.  
  837. coroutine.resume(coroutine.create(function()
  838. game:GetService("RunService").RenderStepped:connect(function()
  839. Partt.CFrame = (lh.CFrame * CFrame.new(0,-0.25*size,0)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),0,0)
  840. Partt.Size = Vector3.new(0.668*size, 0.77*size, 0.05*size)
  841. local plr = game.Players.LocalPlayer
  842. --righthand
  843. local ray = Ray.new(rh.CFrame.p,(rh.CFrame.LookVector) * 1000)
  844. local cf = rh.CFrame
  845. local part, position = workspace:FindPartOnRay(ray, plr.Character, false, true)
  846. local distance = ((cf.p - position)).magnitude
  847. laserrh.Size = Vector3.new((0.125*size)/4, (0.125*size)/4, distance)
  848. laserrh.CFrame = CFrame.new(cf.p, position) * CFrame.new(0, 0, -distance / 2)
  849. --lefthand
  850. local ray = Ray.new(lh.CFrame.p,(lh.CFrame.LookVector) * 1000)
  851. local cf = lh.CFrame
  852. local part, position = workspace:FindPartOnRay(ray, plr.Character, false, true)
  853. local distance = ((cf.p - position)).magnitude
  854. laserlh.Size = Vector3.new((0.125*size)/4, (0.125*size)/4, distance)
  855. laserlh.CFrame = CFrame.new(cf.p, position) * CFrame.new(0, 0, -distance / 2)
  856. if laserrh.Transparency == 1 and laserlh.Transparency == 1 then
  857. wait(.5)
  858. end
  859. end)
  860. end))
  861.  
  862. coroutine.resume(coroutine.create(function()
  863. game:GetService("RunService").RenderStepped:connect(function()
  864. if npL == true then
  865. remote:FireServer("UpdateL")
  866. end
  867. if npR == true then
  868. remote:FireServer("UpdateR")
  869. end
  870. if currentpartL ~= nil and currentcfL ~= nil then
  871. currentpartL.CFrame = lh.CFrame * currentcfL
  872. remote:FireServer("updateLL",{currentpartL,currentpartL.CFrame})
  873. velL = Vector3.new(currentpartL.Position.X-lastposL.X,currentpartL.Position.Y-lastposL.Y,currentpartL.Position.Z-lastposL.Z)
  874. lastposL = currentpartL.Position
  875. end
  876. if currentpartR ~= nil and currentcfR ~= nil then
  877. currentpartR.CFrame = rh.CFrame * currentcfR
  878. remote:FireServer("updateRR",{currentpartR,currentpartR.CFrame})
  879. velR = Vector3.new(currentpartR.Position.X-lastposR.X,currentpartR.Position.Y-lastposR.Y,currentpartR.Position.Z-lastposR.Z)
  880. lastposR = currentpartR.Position
  881. end
  882. end)
  883. end))
  884.  
  885. coroutine.resume(coroutine.create(function()
  886. game:GetService("RunService").RenderStepped:Connect(function()
  887. if drawing and (folder ~= nil and folder.Parent ~= nil) then
  888. if lastpart == nil then
  889. lastpart = (rh.CFrame * CFrame.new(0,0,-0.8*size)).p
  890. else
  891. local pos1 = lastpart
  892. local pos2 = (rh.CFrame * CFrame.new(0,0,-0.8*size)).p
  893. local pos3 = Vector3.new(math.abs(pos1.X-pos2.X),math.abs(pos1.Y-pos2.Y),math.abs(pos1.Z-pos2.Z))
  894. if pos3.X + pos3.Y + pos3.Z >= distance*1.35 then
  895. if lastline ~= nil then
  896. lastline:Destroy()
  897. end
  898. local lastpar = pos2
  899. drawLine(lastpart,lastpar)
  900. lastpart = lastpar
  901. else
  902. if lastline ~= nil then
  903. lastline:Destroy()
  904. end
  905. if lastpart2 == nil then
  906. lastpart2 = pos2
  907. else
  908. lastpart2 = pos2
  909. end
  910. lastline = drawLine(lastpart,lastpart2)
  911. end
  912. end
  913. elseif drawing and (folder == nil or folder.Parent == nil) then
  914. folder = Instance.new("Folder",workspace)
  915. folder.Name = "DrawStuff"
  916. else
  917. lastpart2 = nil
  918. lastline = nil
  919. end
  920. end)
  921. end))
  922.  
  923. while wait(1) do
  924. if selec1.Adornee == nil then
  925. coroutine.resume(coroutine.create(function()
  926. wait(1)
  927. workspace:FindFirstChild(game.Players.LocalPlayer.Name.."-Head").Transparency = 1
  928. selec1.Adornee = workspace:FindFirstChild(game.Players.LocalPlayer.Name.."-LeftHand")
  929. selec2.Adornee = workspace:FindFirstChild(game.Players.LocalPlayer.Name.."-RightHand")
  930. workspace:FindFirstChild(game.Players.LocalPlayer.Name.."-LeftHand").Transparency = 1
  931. workspace:FindFirstChild(game.Players.LocalPlayer.Name.."-RightHand").Transparency = 1
  932. end))
  933. end
  934. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement