Advertisement
HenloMyDude

my clone trooper

Nov 22nd, 2019
390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.22 KB | None | 0 0
  1. ----------------------------------------------------------------
  2. --//Clone.\\--
  3. ----------------------------------------------------------------
  4.  
  5. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  6. local Player,game,owner = owner,game
  7. local RealPlayer = Player
  8. do
  9. local rp = RealPlayer
  10. script.Parent = rp.Character
  11.  
  12. --RemoteEvent for communicating
  13. local Event = Instance.new("RemoteEvent")
  14. Event.Name = "UserInput_Event"
  15.  
  16. --Fake event to make stuff like Mouse.KeyDown work
  17. local function fakeEvent()
  18. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  19. t.connect = t.Connect
  20. return t
  21. end
  22.  
  23. --Creating fake input objects with fake variables
  24. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  25. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  26. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  27. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  28. end}
  29. --Merged 2 functions into one by checking amount of arguments
  30. CAS.UnbindAction = CAS.BindAction
  31.  
  32. --This function will trigger the events that have been :Connect()'ed
  33. local function te(self,ev,...)
  34. local t = m[ev]
  35. if t and t._fakeEvent then
  36. for _,f in pairs(t.Functions) do
  37. f(...)
  38. end
  39. end
  40. end
  41. m.TrigEvent = te
  42. UIS.TrigEvent = te
  43.  
  44. Event.OnServerEvent:Connect(function(plr,io)
  45. if plr~=rp then return end
  46. m.Target = io.Target
  47. m.Hit = io.Hit
  48. if not io.isMouse then
  49. local b = io.UserInputState == Enum.UserInputState.Begin
  50. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  51. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  52. end
  53. for _,t in pairs(CAS.Actions) do
  54. for _,k in pairs(t.Keys) do
  55. if k==io.KeyCode then
  56. t.Function(t.Name,io.UserInputState,io)
  57. end
  58. end
  59. end
  60. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62. end
  63. end)
  64. Event.Parent = NLS([==[
  65. local Player = game:GetService("Players").LocalPlayer
  66. local Event = script:WaitForChild("UserInput_Event")
  67.  
  68. local Mouse = Player:GetMouse()
  69. local UIS = game:GetService("UserInputService")
  70. local input = function(io,a)
  71. if a then return end
  72. --Since InputObject is a client-side instance, we create and pass table instead
  73. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  74. end
  75. UIS.InputBegan:Connect(input)
  76. UIS.InputEnded:Connect(input)
  77.  
  78. local h,t
  79. --Give the server mouse data 30 times every second, but only if the values changed
  80. --If player is not moving their mouse, client won't fire events
  81. while wait(1/30) do
  82. if h~=Mouse.Hit or t~=Mouse.Target then
  83. h,t=Mouse.Hit,Mouse.Target
  84. Event:FireServer({isMouse=true,Target=t,Hit=h})
  85. end
  86. end]==],Player.Character)
  87.  
  88. ----Sandboxed game object that allows the usage of client-side methods and services
  89. --Real game object
  90. local _rg = game
  91.  
  92. --Metatable for fake service
  93. local fsmt = {
  94. __index = function(self,k)
  95. local s = rawget(self,"_RealService")
  96. if s then return s[k] end
  97. end,
  98. __newindex = function(self,k,v)
  99. local s = rawget(self,"_RealService")
  100. if s then s[k]=v end
  101. end,
  102. __call = function(self,...)
  103. local s = rawget(self,"_RealService")
  104. if s then return s(...) end
  105. end
  106. }
  107. local function FakeService(t,RealService)
  108. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  109. return setmetatable(t,fsmt)
  110. end
  111.  
  112. --Fake game object
  113. local g = {
  114. GetService = function(self,s)
  115. return self[s]
  116. end,
  117. Players = FakeService({
  118. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  119. },"Players"),
  120. UserInputService = FakeService(UIS,"UserInputService"),
  121. ContextActionService = FakeService(CAS,"ContextActionService"),
  122. }
  123. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  124. g.service = g.GetService
  125.  
  126. g.RunService = FakeService({
  127. RenderStepped = _rg:GetService("RunService").Heartbeat,
  128. BindToRenderStep = function(self,name,_,fun)
  129. self._btrs[name] = self.Heartbeat:Connect(fun)
  130. end,
  131. UnbindFromRenderStep = function(self,name)
  132. self._btrs[name]:Disconnect()
  133. end,
  134. },"RunService")
  135.  
  136. setmetatable(g,{
  137. __index=function(self,s)
  138. return _rg:GetService(s) or typeof(_rg[s])=="function"
  139. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  140. end,
  141. __newindex = fsmt.__newindex,
  142. __call = fsmt.__call
  143. })
  144. --Changing owner to fake player object to support owner:GetMouse()
  145. game,owner = g,g.Players.LocalPlayer
  146. end
  147.  
  148. Player = owner
  149. PlayerGui = Player.PlayerGui
  150. Cam = workspace.CurrentCamera
  151. Backpack = Player.Backpack
  152. Character = Player.Character
  153. Humanoid = Character.Humanoid
  154. Mouse = Player:GetMouse()
  155. RootPart = Character["HumanoidRootPart"]
  156. Torso = Character["UpperTorso"]
  157. LTorso = Character["LowerTorso"]
  158. Head = Character["Head"]
  159.  
  160. removeuseless = game:GetService("Debris")
  161. laff = Instance.new("Sound",Head)
  162. tauntdebounce = false
  163. Character = Player.Character
  164. Humanoid = Character.Humanoid
  165. ---------
  166. plr = game.Players.LocalPlayer
  167. chara = plr.Character
  168. mouse = plr:GetMouse()
  169. Create = Instance.new
  170. Huge = math.huge
  171.  
  172. Player = game:GetService("Players").LocalPlayer
  173. PlayerGui = Player.PlayerGui
  174. Cam = workspace.CurrentCamera
  175. Backpack = Player.Backpack
  176. Character = Player.Character
  177. char = Player.Character
  178. Humanoid = Character.Humanoid
  179. Mouse = Player:GetMouse()
  180. RootPart = Character["HumanoidRootPart"]
  181. Torso = Character["UpperTorso"]
  182. LTorso = Character["LowerTorso"]
  183. Head = Character["Head"]
  184.  
  185. local Orin = "http://www.roblox.com/asset/?id=0"
  186. Head.face.Texture = Orin
  187. function weld(a, b, acf)
  188. local w = Instance.new("Weld", a)
  189. w.Part0 = a
  190. w.Part1 = b
  191. w.C0 = acf
  192. end
  193. --------------------------------
  194. char.Head.face.Texture = "rbxassetid://0"
  195. --------------------------------
  196.  
  197. -------------------------------------------------------
  198. wait(0.2)
  199. local plr = game:service'Players'.LocalPlayer
  200. local char = plr.Character
  201. local hum = char.Humanoid
  202. local hed = char.Head
  203. local root = char.HumanoidRootPart
  204. local tors = char.UpperTorso
  205. local ltors = char.LowerTorso
  206. local mouse = plr:GetMouse()
  207. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  208. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  209. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  210. local maincolor = BrickColor.new("Plum")
  211.  
  212. -------------------------------------------------------
  213. --Start Good Stuff--
  214. -------------------------------------------------------
  215.  
  216. ----------------------------------------------------------------------------------
  217. hum.WalkSpeed = 16
  218. hum.JumpPower = 57
  219. ----------------------------------------------------------------------------------
  220. local AddInstance = function(Object, ...)
  221. local Obj = Instance.new(Object)
  222. for i,v in next,(...) do
  223. Obj[i] = v
  224. end
  225. return Obj
  226. end
  227. ----------------------------------------------------
  228.  
  229. local Hair = AddInstance("Part",{
  230. Parent = hed,
  231. CFrame = hed.CFrame,
  232. formFactor = "Symmetric",
  233. Size = Vector3.new(1, 1, 1),
  234. CanCollide = false,
  235. TopSurface = "Smooth",
  236. BottomSurface = "Smooth",
  237. Locked = true,
  238. })
  239. local Weld = AddInstance("Weld",{
  240. Parent = Hair,
  241. Part0 = hed,
  242. C0 = CFrame.new(0, -0.2, -0.1)*CFrame.Angles(-4.8, 3.15, 3.15),
  243. Part1 = Hair,
  244. })
  245. local Mesh = AddInstance("SpecialMesh",{
  246. Parent = Hair,
  247. MeshId = "rbxassetid://1993546370",
  248. TextureId = "rbxassetid://57638277",
  249. Scale = Vector3.new(17.5, 17.5, 17.5),
  250. VertexColor = Vector3.new(1, 1, 1),
  251. })
  252. -------------------------------------------------------
  253.  
  254. local Hair = AddInstance("Part",{
  255. Parent = hed,
  256. CFrame = hed.CFrame,
  257. formFactor = "Symmetric",
  258. Size = Vector3.new(1, 1, 1),
  259. CanCollide = false,
  260. TopSurface = "Smooth",
  261. BottomSurface = "Smooth",
  262. Locked = true,
  263. })
  264. local Weld = AddInstance("Weld",{
  265. Parent = Hair,
  266. Part0 = hed,
  267. C0 = CFrame.new(0, 0.73, -0.1)*CFrame.Angles(-4.8, 3.15, 3.15),
  268. Part1 = Hair,
  269. })
  270. local Mesh = AddInstance("SpecialMesh",{
  271. Parent = Hair,
  272. MeshId = "rbxassetid://1993545537",
  273. TextureId = "rbxassetid://57638277",
  274. Scale = Vector3.new(17.5, 17.5, 17.5),
  275. VertexColor = Vector3.new(1, 1, 1),
  276. })
  277. -------------------------------------------------------
  278.  
  279. local Hair = AddInstance("Part",{
  280. Parent = hed,
  281. CFrame = hed.CFrame,
  282. formFactor = "Symmetric",
  283. Size = Vector3.new(1, 1, 1),
  284. CanCollide = false,
  285. TopSurface = "Smooth",
  286. BottomSurface = "Smooth",
  287. Locked = true,
  288. })
  289. local Weld = AddInstance("Weld",{
  290. Parent = Hair,
  291. Part0 = hed,
  292. C0 = CFrame.new(0, 0.5, -0.2)*CFrame.Angles(-4.8, 3.15, 3.15),
  293. Part1 = Hair,
  294. })
  295. local Mesh = AddInstance("SpecialMesh",{
  296. Parent = Hair,
  297. MeshId = "rbxassetid://1994024008",
  298. TextureId = "rbxassetid://452686281",
  299. Scale = Vector3.new(17.5, 17.5, 17.5),
  300. VertexColor = Vector3.new(1, 1, 1),
  301. })
  302. -------------------------------------------------------
  303.  
  304. local Hair = AddInstance("Part",{
  305. Parent = tors,
  306. CFrame = hed.CFrame,
  307. formFactor = "Symmetric",
  308. Size = Vector3.new(1, 1, 1),
  309. CanCollide = false,
  310. TopSurface = "Smooth",
  311. BottomSurface = "Smooth",
  312. Locked = true,
  313. })
  314. local Weld = AddInstance("Weld",{
  315. Parent = Hair,
  316. Part0 = tors,
  317. C0 = CFrame.new(0, -0.3, 0.5)*CFrame.Angles(0, 0, 0),
  318. Part1 = Hair,
  319. })
  320. local Mesh = AddInstance("SpecialMesh",{
  321. Parent = Hair,
  322. MeshId = "rbxassetid://4315017208",
  323. TextureId = "rbxassetid://4315020242",
  324. Scale = Vector3.new(1, 1, 1),
  325. VertexColor = Vector3.new(1, 1, 1),
  326. })
  327. -------------------------------------------------------
  328.  
  329. local Hair = AddInstance("Part",{
  330. Parent = ltors,
  331. CFrame = hed.CFrame,
  332. formFactor = "Symmetric",
  333. Size = Vector3.new(1, 1, 1),
  334. CanCollide = false,
  335. TopSurface = "Smooth",
  336. BottomSurface = "Smooth",
  337. Locked = true,
  338. })
  339. local Weld = AddInstance("Weld",{
  340. Parent = Hair,
  341. Part0 = ltors,
  342. C0 = CFrame.new(-1.1, -0.4, 0)*CFrame.Angles(-4.8, 3.15, 3.15),
  343. Part1 = Hair,
  344. })
  345. local Mesh = AddInstance("SpecialMesh",{
  346. Parent = Hair,
  347. MeshId = "rbxassetid://1994420460",
  348. TextureId = "rbxassetid://9526554",
  349. Scale = Vector3.new(15, 15, 15),
  350. VertexColor = Vector3.new(1, 1, 1),
  351. })
  352. -------------------------------------------------------
  353.  
  354. local Hair = AddInstance("Part",{
  355. Parent = hed,
  356. CFrame = hed.CFrame,
  357. formFactor = "Symmetric",
  358. Size = Vector3.new(1, 1, 1),
  359. CanCollide = false,
  360. TopSurface = "Smooth",
  361. BottomSurface = "Smooth",
  362. Locked = true,
  363. })
  364. local Weld = AddInstance("Weld",{
  365. Parent = Hair,
  366. Part0 = hed,
  367. C0 = CFrame.new(0, 1.3, -0.1)*CFrame.Angles(0, 0, 0),
  368. Part1 = Hair,
  369. })
  370. local Mesh = AddInstance("SpecialMesh",{
  371. Parent = Hair,
  372. MeshId = "rbxassetid://1028713",
  373. TextureId = "rbxassetid://984833776",
  374. Scale = Vector3.new(1, 1, 1),
  375. VertexColor = Vector3.new(1, 1, 1),
  376. })
  377. -------------------------------------------------------
  378. wait(1)
  379. plr = game.Players.LocalPlayer
  380. char = plr.Character
  381. mouse = plr:GetMouse()
  382. whitecolor = Color3.new(255,255,1)
  383. epicmode = false
  384. normal = true
  385. for i,v in pairs(char:GetChildren()) do
  386. if v.ClassName == "Shirt" or v.ClassName == "Pants" or v.ClassName == "ShirtGraphic" then
  387. v:Destroy()
  388. end
  389. end
  390. local shirt = Instance.new("Shirt",char)
  391. shirt.ShirtTemplate = "rbxassetid://0"
  392. local pants = Instance.new("Pants",char)
  393. pants.PantsTemplate = "rbxassetid://0"
  394. local bdycolors = char["Body Colors"]
  395. bdycolors.HeadColor3 = whitecolor
  396. bdycolors.LeftArmColor3 = whitecolor
  397. bdycolors.LeftLegColor3 = whitecolor
  398. bdycolors.RightArmColor3 = whitecolor
  399. bdycolors.RightLegColor3 = whitecolor
  400. bdycolors.TorsoColor3 = whitecolor
  401. for i,v in pairs(char:GetChildren()) do
  402. if v.ClassName == "Hat" or v.ClassName == "Accessory" then
  403. v:Destroy()
  404. end
  405. end
  406.  
  407.  
  408.  
  409. local BC = Character["Body Colors"]
  410. BC.HeadColor = BrickColor.new("New Yeller")
  411. BC.LeftArmColor = BrickColor.new("Bright yellow")
  412. BC.LeftLegColor = BrickColor.new("Br. yellowish green")
  413. BC.RightArmColor = BrickColor.new("Bright yellow")
  414. BC.RightLegColor = BrickColor.new("Br. yellowish green")
  415. BC.TorsoColor = BrickColor.new("Cyan")
  416.  
  417. -----------------------------------------------
  418.  
  419. theme = Instance.new("Sound", Head)
  420. theme.Volume = 5
  421. theme.Name = "theme"
  422. theme.Looped = true
  423.  
  424. mouse.KeyDown:connect(function(Press)
  425. Press=Press:lower()
  426. if Press=='z' then
  427. id = 0
  428. theme.SoundId = "rbxassetid://"..id
  429. theme:Play()
  430. end
  431. end)
  432.  
  433. mouse.KeyDown:connect(function(Press)
  434. Press=Press:lower()
  435. if Press=='x' then
  436. id = 0
  437. theme.SoundId = "rbxassetid://322621962"
  438. theme:Play()
  439. end
  440. end)
  441.  
  442. mouse.KeyDown:connect(function(Press)
  443. Press=Press:lower()
  444. if Press=='c' then
  445. id = 0
  446. theme.SoundId = "rbxassetid://181942226"
  447. theme:Play()
  448. end
  449. end)
  450.  
  451. mouse.KeyDown:connect(function(Press)
  452. Press=Press:lower()
  453. if Press=='v' then
  454. id = 0
  455. theme.SoundId = "rbxassetid://205081451"
  456. theme:Play()
  457. end
  458. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement