Advertisement
ArtiusFox

[Roblox Script] Pro Draw Tool (Neodymn)

Oct 17th, 2018
14,870
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 17.97 KB | None | 0 0
  1. -- (Keys remapped by ArtiusFox)
  2.  
  3. -- Toggle : [=]        (enable / disable drawing)
  4. -- Undo : [Q]          (remove last drawn line in canvas)
  5. -- Draw : [Left Click] (draw)
  6. -- Clear : [E]         (clear canvas)
  7. -- Rainbow : [R]       (toggle rainbow color drawings)
  8. -- Neon Glow : [G]     (toggle glowing drawings)
  9. -- Other in GUI
  10. -- Toxicity : [T]      (toggle toxicity aka kills people)
  11.  
  12. local plr = game:GetService("Players").LocalPlayer
  13. char = plr.Character
  14. mouse = plr:GetMouse()
  15.  
  16. function tween(object,style,direction,t,goal)
  17.     local tweenservice = game:GetService("TweenService")
  18.     local tweenInfo = TweenInfo.new(t,Enum.EasingStyle[style],Enum.EasingDirection[direction])
  19.     local tween = tweenservice:Create(object,tweenInfo,goal)
  20.     tween:Play()
  21.     return tween
  22. end
  23.  
  24. enabled = true
  25.  
  26. local pgui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  27.  
  28. GUI = Instance.new("ScreenGui")
  29. GUI.ResetOnSpawn = false
  30. Frame1 = Instance.new("Frame")
  31. TextLabel2 = Instance.new("TextLabel")
  32. Frame3 = Instance.new("Frame")
  33. Frame4 = Instance.new("Frame")
  34. Frame5 = Instance.new("Frame")
  35. Frame6 = Instance.new("Frame")
  36. TextLabel7 = Instance.new("TextLabel")
  37. TextLabel8 = Instance.new("TextLabel")
  38. TextLabel9 = Instance.new("TextLabel")
  39. TextLabel10 = Instance.new("TextLabel")
  40. Frame11 = Instance.new("Frame")
  41. Frame12 = Instance.new("Frame")
  42. Frame13 = Instance.new("Frame")
  43. Frame14 = Instance.new("Frame")
  44. Frame15 = Instance.new("Frame")
  45. Frame16 = Instance.new("Frame")
  46. ImageButton17 = Instance.new("ImageButton")
  47. TextLabel18 = Instance.new("TextLabel")
  48. ImageButton19 = Instance.new("ImageButton")
  49. LocalScript20 = Instance.new("LocalScript")
  50. Color3Value21 = Instance.new("Color3Value")
  51. TextLabel22 = Instance.new("TextLabel")
  52. TextLabel23 = Instance.new("TextLabel")
  53. TextLabel24 = Instance.new("TextLabel")
  54. TextLabel25 = Instance.new("TextLabel")
  55. GUI.Parent = pgui
  56. Frame1.Name = "Settings"
  57. Frame1.Parent = GUI
  58. Frame1.Transparency = 0.80000001192093
  59. Frame1.Size = UDim2.new(0, 191, 0, 130)
  60. Frame1.Position = UDim2.new(0, 266, 0, 130)
  61. Frame1.Active = true
  62. Frame1.BackgroundColor3 = Color3.new(0.0470588, 0.0509804, 0.0588235)
  63. Frame1.BackgroundTransparency = 0.80000001192093
  64. Frame1.BorderColor3 = Color3.new(1, 1, 1)
  65. Frame1.BorderSizePixel = 0
  66. Frame1.Draggable = true
  67. TextLabel2.Parent = Frame1
  68. TextLabel2.Size = UDim2.new(0, 191, 0, 15)
  69. TextLabel2.Text = "Neodymn's Draw Tool"
  70. TextLabel2.Position = UDim2.new(0, 0, 0, 5)
  71. TextLabel2.BackgroundColor3 = Color3.new(1, 1, 1)
  72. TextLabel2.BackgroundTransparency = 1
  73. TextLabel2.Font = Enum.Font.SourceSansBold
  74. TextLabel2.TextSize = 22
  75. TextLabel2.TextColor3 = Color3.new(1, 1, 1)
  76. TextLabel2.TextStrokeColor3 = Color3.new(1, 1, 1)
  77. TextLabel2.TextWrapped = false
  78. Frame3.Parent = Frame1
  79. Frame3.Size = UDim2.new(0, 3, 1, 0)
  80. Frame3.Position = UDim2.new(0, -3, 0, 0)
  81. Frame3.BackgroundColor3 = Color3.new(1, 1, 1)
  82. Frame3.BorderSizePixel = 0
  83. Frame4.Parent = Frame1
  84. Frame4.Size = UDim2.new(0, 3, 1, 0)
  85. Frame4.Position = UDim2.new(1, 0, 0, 0)
  86. Frame4.BackgroundColor3 = Color3.new(1, 1, 1)
  87. Frame4.BorderSizePixel = 0
  88. Frame5.Parent = Frame1
  89. Frame5.Size = UDim2.new(1, 0, 0, 3)
  90. Frame5.Position = UDim2.new(0, 0, 0, -3)
  91. Frame5.BackgroundColor3 = Color3.new(1, 1, 1)
  92. Frame5.BorderSizePixel = 0
  93. Frame6.Parent = Frame1
  94. Frame6.Size = UDim2.new(1, 0, 0, 3)
  95. Frame6.Position = UDim2.new(0, 0, 1, 0)
  96. Frame6.BackgroundColor3 = Color3.new(1, 1, 1)
  97. Frame6.BorderSizePixel = 0
  98. TextLabel7.Parent = Frame1
  99. TextLabel7.Size = UDim2.new(0, 95, 0, 25)
  100. TextLabel7.Text = "Thickness (m/n)"
  101. TextLabel7.Position = UDim2.new(0, 5, 0, 25)
  102. TextLabel7.BackgroundColor3 = Color3.new(1, 1, 1)
  103. TextLabel7.BackgroundTransparency = 1
  104. TextLabel7.Font = Enum.Font.SourceSansBold
  105. TextLabel7.TextSize = 20
  106. TextLabel7.TextColor3 = Color3.new(1, 1, 1)
  107. TextLabel7.TextStrokeColor3 = Color3.new(1, 1, 1)
  108. TextLabel7.TextXAlignment = Enum.TextXAlignment.Left
  109. TextLabel8.Parent = Frame1
  110. TextLabel8.Size = UDim2.new(0, 95, 0, 25)
  111. TextLabel8.Text = "Can Collide (c)"
  112. TextLabel8.Position = UDim2.new(0, 5, 0, 50)
  113. TextLabel8.BackgroundColor3 = Color3.new(1, 1, 1)
  114. TextLabel8.BackgroundTransparency = 1
  115. TextLabel8.Font = Enum.Font.SourceSansBold
  116. TextLabel8.TextSize = 20
  117. TextLabel8.TextColor3 = Color3.new(1, 1, 1)
  118. TextLabel8.TextStrokeColor3 = Color3.new(1, 1, 1)
  119. TextLabel8.TextXAlignment = Enum.TextXAlignment.Left
  120. TextLabel9.Parent = Frame1
  121. TextLabel9.Size = UDim2.new(0, 95, 0, 25)
  122. TextLabel9.Text = "Opacity (b/v)"
  123. TextLabel9.Position = UDim2.new(0, 5, 0, 75)
  124. TextLabel9.BackgroundColor3 = Color3.new(1, 1, 1)
  125. TextLabel9.BackgroundTransparency = 1
  126. TextLabel9.Font = Enum.Font.SourceSansBold
  127. TextLabel9.TextSize = 20
  128. TextLabel9.TextColor3 = Color3.new(1, 1, 1)
  129. TextLabel9.TextStrokeColor3 = Color3.new(1, 1, 1)
  130. TextLabel9.TextXAlignment = Enum.TextXAlignment.Left
  131. TextLabel10.Parent = Frame1
  132. TextLabel10.Size = UDim2.new(0, 95, 0, 25)
  133. TextLabel10.Text = "Color (r)"
  134. TextLabel10.Position = UDim2.new(0, 5, 0, 100)
  135. TextLabel10.BackgroundColor3 = Color3.new(1, 1, 1)
  136. TextLabel10.BackgroundTransparency = 1
  137. TextLabel10.Font = Enum.Font.SourceSansBold
  138. TextLabel10.TextSize = 20
  139. TextLabel10.TextColor3 = Color3.new(1, 1, 1)
  140. TextLabel10.TextStrokeColor3 = Color3.new(1, 1, 1)
  141. TextLabel10.TextXAlignment = Enum.TextXAlignment.Left
  142. Frame11.Name = "Color"
  143. Frame11.Parent = Frame1
  144. Frame11.Transparency = 0.80000001192093
  145. Frame11.Size = UDim2.new(0, 121, 0, 115)
  146. Frame11.Position = UDim2.new(0, 201, 0, 15)
  147. Frame11.BackgroundColor3 = Color3.new(0.0470588, 0.0509804, 0.0588235)
  148. Frame11.BackgroundTransparency = 0.80000001192093
  149. Frame11.BorderColor3 = Color3.new(1, 1, 1)
  150. Frame11.BorderSizePixel = 0
  151. Frame11.Draggable = true
  152. Frame12.Parent = Frame11
  153. Frame12.Size = UDim2.new(0, 3, 1, 0)
  154. Frame12.Position = UDim2.new(1, 0, 0, 0)
  155. Frame12.BackgroundColor3 = Color3.new(1, 1, 1)
  156. Frame12.BorderSizePixel = 0
  157. Frame13.Parent = Frame11
  158. Frame13.Size = UDim2.new(1, 0, 0, 3)
  159. Frame13.Position = UDim2.new(0, 0, 0, -3)
  160. Frame13.BackgroundColor3 = Color3.new(1, 1, 1)
  161. Frame13.BorderSizePixel = 0
  162. Frame14.Parent = Frame11
  163. Frame14.Size = UDim2.new(1, 0, 0, 3)
  164. Frame14.Position = UDim2.new(0, 0, 1, 0)
  165. Frame14.BackgroundColor3 = Color3.new(1, 1, 1)
  166. Frame14.BorderSizePixel = 0
  167. Frame15.Parent = Frame11
  168. Frame15.Size = UDim2.new(0, 3, 1, 0)
  169. Frame15.Position = UDim2.new(0, -3, 0, 0)
  170. Frame15.BackgroundColor3 = Color3.new(1, 1, 1)
  171. Frame15.BorderSizePixel = 0
  172. Frame16.Name = "Picker"
  173. Frame16.Parent = Frame11
  174. Frame16.Transparency = 1
  175. Frame16.Size = UDim2.new(0, 286, 0, 255)
  176. Frame16.Position = UDim2.new(0, -372, 0, -55)
  177. Frame16.BackgroundColor3 = Color3.new(0.498039, 0.247059, 0.247059)
  178. Frame16.BackgroundTransparency = 1
  179. Frame16.BorderColor3 = Color3.new(0, 0, 0)
  180. ImageButton17.Name = "SV"
  181. ImageButton17.Parent = Frame16
  182. ImageButton17.Size = UDim2.new(0, 101, 0, 105)
  183. ImageButton17.Position = UDim2.new(0, 377, 0, 60)
  184. ImageButton17.BackgroundColor3 = Color3.new(1, 0, 0)
  185. ImageButton17.BorderColor3 = Color3.new(0, 0, 0)
  186. ImageButton17.BorderSizePixel = 0
  187. ImageButton17.AutoButtonColor = false
  188. ImageButton17.Image = "http://www.roblox.com/asset/?id=42462986"
  189. TextLabel18.Name = "Locator"
  190. TextLabel18.Parent = ImageButton17
  191. TextLabel18.Text = "o"
  192. TextLabel18.Position = UDim2.new(0.5, 0, 0.5, 0)
  193. TextLabel18.BorderColor3 = Color3.new(0, 0, 0)
  194. TextLabel18.FontSize = Enum.FontSize.Size12
  195. TextLabel18.TextColor3 = Color3.new(1, 1, 1)
  196. ImageButton19.Name = "H"
  197. ImageButton19.Parent = Frame16
  198. ImageButton19.Size = UDim2.new(0, 10, 0, 105)
  199. ImageButton19.Position = UDim2.new(0, 477, 0, 60)
  200. ImageButton19.BorderColor3 = Color3.new(0, 0, 0)
  201. ImageButton19.BorderSizePixel = 0
  202. ImageButton19.AutoButtonColor = false
  203. ImageButton19.Image = "http://www.roblox.com/asset/?id=42463044"
  204. LocalScript20.Parent = Frame16
  205. Color3Value21.Name = "Col"
  206. Color3Value21.Parent = Frame11
  207. TextLabel22.Name = "ColorT"
  208. TextLabel22.Parent = Frame1
  209. TextLabel22.Size = UDim2.new(0, 65, 0, 25)
  210. TextLabel22.Text = "0, 0, 0"
  211. TextLabel22.Position = UDim2.new(0, 126, 0, 100)
  212. TextLabel22.BackgroundColor3 = Color3.new(1, 1, 1)
  213. TextLabel22.BackgroundTransparency = 1
  214. TextLabel22.Font = Enum.Font.SourceSansBold
  215. TextLabel22.TextSize = 20
  216. TextLabel22.TextColor3 = Color3.new(1, 1, 1)
  217. TextLabel22.TextScaled = true
  218. TextLabel22.TextStrokeColor3 = Color3.new(1, 1, 1)
  219. TextLabel22.TextWrapped = true
  220. TextLabel23.Name = "Transparent"
  221. TextLabel23.Parent = Frame1
  222. TextLabel23.Size = UDim2.new(0, 25, 0, 25)
  223. TextLabel23.Text = "0"
  224. TextLabel23.Position = UDim2.new(0, 146, 0, 75)
  225. TextLabel23.BackgroundColor3 = Color3.new(1, 1, 1)
  226. TextLabel23.BackgroundTransparency = 1
  227. TextLabel23.Font = Enum.Font.SourceSansBold
  228. TextLabel23.TextSize = 20
  229. TextLabel23.TextColor3 = Color3.new(1, 1, 1)
  230. TextLabel23.TextStrokeColor3 = Color3.new(1, 1, 1)
  231. TextLabel23.TextWrapped = true
  232. TextLabel24.Name = "CanCollide"
  233. TextLabel24.Parent = Frame1
  234. TextLabel24.Size = UDim2.new(0, 55, 0, 25)
  235. TextLabel24.Text = "false"
  236. TextLabel24.Position = UDim2.new(0, 131, 0, 50)
  237. TextLabel24.BackgroundColor3 = Color3.new(1, 1, 1)
  238. TextLabel24.BackgroundTransparency = 1
  239. TextLabel24.Font = Enum.Font.SourceSansBold
  240. TextLabel24.TextSize = 20
  241. TextLabel24.TextColor3 = Color3.new(1, 1, 1)
  242. TextLabel24.TextStrokeColor3 = Color3.new(1, 1, 1)
  243. TextLabel24.TextWrapped = true
  244. TextLabel25.Name = "Thickness"
  245. TextLabel25.Parent = Frame1
  246. TextLabel25.Size = UDim2.new(0, 25, 0, 25)
  247. TextLabel25.Text = "1"
  248. TextLabel25.Position = UDim2.new(0, 146, 0, 25)
  249. TextLabel25.BackgroundColor3 = Color3.new(1, 1, 1)
  250. TextLabel25.BackgroundTransparency = 1
  251. TextLabel25.Font = Enum.Font.SourceSansBold
  252. TextLabel25.TextSize = 20
  253. TextLabel25.TextColor3 = Color3.new(1, 1, 1)
  254. TextLabel25.TextStrokeColor3 = Color3.new(1, 1, 1)
  255. TextLabel25.TextWrapped = true
  256.  
  257. presets = GUI.Settings
  258. colors = presets.Color
  259.  
  260. function round(num, numDecimalPlaces)
  261.   local mult = 10^(numDecimalPlaces or 0)
  262.   return tostring(math.floor(num * mult + 0.5) / mult)
  263. end
  264.  
  265. spawn(function()
  266.     local frame = colors.Picker
  267.     local sv = frame.SV
  268.     local h = frame.H
  269.     local locator = sv.Locator
  270.    
  271.     local hue = 0
  272.     local saturation = 0.5
  273.     local value = 0.5
  274.    
  275.     local changingHue = false
  276.     local changingSv = false
  277.    
  278.     function getRGBfromHue()
  279.         local r,g,b = 0,0,0
  280.         if hue>=120 and hue<=240 then r = 0
  281.         elseif hue>=300 or hue<=60 then r = 1
  282.         elseif hue>60 and hue<120 then r = 1-(hue-60)/60
  283.         elseif hue>240 and hue<300 then r = (hue-240)/60
  284.         end
  285.    
  286.         if hue>=240 and hue<=360 then g = 0
  287.         elseif hue>=60 and hue<=180 then g = 1
  288.         elseif hue>180 and hue<240 then g = 1-(hue-180)/60
  289.         elseif hue<60 then g = hue/60
  290.         end
  291.    
  292.         if hue<=120 then b = 0
  293.         elseif hue>=180 and hue<=300 then b = 1
  294.         elseif hue>120 and hue<180 then b = (hue-120)/60
  295.         elseif hue>300 and hue<360 then b = 1-(hue-300)/60
  296.         end
  297.         return r,g,b
  298.     end
  299.    
  300.     function changeHue(x,y)
  301.         if not changingHue then return end
  302.         hue = 360*(1-(y-h.AbsolutePosition.y)/h.AbsoluteSize.y)+85
  303.    
  304.         local r,g,b = getRGBfromHue()
  305.    
  306.         sv.BackgroundColor3 = Color3.new(r,g,b)
  307.         toRGB()
  308.     end
  309.    
  310.     function changeSv(x,y)
  311.         if not changingSv then return end
  312.         local x,y = x-sv.AbsolutePosition.x,y-sv.AbsolutePosition.y-35
  313.         locator.Position = UDim2.new(0,x,0,y)
  314.         if y>=(sv.AbsoluteSize.y)/2 then locator.TextColor3 = Color3.new(1,1,1) else locator.TextColor3 = Color3.new(0,0,0) end
  315.         saturation,value = 1-(x/sv.AbsoluteSize.x), 1-(y/sv.AbsoluteSize.y)
  316.         toRGB()
  317.     end
  318.    
  319.     function toRGB()
  320.         local r,g,b = getRGBfromHue()
  321.    
  322.         local max = math.max(r,g,b)
  323.         r,g,b = value*(r+saturation*(max-r)),value*(g+saturation*(max-g)),value*(b+saturation*(max-b))
  324.    
  325.    
  326.         colors.Col.Value = Color3.new(r,g,b)
  327.     end
  328.    
  329.     h.MouseButton1Down:connect(function(x,y) changingHue = true changeHue(x,y) end)
  330.     h.MouseButton1Up:connect(function() changingHue = false end)
  331.     h.MouseMoved:connect(changeHue)
  332.    
  333.     sv.MouseButton1Down:connect(function(x,y) changingSv = true changeSv(x,y) end)
  334.     sv.MouseButton1Up:connect(function() changingSv = false end)
  335.     sv.MouseMoved:connect(changeSv)
  336. end)
  337.  
  338. spawn(function()
  339.     while wait() do
  340.         if transparency < 0 then transparency = 0 end
  341.         if transparency > 1 then transparency = 0 end
  342.         color = colors.Col.Value
  343.         local c = color
  344.         if c.r < 0 then
  345.             c = Color3.new(0,c.g,c.b)
  346.         end
  347.         if c.g < 0 then
  348.             c = Color3.new(c.r,0,c.b)
  349.         end
  350.         if c.b < 0 then
  351.             c = Color3.new(c.r,c.g,0)
  352.         end
  353.         if c.r > 1 then
  354.             c = Color3.new(1,c.g,c.b)
  355.         end
  356.         if c.g > 1 then
  357.             c = Color3.new(c.r,1,c.b)
  358.         end
  359.         if c.b > 1 then
  360.             c = Color3.new(c.r,c.g,1)
  361.         end
  362.         color = c
  363.         colors.Col.Value = c
  364.         presets.ColorT.Text = round(color.r,1)..", "..round(color.g,1)..", "..round(color.b,1)
  365.         presets.Transparent.Text = tostring(transparency)
  366.         local th = tostring(thickness)
  367.         if thickness < 0.15 then
  368.             th = '0.1'
  369.         end
  370.         presets.Thickness.Text = tostring(th)
  371.         presets.CanCollide.Text = tostring(canCollide)
  372.     end
  373. end)
  374.  
  375. local UIS = game:GetService("UserInputService")
  376. UIS.InputEnded:connect(function(k,g)
  377.     if k.KeyCode == Enum.KeyCode.Equals and not g then
  378.         enabled = not enabled
  379.     end
  380. end)
  381.  
  382. drawings = Instance.new("Model",workspace)
  383. drawings.Name = "Drawings"
  384.  
  385. lastd = nil
  386.  
  387. spawn(function()
  388.     while wait() do
  389.         mouse = plr:GetMouse()
  390.         if drawings == nil then
  391.             drawings = Instance.new("Model",workspace)
  392.             drawings.Name = "Drawings"
  393.         end
  394.         if drawings.Parent ~= workspace then
  395.             drawings.Parent = workspace
  396.         end
  397.     end
  398. end)
  399.  
  400. canCollide = false
  401. canStack = false
  402. thickness = 1
  403. color = Color3.new(1,0,0)
  404. transparency = 0
  405. interval = 0.1
  406. rainbow = false
  407.  
  408.  
  409. lastm = nil
  410.  
  411. drawing = false
  412.  
  413. neon = false
  414.  
  415.  
  416. local zDown = false
  417.  
  418. mdown = false
  419. ndown = false
  420. bdown = false
  421. vdown = false
  422.  
  423. spawn(function()
  424.     while wait() do
  425.         if ndown == true then
  426.             if not (thickness < 0.2) then
  427.                 thickness = thickness - 0.2
  428.             end
  429.         end
  430.         if mdown == true then
  431.             if (thickness < 20) then
  432.                 thickness = thickness + 0.2
  433.             end
  434.         end
  435.         if bdown == true then
  436.             if (transparency < 0.9) then
  437.                 transparency = transparency + 0.1
  438.                 wait(0.1)
  439.             end
  440.         end
  441.         if vdown == true then
  442.             if (transparency > 0) then
  443.                 transparency = transparency - 0.1
  444.             end
  445.             if string.sub(tostring(transparency),1,3) == "2.7" then transparency = 0 end
  446.             wait(0.1)
  447.         end
  448.     end
  449. end)
  450. killer = false
  451. mouse.KeyDown:connect(function(k)
  452.     if enabled == false then return end
  453.     local key = k:lower()
  454.     if key == "m" then
  455.         mdown = true
  456.     end
  457.     if key == "t" then
  458.         killer = not killer
  459.     end
  460.     if key == "n" then
  461.         ndown = true
  462.     end
  463.     if key == "g" then
  464.         neon = not neon
  465.     end
  466.     if key == "b" then
  467.         bdown = true
  468.     end
  469.     if key == "v" then
  470.         vdown = true
  471.     end
  472.     if key == "q" then
  473.         zDown = true
  474.         local draw = drawings[#drawings:GetChildren()]
  475.         if not draw then return end
  476.         draw:Destroy()
  477.     end
  478.     if key == "e" then
  479.         drawings:ClearAllChildren()
  480.     end
  481.     if key == "r" then
  482.         rainbow = not rainbow
  483.     end
  484.     if key == "c" then
  485.         canCollide = not canCollide
  486.     end
  487. end)
  488.  
  489. mouse.KeyUp:connect(function(k)
  490.     local key = k:lower()
  491.     if key == "m" then
  492.         mdown = false
  493.     end
  494.     if key == "n" then
  495.         ndown = false
  496.     end
  497.     if key == "b" then
  498.         bdown = false
  499.     end
  500.     if key == "v" then
  501.         vdown = false
  502.     end
  503.     if key == "q" then
  504.         zDown = false
  505.     end
  506. end)
  507.  
  508. local uis = game:GetService("UserInputService")
  509. uis.InputBegan:connect(function(k,g)
  510.     if g then return end
  511.     if k.UserInputType == Enum.UserInputType.MouseButton1 then
  512.         drawing = true
  513.     end
  514. end)
  515. uis.InputEnded:connect(function(k,g)
  516.     if k.UserInputType == Enum.UserInputType.MouseButton1 then
  517.         drawing = false
  518.     end
  519. end)
  520.  
  521. spawn(function()
  522.     while wait() do
  523.         if zDown == true then
  524.             local zWasUp = false
  525.             local n = 0
  526.             repeat wait() if zDown == false then zWasUp = true end n = n + 0.5 until n >= 10
  527.             if zDown == true and zWasUp == false then
  528.                 repeat
  529.                     game:GetService("RunService").RenderStepped:Wait()
  530.                     pcall(function()
  531.                         local draw = drawings[#drawings:GetChildren()]
  532.                         draw:Destroy()
  533.                     end)
  534.                 until zDown == false
  535.             end
  536.         end
  537.     end
  538. end)
  539.  
  540. mouse.TargetFilter = drawings
  541. ldraw = nil
  542. game:GetService("RunService").RenderStepped:connect(function()
  543.     if drawing == false then
  544.         lastm = mouse.Hit.p
  545.         ldraw = nil
  546.     end
  547.     print(drawing)
  548.     if drawing == true and (lastm ~= mouse.Hit.p) and enabled then
  549.         local mp = mouse.Hit.p
  550.         local mh = mouse.Hit
  551.         local mt = mouse.Target
  552.         if not ldraw then lastm = mp end
  553.         if true then
  554.             if (mp - lastm).magnitude < thickness*1.5 and ldraw then return end
  555.             local draw = Instance.new("Part",drawings)
  556.             draw.Name = #drawings:GetChildren()
  557.             draw.Anchored = true
  558.             draw.CanCollide = canCollide
  559.             if neon then
  560.                 draw.Material = "Neon"
  561.             else
  562.                 draw.Material = "SmoothPlastic"
  563.             end
  564.             draw.Transparency = transparency
  565.             draw.CFrame = CFrame.new((lastm + mouse.Hit.p)/2,lastm)
  566.            
  567.             draw.Size = Vector3.new(0,0,(lastm - mp).magnitude)
  568.             tween(draw, "Sine", "Out", 0.1, {
  569.                 Size = Vector3.new(thickness,thickness,(lastm - mp).magnitude)
  570.             })
  571.             local orr = draw.Size
  572.            
  573.             if killer then
  574.                 coroutine.resume(coroutine.create(function()
  575.                     local oz = Vector3.new(thickness,thickness,(lastm - mp).magnitude)
  576.                     while draw and draw.Parent == drawings do
  577.                         local t = tween(draw, "Sine", "InOut", 0.5, {
  578.                             Size = oz * 1.2 + Vector3.new(0.25,0.25,0)
  579.                         })
  580.                         t.Completed:Wait(0)
  581.                         local t = tween(draw, "Sine", "InOut", 0.5, {
  582.                             Size = oz
  583.                         })
  584.                         t.Completed:Wait(0)
  585.                     end
  586.                 end))
  587.             end
  588.            
  589.             if rainbow == false then
  590.                 draw.Color = color
  591.             else
  592.                 local start = 0
  593.                 spawn(function()
  594.                     local rs = 1
  595.                     while game:GetService("RunService").RenderStepped:Wait() do
  596.                         game:GetService("RunService").RenderStepped:Wait()
  597.                         game:GetService("RunService").RenderStepped:Wait()
  598.                         if draw == nil or draw.Parent == nil then break end
  599.                         rs = rs + 0.2
  600.                         local r = (math.sin(start/2)/2)+0.5
  601.                         local g = (math.sin(start)/2)+0.5
  602.                         local b = (math.sin(start*1.5)/2)+0.5
  603.                         local color3 = Color3.new(r, g, b)
  604.                         draw.Color = color3
  605.                         start = start + interval + math.abs(math.sin(rs))/10
  606.                     end
  607.                 end)
  608.             end
  609.             ldraw = draw
  610.         end
  611.     end
  612.     lastm = mouse.Hit.p
  613. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement