sIendytubble

animation sins? (rblx script)

Jun 14th, 2020
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.25 KB | None | 0 0
  1. -- no humanoid is without sin --
  2.  
  3. -- so basically all you can do is click a humanoid
  4. -- and boom
  5. -- they are dead as can be
  6. -- you know that gun in gmod?
  7. -- that shoots white neon balls and bounces off of stuff
  8. -- that one. (sorry i dont know the name of the gun ;-;)
  9. -- the death i chose for this one is that
  10. -- not your character but the humanoid you clicked
  11. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  12. local Player,game,owner = owner,game
  13. local RealPlayer = Player
  14. do
  15. print("FE Compatibility code by Mokiros")
  16. local rp = RealPlayer
  17. script.Parent = rp.Character
  18.  
  19. --RemoteEvent for communicating
  20. local Event = Instance.new("RemoteEvent")
  21. Event.Name = "UserInput_Event"
  22.  
  23. --Fake event to make stuff like Mouse.KeyDown work
  24. local function fakeEvent()
  25. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  26. t.connect = t.Connect
  27. return t
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  33. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  34. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  35. end}
  36. --Merged 2 functions into one by checking amount of arguments
  37. CAS.UnbindAction = CAS.BindAction
  38.  
  39. --This function will trigger the events that have been :Connect()'ed
  40. local function te(self,ev,...)
  41. local t = m[ev]
  42. if t and t._fakeEvent then
  43. for _,f in pairs(t.Functions) do
  44. f(...)
  45. end
  46. end
  47. end
  48. m.TrigEvent = te
  49. UIS.TrigEvent = te
  50.  
  51. Event.OnServerEvent:Connect(function(plr,io)
  52. if plr~=rp then return end
  53. m.Target = io.Target
  54. m.Hit = io.Hit
  55. if not io.isMouse then
  56. local b = io.UserInputState == Enum.UserInputState.Begin
  57. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  58. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  59. end
  60. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  61. return m:TrigEvent(b and "Button2Down" or "Button2Up")
  62. end
  63. for _,t in pairs(CAS.Actions) do
  64. for _,k in pairs(t.Keys) do
  65. if k==io.KeyCode then
  66. t.Function(t.Name,io.UserInputState,io)
  67. end
  68. end
  69. end
  70. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  71. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  72. end
  73. end)
  74. Event.Parent = NLS([==[
  75. local Player = game:GetService("Players").LocalPlayer
  76. local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = Player:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,a)
  80. if a then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86. local h,t
  87. --Give the server mouse data 30 times every second, but only if the values changed
  88. --If player is not moving their mouse, client won't fire events
  89. while wait(1/30) do
  90. if h~=Mouse.Hit or t~=Mouse.Target then
  91. h,t=Mouse.Hit,Mouse.Target
  92. Event:FireServer({isMouse=true,Target=t,Hit=h})
  93. end
  94. end]==],Player.Character)
  95.  
  96. ----Sandboxed game object that allows the usage of client-side methods and services
  97. --Real game object
  98. local _rg = game
  99.  
  100. --Metatable for fake service
  101. local fsmt = {
  102. __index = function(self,k)
  103. local s = rawget(self,"_RealService")
  104. if s then
  105. return typeof(s[k])=="function"
  106. and function(_,...)return s[k](s,...)end or s[k]
  107. end
  108. end,
  109. __newindex = function(self,k,v)
  110. local s = rawget(self,"_RealService")
  111. if s then s[k]=v end
  112. end
  113. }
  114. local function FakeService(t,RealService)
  115. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  116. return setmetatable(t,fsmt)
  117. end
  118.  
  119. --Fake game object
  120. local g = {
  121. GetService = function(self,s)
  122. return rawget(self,s) or _rg:GetService(s)
  123. end,
  124. Players = FakeService({
  125. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  126. },"Players"),
  127. UserInputService = FakeService(UIS,"UserInputService"),
  128. ContextActionService = FakeService(CAS,"ContextActionService"),
  129. RunService = FakeService({
  130. _btrs = {},
  131. RenderStepped = _rg:GetService("RunService").Heartbeat,
  132. BindToRenderStep = function(self,name,_,fun)
  133. self._btrs[name] = self.Heartbeat:Connect(fun)
  134. end,
  135. UnbindFromRenderStep = function(self,name)
  136. self._btrs[name]:Disconnect()
  137. end,
  138. },"RunService")
  139. }
  140. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  141. g.service = g.GetService
  142. FakeService(g,game)
  143. --Changing owner to fake player object to support owner:GetMouse()
  144. game,owner = g,g.Players.LocalPlayer
  145. end
  146. sinner = game.Players.LocalPlayer
  147. mouse = sinner:GetMouse()
  148. char = sinner.Character
  149. Sound0 = Instance.new("Sound")
  150. Sound0.Name = "Ding Sound Effect"
  151. Sound0.Parent = char
  152. Sound0.Pitch = 1.1000000238419
  153. Sound0.PlaybackSpeed = 1.1000000238419
  154. Sound0.SoundId = "rbxassetid://5168204645"
  155. Sound0.Volume = 10
  156. function gmodgunthingxeedee(target)
  157. if target.ClassName == "Model" and not target:FindFirstChild("Sin!") then
  158. sinadder = Instance.new("BoolValue",target)
  159. sinadder.Name = "Sin!"
  160. Sound0:Play()
  161. target:FindFirstChildOfClass("Humanoid").BreakJointsOnDeath = false
  162. target:FindFirstChildOfClass("Humanoid").Health = 0
  163. for i,v in pairs(target:GetChildren()) do
  164. if v.ClassName == "Accessory" or v.ClassName == "Hat" then
  165. for i,handlethingy in pairs(v:GetChildren()) do
  166. if handlethingy.ClassName == "Part" or handlethingy.ClassName == "MeshPart" then
  167. handlethingy.Massless = true
  168. handlethingy.Material = "SmoothPlastic"
  169. handlethingy.Anchored = false
  170. handlethingy.BrickColor = BrickColor.new("Really black")
  171. if handlethingy:FindFirstChildOfClass("SpecialMesh") then
  172. handlethingy:FindFirstChildOfClass("SpecialMesh").TextureId = "rbxassetid://0"
  173. end
  174. flyup = Instance.new("BodyVelocity",handlethingy)
  175. flyup.Velocity = Vector3.new(0,1,0)
  176. end
  177. end
  178. end
  179. end
  180. for i,v in pairs(target:GetChildren()) do
  181. if v:FindFirstChild("Body Colors") then
  182. v:FindFirstChild("Body Colors"):Destroy()
  183. end
  184. if v.ClassName == "Shirt" or v.ClassName == "Pants" or v.ClassName == "ShirtGraphic" then
  185. v:remove()
  186. end
  187. if v.ClassName == "Part" or v.ClassName == "MeshPart" then
  188. v.Anchored = false
  189. for i,v in pairs(v:GetChildren()) do
  190. if v.ClassName == "Decal" or v.ClassName == "Texture" or v.ClassName == "Motor" or v.ClassName == "Motor6D" then
  191. v:Destroy()
  192. end
  193. end
  194. v.Massless = true
  195. v.Material = "SmoothPlastic"
  196. v.BrickColor = BrickColor.new("Really black")
  197. flyup = Instance.new("BodyVelocity",v)
  198. flyup.Velocity = Vector3.new(0,1,0)
  199. end
  200. end
  201. end
  202. end
  203. mouse.Button1Down:Connect(function()
  204. if mouse.Target.Parent:FindFirstChildOfClass("Humanoid") then
  205. gmodgunthingxeedee(mouse.Target.Parent)
  206. end
  207. end)
Add Comment
Please, Sign In to add comment