Advertisement
RobloxScriptzzz

Script

Apr 1st, 2019
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. do
  4. print("Thanks for using this fucking ditch shit i made, its just... it probably don't work.")
  5. script.Parent = Player.Character
  6.  
  7. --RemoteEvent for communicating
  8. local Event = Instance.new("RemoteEvent")
  9. Event.Name = "UserInput_Event"
  10.  
  11. --Fake event to make stuff like Mouse.KeyDown work
  12. local function fakeEvent()
  13. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  14. t.connect = t.Connect
  15. return t
  16. end
  17.  
  18. --Creating fake input objects with fake variables
  19. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  20. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  21. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  22. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  23. end}
  24. --Merged 2 functions into one by checking amount of arguments
  25. CAS.UnbindAction = CAS.BindAction
  26.  
  27. --This function will trigger the events that have been :Connect()'ed
  28. local function te(self,ev,...)
  29. local t = m[ev]
  30. if t and t._fakeEvent and t.Function then
  31. t.Function(...)
  32. end
  33. end
  34. m.TrigEvent = te
  35. UIS.TrigEvent = te
  36.  
  37. Event.OnServerEvent:Connect(function(plr,io)
  38. if plr~=Player then return end
  39. if io.isMouse then
  40. m.Target = io.Target
  41. m.Hit = io.Hit
  42. else
  43. local b = io.UserInputState == Enum.UserInputState.Begin
  44. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  45. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  46. end
  47. for _,t in pairs(CAS.Actions) do
  48. for _,k in pairs(t.Keys) do
  49. if k==io.KeyCode then
  50. t.Function(t.Name,io.UserInputState,io)
  51. end
  52. end
  53. end
  54. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  55. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  56. end
  57. end)
  58. Event.Parent = NLS([==[
  59. local Player = game:GetService("Players").LocalPlayer
  60. local Event = script:WaitForChild("UserInput_Event")
  61.  
  62. local UIS = game:GetService("UserInputService")
  63. local input = function(io,a)
  64. if a then return end
  65. --Since InputObject is a client-side instance, we create and pass table instead
  66. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  67. end
  68. UIS.InputBegan:Connect(input)
  69. UIS.InputEnded:Connect(input)
  70.  
  71. local Mouse = Player:GetMouse()
  72. local h,t
  73. --Give the server mouse data 30 times every second, but only if the values changed
  74. --If player is not moving their mouse, client won't fire events
  75. while wait(1/30) do
  76. if h~=Mouse.Hit or t~=Mouse.Target then
  77. h,t=Mouse.Hit,Mouse.Target
  78. Event:FireServer({isMouse=true,Target=t,Hit=h})
  79. end
  80. end]==],Player.Character)
  81. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  82. end
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89. -- Objects
  90. MIDI = Instance.new("ScreenGui")
  91. Frame = Instance.new("Frame")
  92. ID = Instance.new("TextBox")
  93. Play = Instance.new("TextButton")
  94. Dark = Instance.new("TextButton")
  95. Bright = Instance.new("TextButton")
  96. Stop = Instance.new("TextButton")
  97. Hide = Instance.new("TextButton")
  98. Set = Instance.new("TextButton")
  99. BColor = Instance.new("TextBox")
  100. Random = Instance.new("TextButton")
  101. Material = Instance.new("TextBox")
  102. Trans = Instance.new("TextBox")
  103. sound = Instance.new("Sound",game.Players.owner.Character.Torso)
  104. sound.Volume = 4
  105. sound.Looped = true
  106. BVal = "Deep orange"
  107. MVal = "Neon"
  108. TVal = 0
  109. Active = false
  110.  
  111. -- Properties
  112.  
  113. MIDI.Name = "MIDI"
  114. MIDI.Parent = game.Players.owner.PlayerGui
  115.  
  116. Frame.Parent = MIDI
  117. Frame.Active = true
  118. Frame.BackgroundColor3 = Color3.new(0, 0, 0)
  119. Frame.BackgroundTransparency = 0.5799999833107
  120. Frame.BorderSizePixel = 0
  121. Frame.Draggable = true
  122. Frame.Position = UDim2.new(0, 300, 0, 50)
  123. Frame.Size = UDim2.new(0, 310, 0, 200)
  124.  
  125. ID.Name = "ID"
  126. ID.Parent = Frame
  127. ID.BackgroundColor3 = Color3.new(1, 1, 1)
  128. ID.BorderSizePixel = 0
  129. ID.Position = UDim2.new(0, 100, 0, 10)
  130. ID.Size = UDim2.new(0, 120, 0, 30)
  131. ID.Font = Enum.Font.Arcade
  132. ID.FontSize = Enum.FontSize.Size18
  133. ID.Text = "326906852"
  134. ID.TextColor3 = Color3.new(0, 0, 0)
  135. ID.TextSize = 18
  136.  
  137. Material.Name = "Material"
  138. Material.Parent = Frame
  139. Material.BackgroundColor3 = Color3.new(1, 1, 1)
  140. Material.BorderSizePixel = 0
  141. Material.Position = UDim2.new(0, 210, 0, 95)
  142. Material.Size = UDim2.new(0, 90, 0, 15)
  143. Material.Font = Enum.Font.Arcade
  144. Material.FontSize = Enum.FontSize.Size14
  145. Material.Text = "Neon"
  146. Material.TextSize = 14
  147.  
  148. Trans.Name = "Trans"
  149. Trans.Parent = Frame
  150. Trans.BackgroundColor3 = Color3.new(1, 1, 1)
  151. Trans.BorderSizePixel = 0
  152. Trans.Position = UDim2.new(0, 210, 0, 75)
  153. Trans.Size = UDim2.new(0, 90, 0, 15)
  154. Trans.Font = Enum.Font.Arcade
  155. Trans.FontSize = Enum.FontSize.Size14
  156. Trans.Text = ""
  157. Trans.TextSize = 14
  158.  
  159. Set.Name = "Set"
  160. Set.Parent = Frame
  161. Set.BackgroundColor3 = Color3.new(1, 1, 1)
  162. Set.BorderSizePixel = 0
  163. Set.Position = UDim2.new(0, 210, 0, 135)
  164. Set.Size = UDim2.new(0, 90, 0, 15)
  165. Set.Font = Enum.Font.Arcade
  166. Set.FontSize = Enum.FontSize.Size14
  167. Set.Text = "set"
  168. Set.TextSize = 14
  169. Set.MouseButton1Down:connect(function()
  170. if Active == true then
  171. Active = false
  172. end
  173. BVal = tostring(BColor.Text)
  174. TVal = tonumber(Trans.Text)
  175. MVal = tostring(Material.Text)
  176. end)
  177.  
  178. Random.Name = "Random"
  179. Random.Parent = Frame
  180. Random.BackgroundColor3 = Color3.new(1, 1, 1)
  181. Random.BorderSizePixel = 0
  182. Random.Position = UDim2.new(0, 10, 0, 80)
  183. Random.Size = UDim2.new(0, 90, 0, 30)
  184. Random.Font = Enum.Font.Arcade
  185. Random.FontSize = Enum.FontSize.Size14
  186. Random.Text = "Random"
  187. Random.TextSize = 14
  188. Random.MouseButton1Down:connect(function()
  189. if Active == false then
  190. Active = true
  191. end
  192. end)
  193.  
  194. Play.Name = "Play"
  195. Play.Parent = Frame
  196. Play.BackgroundColor3 = Color3.new(1, 1, 1)
  197. Play.BorderSizePixel = 0
  198. Play.Position = UDim2.new(0, 10, 0, 160)
  199. Play.Size = UDim2.new(0, 90, 0, 30)
  200. Play.Font = Enum.Font.Arcade
  201. Play.FontSize = Enum.FontSize.Size14
  202. Play.Text = "Play"
  203. Play.TextSize = 14
  204. Play.MouseButton1Down:connect(function()
  205. sound.TimePosition = 0
  206. sound.Playing = true
  207. sound.SoundId = "rbxassetid://"..tonumber(ID.Text)
  208. end)
  209.  
  210. Dark.Name = "Dark"
  211. Dark.Parent = Frame
  212. Dark.BackgroundColor3 = Color3.new(1, 1, 1)
  213. Dark.BorderSizePixel = 0
  214. Dark.Position = UDim2.new(0, 10, 0, 120)
  215. Dark.Size = UDim2.new(0, 90, 0, 30)
  216. Dark.Font = Enum.Font.Arcade
  217. Dark.FontSize = Enum.FontSize.Size14
  218. Dark.Text = "Dark"
  219. Dark.TextSize = 14
  220. Dark.MouseButton1Down:connect(function()
  221. game.Lighting.TimeOfDay = 0
  222. game.Lighting.GlobalShadows = false
  223. game.Lighting.Ambient = Color3.new(0,0,0)
  224. game.Lighting.Brightness = 0
  225. end)
  226.  
  227. Stop.Name = "Stop"
  228. Stop.Parent = Frame
  229. Stop.BackgroundColor3 = Color3.new(1, 1, 1)
  230. Stop.BorderSizePixel = 0
  231. Stop.Position = UDim2.new(0, 110, 0, 160)
  232. Stop.Size = UDim2.new(0, 90, 0, 30)
  233. Stop.Font = Enum.Font.Arcade
  234. Stop.FontSize = Enum.FontSize.Size14
  235. Stop.Text = "Stop"
  236. Stop.TextSize = 14
  237. Stop.MouseButton1Down:connect(function()
  238. sound.Playing = false
  239. end)
  240.  
  241. Hide.Name = "Hide"
  242. Hide.Parent = Frame
  243. Hide.BackgroundColor3 = Color3.new(1, 1, 1)
  244. Hide.BorderSizePixel = 0
  245. Hide.Position = UDim2.new(0, 210, 0, 160)
  246. Hide.Size = UDim2.new(0, 90, 0, 30)
  247. Hide.Font = Enum.Font.Arcade
  248. Hide.FontSize = Enum.FontSize.Size14
  249. Hide.Text = "Clear"
  250. Hide.TextSize = 14
  251. Hide.MouseButton1Down:connect(function()
  252. for i,v in pairs(game.Players.owner.Character:GetChildren()) do
  253. if v.Name == "location" then
  254. v:Remove()
  255. end
  256. end
  257. end)
  258.  
  259. --- Made By Pugz AKA (PugLover77)
  260. plyr = game.Players.owner
  261. c = plyr.Character
  262. RunService = game:service'RunService'
  263. local draw2 = false
  264. local colorA = 1
  265. local lastPos
  266.  
  267. tool = Instance.new("HopperBin", plyr.Backpack)
  268. tool.Name = "Draw"
  269.  
  270.  
  271.  
  272. mouse = plyr:GetMouse()
  273.  
  274.  
  275. function draw(obj) --
  276. local lastPos = obj.CFrame.p
  277. coroutine.wrap(function()
  278. while wait() do
  279. if draw2 then
  280. while draw2 do
  281. wait()
  282. objC = obj:Clone()
  283. objC.Parent = c
  284. objC.Anchored = true
  285. local distance = (lastPos- obj.CFrame.p).magnitude
  286. objC.Size = Vector3.new(.1,.1,distance)
  287. objC.CFrame = CFrame.new(lastPos,obj.Position)*CFrame.new(0,0,-distance/2)
  288. lastPos = obj.CFrame.p
  289. end
  290. else
  291. break
  292. end
  293. end
  294. end)()
  295. end
  296.  
  297. tool.Selected:connect(function(mouse)
  298.  
  299. mouse.Button1Down:connect(function(mouse)
  300. draw2 = true
  301. part = Instance.new("Part", c)
  302. mesh = Instance.new("BlockMesh",part)
  303. Li = Instance.new("PointLight",part)
  304. Li.Range = 8
  305. Li.Color = part.Color
  306. part.Name = "location"
  307.  
  308. part.BottomSurface = 0
  309. part.Material = MVal
  310. part.TopSurface = 0
  311. part.Size = Vector3.new()
  312. part.Transparency = TVal
  313. if Active == true then
  314. part.Color = Color3.new(math.random(), math.random(), math.random())
  315. elseif Active == false then
  316. part.BrickColor = BrickColor.new(BVal)
  317. end
  318. Li.Color = part.Color
  319. part.FormFactor = "Custom"
  320. part.Size = Vector3.new(0.01, 0.01, 0.01)
  321. part.Anchored = true
  322. part.Locked = true
  323. coroutine.wrap(function()
  324. while part ~= nil do
  325. part.CFrame = CFrame.new(plyr:GetMouse().Hit.p.x,plyr:GetMouse().Hit.p.y,plyr:GetMouse().Hit.p.z)
  326. wait()
  327. end
  328. end)()
  329. wait()
  330. draw(part)
  331. wait()
  332. end)
  333. mouse.Button1Up:connect(function(mouse)
  334. draw2 = false
  335.  
  336. end)
  337.  
  338. end)
  339. x = 60
  340. game:GetService("RunService").Stepped:connect(function()
  341. n = sound.PlaybackLoudness
  342. if n > 500 then
  343. x = 100
  344. elseif n < 500 then
  345. x = 110
  346. end
  347. for i,v in pairs(game.Players.owner.Character:GetChildren()) do
  348. if v.Name == "location" then
  349. v.Mesh.Scale = Vector3.new(n / x, n / x, n / x)
  350. v.PointLight.Range = n / 50
  351. end
  352. end
  353. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement