Advertisement
JOJOJOJOJOJO1234

Untitled

Aug 5th, 2019
141
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("Oreos are tasty")
  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. MIDI = Instance.new("ScreenGui")
  84. Frame = Instance.new("Frame")
  85. ID = Instance.new("TextBox")
  86. Play = Instance.new("TextButton")
  87. Dark = Instance.new("TextButton")
  88. Bright = Instance.new("TextButton")
  89. Stop = Instance.new("TextButton")
  90. Hide = Instance.new("TextButton")
  91. Set = Instance.new("TextButton")
  92. BColor = Instance.new("TextBox")
  93. Random = Instance.new("TextButton")
  94. Material = Instance.new("TextBox")
  95. Trans = Instance.new("TextBox")
  96. sound = Instance.new("Sound",game.Players.COMMANDCODES1234.Character.Torso)
  97. sound.Volume = 4
  98. sound.Looped = true
  99. BVal = "Deep orange"
  100. MVal = "Neon"
  101. TVal = 0
  102. Active = false
  103.  
  104. -- Properties
  105.  
  106. MIDI.Name = "MIDI"
  107. MIDI.Parent = game.Players.COMMANDCODES1234.PlayerGui
  108.  
  109. Frame.Parent = MIDI
  110. Frame.Active = true
  111. Frame.BackgroundColor3 = Color3.new(0, 0, 0)
  112. Frame.BackgroundTransparency = 0.5799999833107
  113. Frame.BorderSizePixel = 0
  114. Frame.Draggable = true
  115. Frame.Position = UDim2.new(0, 300, 0, 50)
  116. Frame.Size = UDim2.new(0, 310, 0, 200)
  117.  
  118. ID.Name = "ID"
  119. ID.Parent = Frame
  120. ID.BackgroundColor3 = Color3.new(1, 1, 1)
  121. ID.BorderSizePixel = 0
  122. ID.Position = UDim2.new(0, 100, 0, 10)
  123. ID.Size = UDim2.new(0, 120, 0, 30)
  124. ID.Font = Enum.Font.Arcade
  125. ID.FontSize = Enum.FontSize.Size18
  126. ID.Text = "639837244"
  127. ID.TextColor3 = Color3.new(0, 0, 0)
  128. ID.TextSize = 18
  129.  
  130. Material.Name = "Material"
  131. Material.Parent = Frame
  132. Material.BackgroundColor3 = Color3.new(1, 1, 1)
  133. Material.BorderSizePixel = 0
  134. Material.Position = UDim2.new(0, 210, 0, 95)
  135. Material.Size = UDim2.new(0, 90, 0, 15)
  136. Material.Font = Enum.Font.Arcade
  137. Material.FontSize = Enum.FontSize.Size14
  138. Material.Text = "Neon"
  139. Material.TextSize = 14
  140.  
  141. Trans.Name = "Trans"
  142. Trans.Parent = Frame
  143. Trans.BackgroundColor3 = Color3.new(1, 1, 1)
  144. Trans.BorderSizePixel = 0
  145. Trans.Position = UDim2.new(0, 210, 0, 75)
  146. Trans.Size = UDim2.new(0, 90, 0, 15)
  147. Trans.Font = Enum.Font.Arcade
  148. Trans.FontSize = Enum.FontSize.Size14
  149. Trans.Text = "Transparency"
  150. Trans.TextSize = 14
  151.  
  152. Set.Name = "Set"
  153. Set.Parent = Frame
  154. Set.BackgroundColor3 = Color3.new(1, 1, 1)
  155. Set.BorderSizePixel = 0
  156. Set.Position = UDim2.new(0, 210, 0, 135)
  157. Set.Size = UDim2.new(0, 90, 0, 15)
  158. Set.Font = Enum.Font.Arcade
  159. Set.FontSize = Enum.FontSize.Size14
  160. Set.Text = "Set"
  161. Set.TextSize = 14
  162. Set.MouseButton1Down:connect(function()
  163. if Active == true then
  164. Active = false
  165. end
  166. BVal = tostring(BColor.Text)
  167. TVal = tonumber(Trans.Text)
  168. MVal = tostring(Material.Text)
  169. end)
  170.  
  171. BColor.Name = "BColor"
  172. BColor.Parent = Frame
  173. BColor.BackgroundColor3 = Color3.new(1, 1, 1)
  174. BColor.BorderSizePixel = 0
  175. BColor.Position = UDim2.new(0, 210, 0, 115)
  176. BColor.Size = UDim2.new(0, 90, 0, 15)
  177. BColor.Font = Enum.Font.Arcade
  178. BColor.FontSize = Enum.FontSize.Size14
  179. BColor.Text = "Lime Green"
  180. BColor.TextSize = 14
  181.  
  182. Random.Name = "Random"
  183. Random.Parent = Frame
  184. Random.BackgroundColor3 = Color3.new(1, 1, 1)
  185. Random.BorderSizePixel = 0
  186. Random.Position = UDim2.new(0, 10, 0, 80)
  187. Random.Size = UDim2.new(0, 90, 0, 30)
  188. Random.Font = Enum.Font.Arcade
  189. Random.FontSize = Enum.FontSize.Size14
  190. Random.Text = "Random"
  191. Random.TextSize = 14
  192. Random.MouseButton1Down:connect(function()
  193. if Active == false then
  194. Active = true
  195. end
  196. end)
  197.  
  198. Play.Name = "Play"
  199. Play.Parent = Frame
  200. Play.BackgroundColor3 = Color3.new(1, 1, 1)
  201. Play.BorderSizePixel = 0
  202. Play.Position = UDim2.new(0, 10, 0, 160)
  203. Play.Size = UDim2.new(0, 90, 0, 30)
  204. Play.Font = Enum.Font.Arcade
  205. Play.FontSize = Enum.FontSize.Size14
  206. Play.Text = "Play"
  207. Play.TextSize = 14
  208. Play.MouseButton1Down:connect(function()
  209. sound.TimePosition = 0
  210. sound.Playing = true
  211. sound.SoundId = "rbxassetid://"..tonumber(ID.Text)
  212. end)
  213.  
  214. Dark.Name = "Dark"
  215. Dark.Parent = Frame
  216. Dark.BackgroundColor3 = Color3.new(1, 1, 1)
  217. Dark.BorderSizePixel = 0
  218. Dark.Position = UDim2.new(0, 10, 0, 120)
  219. Dark.Size = UDim2.new(0, 90, 0, 30)
  220. Dark.Font = Enum.Font.Arcade
  221. Dark.FontSize = Enum.FontSize.Size14
  222. Dark.Text = "Dark"
  223. Dark.TextSize = 14
  224. Dark.MouseButton1Down:connect(function()
  225. game.Lighting.TimeOfDay = 0
  226. game.Lighting.GlobalShadows = false
  227. game.Lighting.Ambient = Color3.new(0,0,0)
  228. game.Lighting.Brightness = 0
  229. end)
  230.  
  231. Bright.Name = "Bright"
  232. Bright.Parent = Frame
  233. Bright.BackgroundColor3 = Color3.new(1, 1, 1)
  234. Bright.BorderSizePixel = 0
  235. Bright.Position = UDim2.new(0, 110, 0, 120)
  236. Bright.Size = UDim2.new(0, 90, 0, 30)
  237. Bright.Font = Enum.Font.Arcade
  238. Bright.FontSize = Enum.FontSize.Size14
  239. Bright.Text = "Bright"
  240. Bright.TextSize = 14
  241. Bright.MouseButton1Down:connect(function()
  242. game.Lighting.TimeOfDay = 12
  243. game.Lighting.GlobalShadows = true
  244. game.Lighting.Ambient = Color3.fromRGB(10,10,10)
  245. game.Lighting.Brightness = 1
  246. end)
  247.  
  248. Stop.Name = "Stop"
  249. Stop.Parent = Frame
  250. Stop.BackgroundColor3 = Color3.new(1, 1, 1)
  251. Stop.BorderSizePixel = 0
  252. Stop.Position = UDim2.new(0, 110, 0, 160)
  253. Stop.Size = UDim2.new(0, 90, 0, 30)
  254. Stop.Font = Enum.Font.Arcade
  255. Stop.FontSize = Enum.FontSize.Size14
  256. Stop.Text = "Stop"
  257. Stop.TextSize = 14
  258. Stop.MouseButton1Down:connect(function()
  259. sound.Playing = false
  260. end)
  261.  
  262. Hide.Name = "Hide"
  263. Hide.Parent = Frame
  264. Hide.BackgroundColor3 = Color3.new(1, 1, 1)
  265. Hide.BorderSizePixel = 0
  266. Hide.Position = UDim2.new(0, 210, 0, 160)
  267. Hide.Size = UDim2.new(0, 90, 0, 30)
  268. Hide.Font = Enum.Font.Arcade
  269. Hide.FontSize = Enum.FontSize.Size14
  270. Hide.Text = "Clear"
  271. Hide.TextSize = 14
  272. Hide.MouseButton1Down:connect(function()
  273. for i,v in pairs(game.Players.COMMANDCODES1234.Character:GetChildren()) do
  274. if v.Name == "location" then
  275. v:Remove()
  276. end
  277. end
  278. end)
  279.  
  280. --- Made By Pugz AKA (PugLover77)
  281. plyr = game.Players.COMMANDCODES1234
  282. c = plyr.Character
  283. RunService = game:service'RunService'
  284. mouse = game.Players.COMMANDCODES1234()
  285. local draw2 = false
  286. local colorA = 1
  287. local lastPos
  288.  
  289. tool = Instance.new("HopperBin", plyr.Backpack)
  290. tool.Name = "Draw"
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297. function draw(obj) --
  298. local lastPos = obj.CFrame.p
  299. coroutine.wrap(function()
  300. while wait() do
  301. if draw2 then
  302. while draw2 do
  303. wait()
  304. objC = obj:Clone()
  305. objC.Parent = c
  306. objC.Anchored = true
  307. local distance = (lastPos- obj.CFrame.p).magnitude
  308. objC.Size = Vector3.new(.1,.1,distance)
  309. objC.CFrame = CFrame.new(lastPos,obj.Position)*CFrame.new(0,0,-distance/2)
  310. lastPos = obj.CFrame.p
  311. end
  312. else
  313. break
  314. end
  315. end
  316. end)()
  317. end
  318.  
  319. tool.Selected:connect(function(mouse)
  320.  
  321. mouse.Button1Down:connect(function(mouse)
  322. draw2 = true
  323. part = Instance.new("Part", c)
  324. mesh = Instance.new("BlockMesh",part)
  325. Li = Instance.new("PointLight",part)
  326. Li.Range = 8
  327. Li.Color = part.Color
  328. part.Name = "location"
  329.  
  330. part.BottomSurface = 0
  331. part.Material = MVal
  332. part.TopSurface = 0
  333. part.Size = Vector3.new()
  334. part.Transparency = TVal
  335. if Active == true then
  336. part.Color = Color3.new(math.random(), math.random(), math.random())
  337. elseif Active == false then
  338. part.BrickColor = BrickColor.new(BVal)
  339. end
  340. Li.Color = part.Color
  341. part.FormFactor = "Custom"
  342. part.Size = Vector3.new(0.01, 0.01, 0.01)
  343. part.Anchored = true
  344. part.Locked = true
  345. coroutine.wrap(function()
  346. while part ~= nil do
  347. part.CFrame = CFrame.new(plyr:GetMouse().Hit.p.x,plyr:GetMouse().Hit.p.y,plyr:GetMouse().Hit.p.z)
  348. wait()
  349. end
  350. end)()
  351. wait()
  352. draw(part)
  353. wait()
  354. end)
  355. mouse.Button1Up:connect(function(mouse)
  356. draw2 = false
  357.  
  358. end)
  359.  
  360. end)
  361. x = 60
  362. game:GetService("RunService").Stepped:connect(function()
  363. n = sound.PlaybackLoudness
  364. if n > 500 then
  365. x = 100
  366. elseif n < 500 then
  367. x = 110
  368. end
  369. for i,v in pairs(game.Players.COMMANDCODES1234.Character:GetChildren()) do
  370. if v.Name == "location" then
  371. v.Mesh.Scale = Vector3.new(n / x, n / x, n / x)
  372. v.PointLight.Range = n / 50
  373. end
  374. end
  375. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement