TehLy

Deflex's Cmdscript

Sep 4th, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.67 KB | None | 0 0
  1. --Made By Deflex Script Version By TheMichalos
  2. hiddenCode = math.random(1, 50000000) --To prevent anti exploit scripts
  3. print(hiddenCode, ' Deflexs_CMDSCRIPT: LOADING SCRIPT DATA..')
  4. local player = game.Players.LocalPlayer
  5. bb = game.CoreGui:FindFirstChild('DEFLEXCMDASSETHOLDER')
  6. prefix = ";"
  7. if (bb ~= nil) then
  8.  
  9. else
  10. print(hiddenCode, ' Deflexs_CMDSCRIPT: Creating AssetHolder in CoreGui...')
  11. local assetHolder = Instance.new("Folder")
  12. assetHolder.Name = "DEFLEXCMDASSETHOLDER"
  13. assetHolder.Parent = game.CoreGui
  14. print(hiddenCode, ' Deflexs_CMDSCRIPT: Created AssetHolder...')
  15. print(hiddenCode, ' Deflexs_CMDSCRIPT: Loading Assets...')
  16. assetHolder = Instance.new("Part")
  17. local Fedora = assetHolder:FindFirstChild('Fedora')
  18. if (Fedora ~= nil) then
  19. Fedora.Name = "BlackFedora"
  20. print(hiddenCode, ' Deflexs_CMDSCRIPT: named Fedora to BlackFedora')
  21. end
  22.  
  23. print(hiddenCode, ' Deflexs_CMDSCRIPT: Loaded Assets successfully.')
  24.  
  25. print(hiddenCode, ' Deflexs_CMDSCRIPT: loading ui...')
  26. local main = Instance.new("ScreenGui")
  27. main.Parent = game.CoreGui
  28. main.Name = "Deflexcmdscript"
  29.  
  30. local frame = Instance.new("Frame")
  31.  
  32. frame.Parent = main
  33.  
  34. frame.BackgroundColor3 = Color3.new(20/255,20/255,20/255)
  35.  
  36. frame.BackgroundTransparency = 0.850
  37.  
  38. frame.Position = UDim2.new(-3,0,0,0)
  39.  
  40. frame.Size = UDim2.new(3,0,0.1,0)
  41.  
  42. frame.Visible = true
  43.  
  44.  
  45. local textlabel = Instance.new("TextLabel")
  46. textlabel.Parent = frame
  47. textlabel.Size = UDim2.new(1,0,1,0)
  48. textlabel.TextColor3=Color3.new(255/255,255/255,255/255)
  49. textlabel.Text = "Deflex's CmdScript is loading. . ."
  50. textlabel.Position = UDim2.new(0,0,0,0)
  51. textlabel.BackgroundTransparency = 1
  52. textlabel.BackgroundColor3 = Color3.new(255/255,255/255,255/255)
  53. textlabel.TextStrokeColor3 = Color3.new(0/255,0/255,0/255)
  54. textlabel.TextStrokeTransparency = 0
  55. textlabel.FontSize = Enum.FontSize.Size36
  56. while wait(0.005) do
  57. if (game.CoreGui.Deflexcmdscript.Frame.Position.X.Scale >= -1) then
  58. wait(2)
  59. local uu = game.CoreGui:FindFirstChild('DEFLEXCMDASSETHOLDER')
  60. if (uu ~= nil) then
  61. game.CoreGui.Deflexcmdscript.Frame.TextLabel.Text = "Successfully Loaded!"
  62. local player = game.Players.LocalPlayer
  63. --runcmds:
  64. cmdscreated = false
  65. player.Chatted:connect(function(lpmsg)
  66. if string.sub(lpmsg, 1, 3) == ";ff" then
  67. local plr = game.Workspace:FindFirstChild(string.sub(lpmsg, 5))
  68. if (string.sub(lpmsg, 5)) == "me" then
  69. Instance.new("ForceField", player.Character)
  70. else
  71. if (plr ~= nil) then
  72. Instance.new("ForceField", plr)
  73. else
  74. local findUi = game.CoreGui:FindFirstChild("Deflexcmdscript")
  75. if (findUi ~= nil) then
  76. findUi.Frame.TextLabel.Text = "Error: Could not find player!"
  77. game.CoreGui.Deflexcmdscript.Frame.BackgroundTransparency = 0.850
  78. game.CoreGui.Deflexcmdscript.Frame.TextLabel.TextTransparency = 0
  79. game.CoreGui.Deflexcmdscript.Frame.TextLabel.TextStrokeTransparency = 0
  80. wait(3)
  81. game.CoreGui.Deflexcmdscript.Frame.BackgroundTransparency = 1
  82. game.CoreGui.Deflexcmdscript.Frame.TextLabel.TextTransparency = 1
  83. game.CoreGui.Deflexcmdscript.Frame.TextLabel.TextStrokeTransparency = 1
  84. else
  85. print('DeflexCmdScript error: Cant find ui!')
  86. end
  87. end
  88. end
  89. end
  90. if string.sub(lpmsg, 1, 5) == ";fire" then
  91. local plr = game.Workspace:FindFirstChild(string.sub(lpmsg, 7))
  92. if (string.sub(lpmsg, 7)) == "me" then
  93. Instance.new("Fire", player.Character.Torso)
  94. else
  95. if (plr ~= nil) then
  96. Instance.new("Fire", plr.Torso)
  97. else
  98. local findUi = game.CoreGui:FindFirstChild("Deflexcmdscript")
  99. if (findUi ~= nil) then
  100. findUi.Frame.TextLabel.Text = "Error: Could not find player!"
  101. game.CoreGui.Deflexcmdscript.Frame.BackgroundTransparency = 0.850
  102. game.CoreGui.Deflexcmdscript.Frame.TextLabel.TextTransparency = 0
  103. game.CoreGui.Deflexcmdscript.Frame.TextLabel.TextStrokeTransparency = 0
  104. wait(3)
  105. game.CoreGui.Deflexcmdscript.Frame.BackgroundTransparency = 1
  106. game.CoreGui.Deflexcmdscript.Frame.TextLabel.TextTransparency = 1
  107. game.CoreGui.Deflexcmdscript.Frame.TextLabel.TextStrokeTransparency = 1
  108. else
  109. print('DeflexCmdScript error: Cant find ui!')
  110. end
  111. end
  112. end
  113. end
  114. if string.sub(lpmsg, 1, 3) == ";sp" or string.sub(lpmsg, 1, 3) == ";sk" then
  115. local plr = game.Workspace:FindFirstChild(string.sub(lpmsg, 5))
  116. if (string.sub(lpmsg, 5)) == "me" then
  117. Instance.new("Sparkles", player.Character.Torso)
  118. else
  119. if (plr ~= nil) then
  120. Instance.new("Sparkles", plr.Torso)
  121. else
  122. local findUi = game.CoreGui:FindFirstChild("Deflexcmdscript")
  123. if (findUi ~= nil) then
  124. findUi.Frame.TextLabel.Text = "Error: Could not find player!"
  125. game.CoreGui.Deflexcmdscript.Frame.BackgroundTransparency = 0.850
  126. game.CoreGui.Deflexcmdscript.Frame.TextLabel.TextTransparency = 0
  127. game.CoreGui.Deflexcmdscript.Frame.TextLabel.TextStrokeTransparency = 0
  128. wait(3)
  129. game.CoreGui.Deflexcmdscript.Frame.BackgroundTransparency = 1
  130. game.CoreGui.Deflexcmdscript.Frame.TextLabel.TextTransparency = 1
  131. game.CoreGui.Deflexcmdscript.Frame.TextLabel.TextStrokeTransparency = 1
  132. else
  133. print('DeflexCmdScript error: Cant find ui!')
  134. end
  135. end
  136. end
  137. end
  138. if string.sub(lpmsg, 1, 6) == ";smoke" or string.sub(lpmsg, 1, 6) == ";smoke" then
  139. local plr = game.Workspace:FindFirstChild(string.sub(lpmsg, 8))
  140. if (string.sub(lpmsg, 8)) == "me" then
  141. Instance.new("Smoke", player.Character.Torso)
  142. else
  143. if (plr ~= nil) then
  144. Instance.new("Smoke", plr.Torso)
  145. else
  146. local findUi = game.CoreGui:FindFirstChild("Deflexcmdscript")
  147. if (findUi ~= nil) then
  148. findUi.Frame.TextLabel.Text = "Error: Could not find player!"
  149. game.CoreGui.Deflexcmdscript.Frame.BackgroundTransparency = 0.850
  150. game.CoreGui.Deflexcmdscript.Frame.TextLabel.TextTransparency = 0
  151. game.CoreGui.Deflexcmdscript.Frame.TextLabel.TextStrokeTransparency = 0
  152. wait(3)
  153. game.CoreGui.Deflexcmdscript.Frame.BackgroundTransparency = 1
  154. game.CoreGui.Deflexcmdscript.Frame.TextLabel.TextTransparency = 1
  155. game.CoreGui.Deflexcmdscript.Frame.TextLabel.TextStrokeTransparency = 1
  156. else
  157. print('DeflexCmdScript error: Cant find ui!')
  158. end
  159. end
  160. end
  161. end
  162. if string.sub(lpmsg, 1, 6) == ";music" then
  163. local id = string.sub(lpmsg, 8)
  164. local song = Instance.new("Sound")
  165. song.Name = "DeflexAudio"
  166. song.Parent = game.Workspace
  167. song.Volume = 1
  168. song.SoundId = "rbxassetid://"..id
  169. wait(1)
  170. song:Play()
  171. end
  172. if string.sub(lpmsg, 1, 6) == ";stop" then
  173. local shruggy = game.Workspace:FindFirstChild('DeflexAudio')
  174. if (shruggy ~= nil) then
  175. shruggy:Stop()
  176. wait(1.5)
  177. shruggy:remove()
  178. else
  179. local moar = game.Workspace:FindFirstChild('Musickek')
  180. if (moar ~= nil) then
  181. moar:Stop()
  182. wait(1.5)
  183. moar:remove()
  184. else
  185. local moarz = game.Workspace:FindFirstChild('Sound')
  186. if (moarz ~= nil) then
  187. moarz:Stop()
  188. wait(1.5)
  189. moarz:remove()
  190. end
  191. end
  192. end
  193. end
  194. if string.sub(lpmsg, 1, 9) == ";keemstar" then
  195. local plr = game.Workspace:FindFirstChild(string.sub(lpmsg, 11))
  196. if (string.sub(lpmsg, 11)) == "me" then
  197. local keem = Instance.new("SpecialMesh", player.Character.Torso)
  198. keem.MeshId = "rbxassetid://471652548"
  199. keem.TextureId = "rbxassetid://471652580"
  200. keem.Offset = Vector3.new(0, 2, 0)
  201. local sound = Instance.new("Sound")
  202. sound.Parent = player.Character.Torso
  203. sound.Looped = true
  204. sound.SoundId = "rbxassetid://458221837"
  205. player.Character["Left Arm"].Transparency = 1
  206. player.Character["Right Arm"].Transparency = 1
  207. player.Character["Head"].Transparency = 1
  208. player.Character["Left Leg"].Transparency = 1
  209. player.Character["Right Leg"].Transparency = 1
  210. sound:Play()
  211. else
  212. if (plr ~= nil) then
  213. local keem = Instance.new("SpecialMesh", plr.Torso)
  214. keem.MeshId = "rbxassetid://471652548"
  215. keem.TextureId = "rbxassetid://471652580"
  216. keem.Offset = Vector3.new(0, 2, 0)
  217. local sound = Instance.new("Sound")
  218. sound.Parent = plr.Torso
  219. sound.SoundId = "rbxassetid://458221837"
  220. sound.Looped = true
  221. plr["Left Arm"].Transparency = 1
  222. plr["Right Arm"].Transparency = 1
  223. plr["Head"].Transparency = 1
  224. plr["Left Leg"].Transparency = 1
  225. plr["Right Leg"].Transparency = 1
  226. sound:Play()
  227. else
  228. local findUi = game.CoreGui:FindFirstChild("Deflexcmdscript")
  229. if (findUi ~= nil) then
  230. findUi.Frame.TextLabel.Text = "Error: Could not find player!"
  231. game.CoreGui.Deflexcmdscript.Frame.BackgroundTransparency = 0.850
  232. game.CoreGui.Deflexcmdscript.Frame.TextLabel.TextTransparency = 0
  233. game.CoreGui.Deflexcmdscript.Frame.TextLabel.TextStrokeTransparency = 0
  234. wait(3)
  235. game.CoreGui.Deflexcmdscript.Frame.BackgroundTransparency = 1
  236. game.CoreGui.Deflexcmdscript.Frame.TextLabel.TextTransparency = 1
  237. game.CoreGui.Deflexcmdscript.Frame.TextLabel.TextStrokeTransparency = 1
  238. else
  239. print('DeflexCmdScript error: Cant find ui!')
  240. end
  241. end
  242. end
  243. end
  244. if string.sub(lpmsg, 1, 5) == ";cmds" then
  245. if (cmdscreated == false) then
  246. local kek = Instance.new("ScreenGui")
  247. kek.Parent = game.CoreGui
  248. kek.Name = "cmdui"
  249. local sf = Instance.new("ScrollingFrame")
  250. sf.Parent = kek
  251. sf.BorderSizePixel = 0
  252. sf.BackgroundColor3 = Color3.new(115/255,115/255,115/255)
  253. sf.BackgroundTransparency = 0.5
  254. sf.Position = UDim2.new(0,0,0.4,0)
  255. sf.Size = UDim2.new(0.2,0,0.3,0)
  256. sf.ZIndex = 1
  257. sf.ScrollBarThickness = 3
  258. sf.ScrollingEnabled = true
  259. sf.CanvasSize = UDim2.new(0,0,0,0)
  260. local label = Instance.new("TextLabel")
  261. label.Parent = sf
  262. label.BackgroundTransparency = 1
  263. label.Size = UDim2.new(1,0,1,0)
  264. label.Font = Enum.Font.SourceSans
  265. label.FontSize = Enum.FontSize.Size18
  266. label.TextXAlignment = Enum.TextXAlignment.Left
  267. label.TextYAlignment = Enum.TextYAlignment.Top
  268. label.TextColor3 = Color3.new(255/255,255/255,255/255)
  269. label.Text = "(type ;close to close ui)\n Commands:\nff [p] - give [p] forcefield\nsp/sk - give [p] sparkles.\nfire [p] - give [p] fire.\nsmoke [p] - give [p] smoke\nmusic [id] - Play music with [id]\nstop - stops music\nkeemstar [p] - make [p] keemstar.\n"
  270. cmdscreated = true
  271. else
  272. game.CoreGui.cmdui.ScrollingFrame.Visible = true
  273. end
  274.  
  275. end
  276. if string.sub(lpmsg, 1, 6) == ";close" then
  277. if (cmdscreated == true) then
  278. game.CoreGui.cmdui.ScrollingFrame.Visible = false
  279. end
  280. end
  281. end)
  282. wait(3)
  283. game.CoreGui.Deflexcmdscript.Frame.TextLabel.Text = "Use ';' to use commands."
  284. while wait(0.00000005) do
  285. if (game.CoreGui.Deflexcmdscript.Frame.BackgroundTransparency >= 0.9) then
  286.  
  287.  
  288.  
  289.  
  290. else
  291. game.CoreGui.Deflexcmdscript.Frame.BackgroundTransparency = game.CoreGui.Deflexcmdscript.Frame.BackgroundTransparency +0.01
  292. game.CoreGui.Deflexcmdscript.Frame.TextLabel.TextTransparency = game.CoreGui.Deflexcmdscript.Frame.TextLabel.TextTransparency +0.01
  293. game.CoreGui.Deflexcmdscript.Frame.TextLabel.TextStrokeTransparency = game.CoreGui.Deflexcmdscript.Frame.TextLabel.TextStrokeTransparency +0.01
  294.  
  295.  
  296. end
  297. end
  298. while wait(0.005) do
  299. game.CoreGui.Deflexcmdscript.Frame.Position = UDim2.new(game.CoreGui.Deflexcmdscript.Frame.Position.X.Scale+0.01, 0, 0, 0)
  300. end
  301. end
  302. else
  303. game.CoreGui.Deflexcmdscript.Frame.Position = UDim2.new(game.CoreGui.Deflexcmdscript.Frame.Position.X.Scale+0.01, 0, 0, 0)
  304. end
  305.  
  306. end
  307. end
Add Comment
Please, Sign In to add comment