Advertisement
DenisPitu06_YT

Steve script

Sep 15th, 2019
304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Use h/ To work.") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. local RealPlayer = RealPlayer
  7. script.Parent = RealPlayer.Character
  8.  
  9. --Fake event to make stuff like Mouse.KeyDown work
  10. local Disconnect_Function = function(this)
  11. this[1].Functions[this[2]] = nil
  12. end
  13. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  14. local FakeEvent_Metatable = {__index={
  15. Connect = function(this,f)
  16. local i = tostring(math.random(0,10000))
  17. while this.Functions[i] do
  18. i = tostring(math.random(0,10000))
  19. end
  20. this.Functions[i] = f
  21. return setmetatable({this,i},Disconnect_Metatable)
  22. end
  23. }}
  24. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  25. local function fakeEvent()
  26. return setmetatable({Functions={}},FakeEvent_Metatable)
  27. end
  28.  
  29. --Creating fake input objects with fake variables
  30. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  31. FakeMouse.keyUp = FakeMouse.KeyUp
  32. FakeMouse.keyDown = FakeMouse.KeyDown
  33. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  34. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  35. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  36. end}
  37. --Merged 2 functions into one by checking amount of arguments
  38. CAS.UnbindAction = CAS.BindAction
  39.  
  40. --This function will trigger the events that have been :Connect()'ed
  41. local function TriggerEvent(self,ev,...)
  42. for _,f in pairs(self[ev].Functions) do
  43. f(...)
  44. end
  45. end
  46. FakeMouse.TriggerEvent = TriggerEvent
  47. UIS.TriggerEvent = TriggerEvent
  48.  
  49. --Client communication
  50. local Event = Instance.new("RemoteEvent")
  51. Event.Name = "UserInput_Event"
  52. Event.OnServerEvent:Connect(function(plr,io)
  53. if plr~=RealPlayer then return end
  54. FakeMouse.Target = io.Target
  55. FakeMouse.Hit = io.Hit
  56. if not io.isMouse then
  57. local b = io.UserInputState == Enum.UserInputState.Begin
  58. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  59. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  60. end
  61. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  62. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  63. end
  64. for _,t in pairs(CAS.Actions) do
  65. for _,k in pairs(t.Keys) do
  66. if k==io.KeyCode then
  67. t.Function(t.Name,io.UserInputState,io)
  68. end
  69. end
  70. end
  71. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  72. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  73. end
  74. end)
  75. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  76. local Mouse = owner:GetMouse()
  77. local UIS = game:GetService("UserInputService")
  78. local input = function(io,RobloxHandled)
  79. if RobloxHandled then return end
  80. --Since InputObject is a client-side instance, we create and pass table instead
  81. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  82. end
  83. UIS.InputBegan:Connect(input)
  84. UIS.InputEnded:Connect(input)
  85.  
  86. local h,t
  87. --Give the server mouse data every second frame, but only if the values changed
  88. --If player is not moving their mouse, client won't fire events
  89. local HB = game:GetService("RunService").Heartbeat
  90. while true do
  91. if h~=Mouse.Hit or t~=Mouse.Target then
  92. h,t=Mouse.Hit,Mouse.Target
  93. Event:FireServer({isMouse=true,Target=t,Hit=h})
  94. end
  95. --Wait 2 frames
  96. for i=1,2 do
  97. HB:Wait()
  98. end
  99. end]==],script)
  100.  
  101. ----Sandboxed game object that allows the usage of client-side methods and services
  102. --Real game object
  103. local RealGame = game
  104.  
  105. --Metatable for fake service
  106. local FakeService_Metatable = {
  107. __index = function(self,k)
  108. local s = rawget(self,"_RealService")
  109. if s then
  110. return typeof(s[k])=="function"
  111. and function(_,...)return s[k](s,...)end or s[k]
  112. end
  113. end,
  114. __newindex = function(self,k,v)
  115. local s = rawget(self,"_RealService")
  116. if s then s[k]=v end
  117. end
  118. }
  119. local function FakeService(t,RealService)
  120. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  121. return setmetatable(t,FakeService_Metatable)
  122. end
  123.  
  124. --Fake game object
  125. local FakeGame = {
  126. GetService = function(self,s)
  127. return rawget(self,s) or RealGame:GetService(s)
  128. end,
  129. Players = FakeService({
  130. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  131. },"Players"),
  132. UserInputService = FakeService(UIS,"UserInputService"),
  133. ContextActionService = FakeService(CAS,"ContextActionService"),
  134. RunService = FakeService({
  135. _btrs = {},
  136. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  137. BindToRenderStep = function(self,name,_,fun)
  138. self._btrs[name] = self.Heartbeat:Connect(fun)
  139. end,
  140. UnbindFromRenderStep = function(self,name)
  141. self._btrs[name]:Disconnect()
  142. end,
  143. },"RunService")
  144. }
  145. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  146. FakeGame.service = FakeGame.GetService
  147. FakeService(FakeGame,game)
  148. --Changing owner to fake player object to support owner:GetMouse()
  149. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  150. end
  151. plr = game.Players.LocalPlayer
  152. wait(1)
  153. for i,v in next, game.Players.LocalPlayer.Character:GetChildren() do
  154. if v:IsA("Accessory") then
  155. v:Remove()
  156. end
  157. end
  158. wait(1)
  159. local creeper = false
  160. local db = true
  161. mouse = plr:GetMouse()
  162. function Hurt()
  163. local sound = Instance.new("Sound", plr.Character.Torso)
  164. local math = math.random(1,3)
  165. sound.SoundId = "rbxassetid://535690488"
  166. if math == 1 then
  167. sound.PlaybackSpeed = 1
  168. end
  169. if math == 2 then
  170. sound.PlaybackSpeed = 0.8
  171. end
  172. if math == 3 then
  173. sound.PlaybackSpeed = 1.2
  174. end
  175. sound:Play()
  176. plr.Character.Humanoid.Health = plr.Character.Humanoid.Health - 10
  177. plr.Character.Head.BrickColor = BrickColor.new("Really red")
  178. plr.Character.Torso.BrickColor = BrickColor.new("Really red")
  179. plr.Character["Right Arm"].BrickColor = BrickColor.new("Really red")
  180. plr.Character["Left Arm"].BrickColor = BrickColor.new("Really red")
  181. plr.Character["Right Leg"].BrickColor = BrickColor.new("Really red")
  182. plr.Character["Left Leg"].BrickColor = BrickColor.new("Really red")
  183. wait(0.3)
  184. plr.Character.Head.BrickColor = BrickColor.new("Deep orange")
  185. plr.Character.Torso.BrickColor = BrickColor.new("Cyan")
  186. plr.Character["Right Arm"].BrickColor = BrickColor.new("Deep orange")
  187. plr.Character["Left Arm"].BrickColor = BrickColor.new("Deep orange")
  188. plr.Character["Right Leg"].BrickColor = BrickColor.new("Really blue")
  189. plr.Character["Left Leg"].BrickColor = BrickColor.new("Really blue")
  190. end
  191. function Creeper()
  192. creeper = true
  193. plr.Character.Humanoid.WalkSpeed = 25
  194. local sound = Instance.new("Sound", plr.Character.Torso)
  195. sound.SoundId = "rbxassetid://3750554538"
  196. sound:Play()
  197. plr.Character["Left Arm"]:Destroy()
  198. plr.Character["Right Arm"]:Destroy()
  199. plr.Character.Head.BrickColor = BrickColor.new("Lime green")
  200. plr.Character.Torso.BrickColor = BrickColor.new("Lime green")
  201. plr.Character["Right Leg"].BrickColor = BrickColor.new("Lime green")
  202. plr.Character["Left Leg"].BrickColor = BrickColor.new("Lime green")
  203. plr.Character.Head.Mesh:Destroy()
  204. end
  205. function Explode()
  206. local explosion = Instance.new("Explosion", plr.Character.Torso)
  207. explosion.Position = plr.Character.Torso.Position
  208. end
  209. function Nuke()
  210. plr.Character.Head.BrickColor = BrickColor.new("Really red")
  211. plr.Character.Torso.BrickColor = BrickColor.new("Really red")
  212. plr.Character["Right Leg"].BrickColor = BrickColor.new("Really red")
  213. plr.Character["Left Leg"].BrickColor = BrickColor.new("Really red")
  214. plr.Character.Humanoid.WalkSpeed = 0
  215. wait(3)
  216. local explosion = Instance.new("Explosion", plr.Character.Torso)
  217. explosion.Position = plr.Character.Torso.Position
  218. local explosion = Instance.new("Explosion", plr.Character.Torso)
  219. explosion.Position = plr.Character.Torso.Position
  220. end
  221. mouse.KeyDown:connect(function(k)
  222. if creeper == false then
  223. if k == "e" then
  224. Hurt()
  225. end
  226. end
  227. if k == "m" then
  228. Creeper()
  229. end
  230. if creeper == true then
  231. if k == "z" then
  232. Explode()
  233. end
  234. end
  235. if creeper == true then
  236. if k == "x" then
  237. Nuke()
  238. end
  239. end
  240. end)
  241. plr.Character.Head.BrickColor = BrickColor.new("Deep orange")
  242. plr.Character.Torso.BrickColor = BrickColor.new("Cyan")
  243. plr.Character["Right Arm"].BrickColor = BrickColor.new("Deep orange")
  244. plr.Character["Left Arm"].BrickColor = BrickColor.new("Deep orange")
  245. plr.Character["Right Leg"].BrickColor = BrickColor.new("Really blue")
  246. plr.Character["Left Leg"].BrickColor = BrickColor.new("Really blue")
  247. plr.Character.Humanoid.WalkSpeed = 11
  248. plr.Character.Humanoid.JumpPower = 40
  249.  
  250. local user = game.Players.LocalPlayer.Backpack
  251. local sword = Instance.new("Tool",user)
  252. local handle = Instance.new("Part",sword)
  253. local mesh = Instance.new("SpecialMesh",handle)
  254. mesh.VertexColor = Vector3.new(0,0,255)
  255. local DAMAGE = 100
  256. local sound = Instance.new("Sound",handle)
  257. local sound2 = Instance.new("Sound",handle)
  258. sword.Name = "Sword"
  259. script.Parent = sword
  260. script.Name = "SwordScript"
  261. --local animation = Instance.new("Animation",script)
  262.  
  263. --animation.AnimationId = "http://www.roblox.com/Asset?ID=992817684"
  264.  
  265. sound.SoundId = "rbxasset://sounds//swordlunge.wav"
  266. sound.Volume = 3
  267. sound.PlaybackSpeed = 1.17
  268. sound.Name = "Slash"
  269. sound2.SoundId = "rbxasset://sounds//unsheath.wav"
  270. sound2.Volume = 3
  271. sound2.PlaybackSpeed = 0.8
  272. sound2.Volume = 3
  273. sound2.Name = "Unsheath"
  274.  
  275. function unsheathanimation()
  276. sword.GripPos = sword.GripPos + Vector3.new(0,5,0)
  277. for i = 1,5 do
  278. sword.GripPos = sword.GripPos + Vector3.new(0,-1,0)
  279. wait (0.1)
  280. end
  281. end
  282.  
  283. function unsheathsound()
  284. sound2:Play()
  285. end
  286.  
  287. function damage(hit)
  288.  
  289. local h = hit.Parent:FindFirstChild("Humanoid")
  290. if (h ~= nil) then
  291. h:TakeDamage(DAMAGE / 4)
  292. end
  293. end
  294.  
  295. function animate()
  296. --4
  297. sound:Play()
  298. for i = 1,5 do
  299. sword.GripUp = sword.GripUp + Vector3.new(0,0,1)
  300. wait (0)
  301. end
  302. sword.GripUp = sword.GripUp + Vector3.new(0,0,-1)
  303. end
  304. handle.Size = handle.Size + Vector3.new(-4,-1,-2)
  305. handle.Size = handle.Size + Vector3.new(0.6, 3.6, 0.4)
  306. handle.Name = "Handle"
  307.  
  308. mesh.MeshType = "FileMesh"
  309. mesh.MeshId = "http://www.roblox.com/asset/?id=94746028"
  310. mesh.TextureId = "http://www.roblox.com/asset/?ID=94746105"
  311. mesh.Offset = mesh.Offset + Vector3.new(0,1,0)
  312.  
  313. sword.Equipped:connect(unsheathanimation)
  314. sword.Equipped:connect(unsheathsound)
  315. wait(sound2.TimeLength)
  316. sword.Activated:connect(animate)
  317. handle.Touched:connect(damage)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement