SHOW:
|
|
- or go back to the newest paste.
| 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,game,owner = owner,game | |
| 3 | local RealPlayer = Player | |
| 4 | do | |
| 5 | print("FE Compatibility code by Mokiros")
| |
| 6 | local rp = RealPlayer | |
| 7 | script.Parent = rp.Character | |
| 8 | ||
| 9 | --RemoteEvent for communicating | |
| 10 | local Event = Instance.new("RemoteEvent")
| |
| 11 | Event.Name = "UserInput_Event" | |
| 12 | ||
| 13 | --Fake event to make stuff like Mouse.KeyDown work | |
| 14 | local function fakeEvent() | |
| 15 | local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
| |
| 16 | t.connect = t.Connect | |
| 17 | return t | |
| 18 | end | |
| 19 | ||
| 20 | --Creating fake input objects with fake variables | |
| 21 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
| |
| 22 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
| |
| 23 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
| |
| 24 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
| |
| 25 | end} | |
| 26 | --Merged 2 functions into one by checking amount of arguments | |
| 27 | CAS.UnbindAction = CAS.BindAction | |
| 28 | ||
| 29 | --This function will trigger the events that have been :Connect()'ed | |
| 30 | local function te(self,ev,...) | |
| 31 | local t = m[ev] | |
| 32 | if t and t._fakeEvent then | |
| 33 | for _,f in pairs(t.Functions) do | |
| 34 | f(...) | |
| 35 | end | |
| 36 | end | |
| 37 | end | |
| 38 | m.TrigEvent = te | |
| 39 | UIS.TrigEvent = te | |
| 40 | ||
| 41 | Event.OnServerEvent:Connect(function(plr,io) | |
| 42 | if plr~=rp then return end | |
| 43 | m.Target = io.Target | |
| 44 | m.Hit = io.Hit | |
| 45 | if not io.isMouse then | |
| 46 | local b = io.UserInputState == Enum.UserInputState.Begin | |
| 47 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 48 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
| 49 | end | |
| 50 | if io.UserInputType == Enum.UserInputType.MouseButton2 then | |
| 51 | return m:TrigEvent(b and "Button2Down" or "Button2Up") | |
| 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 | local Mouse = Player:GetMouse() | |
| 68 | local UIS = game:GetService("UserInputService")
| |
| 69 | local input = function(io,a) | |
| 70 | if a then return end | |
| 71 | --Since InputObject is a client-side instance, we create and pass table instead | |
| 72 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
| |
| 73 | end | |
| 74 | UIS.InputBegan:Connect(input) | |
| 75 | UIS.InputEnded:Connect(input) | |
| 76 | local h,t | |
| 77 | --Give the server mouse data 30 times every second, but only if the values changed | |
| 78 | --If player is not moving their mouse, client won't fire events | |
| 79 | while wait(1/30) do | |
| 80 | if h~=Mouse.Hit or t~=Mouse.Target then | |
| 81 | h,t=Mouse.Hit,Mouse.Target | |
| 82 | Event:FireServer({isMouse=true,Target=t,Hit=h})
| |
| 83 | end | |
| 84 | end]==],Player.Character) | |
| 85 | ||
| 86 | ----Sandboxed game object that allows the usage of client-side methods and services | |
| 87 | --Real game object | |
| 88 | local _rg = game | |
| 89 | ||
| 90 | --Metatable for fake service | |
| 91 | local fsmt = {
| |
| 92 | __index = function(self,k) | |
| 93 | local s = rawget(self,"_RealService") | |
| 94 | if s then | |
| 95 | return typeof(s[k])=="function" | |
| 96 | and function(_,...)return s[k](s,...)end or s[k] | |
| 97 | end | |
| 98 | end, | |
| 99 | __newindex = function(self,k,v) | |
| 100 | local s = rawget(self,"_RealService") | |
| 101 | if s then s[k]=v end | |
| 102 | end | |
| 103 | } | |
| 104 | local function FakeService(t,RealService) | |
| 105 | t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService | |
| 106 | return setmetatable(t,fsmt) | |
| 107 | end | |
| 108 | ||
| 109 | --Fake game object | |
| 110 | local g = {
| |
| 111 | GetService = function(self,s) | |
| 112 | return rawget(self,s) or _rg:GetService(s) | |
| 113 | end, | |
| 114 | Players = FakeService({
| |
| 115 | LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
| |
| 116 | },"Players"), | |
| 117 | UserInputService = FakeService(UIS,"UserInputService"), | |
| 118 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
| 119 | RunService = FakeService({
| |
| 120 | _btrs = {},
| |
| 121 | RenderStepped = _rg:GetService("RunService").Heartbeat,
| |
| 122 | BindToRenderStep = function(self,name,_,fun) | |
| 123 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
| 124 | end, | |
| 125 | UnbindFromRenderStep = function(self,name) | |
| 126 | self._btrs[name]:Disconnect() | |
| 127 | end, | |
| 128 | },"RunService") | |
| 129 | } | |
| 130 | rawset(g.Players,"localPlayer",g.Players.LocalPlayer) | |
| 131 | g.service = g.GetService | |
| 132 | FakeService(g,game) | |
| 133 | --Changing owner to fake player object to support owner:GetMouse() | |
| 134 | game,owner = g,g.Players.LocalPlayer | |
| 135 | end | |
| 136 | script.Parent = workspace.CurrentCamera | |
| 137 | local plr = game:GetService("Players").LocalPlayer
| |
| 138 | ||
| 139 | local tool = Instance.new("Tool",plr:WaitForChild("Backpack"))
| |
| 140 | tool.Grip = CFrame.new(0,-0.2,-1.6) * CFrame.Angles(math.rad(100),math.rad(180),math.rad(0)) | |
| 141 | tool.Name = "bluE" | |
| 142 | ||
| 143 | local part = Instance.new("Part",tool)
| |
| 144 | part.Name = "Handle" | |
| 145 | part.Size = Vector3.new(4,6,4) | |
| 146 | part.TopSurface = "Smooth" | |
| 147 | part.BottomSurface = "Smooth" | |
| 148 | part.CanCollide = false | |
| 149 | part:BreakJoints() | |
| 150 | ||
| 151 | local mesh = Instance.new("SpecialMesh",part)
| |
| 152 | mesh.MeshId = "rbxassetid://24342877" --mesh.MeshId = "rbxassetid://132920499" | |
| 153 | mesh.TextureId = "rbxassetid://139521211" --"http://www.roblox.com/asset/?id=134479421" | |
| 154 | mesh.Scale = Vector3.new(2,2,2) | |
| 155 | ||
| 156 | local sound = Instance.new("Sound",part)
| |
| 157 | sound.SoundId = "rbxassetid://148862502" | |
| 158 | sound.Volume = 10 | |
| 159 | ||
| 160 | local sound2 = Instance.new("Sound",part)
| |
| 161 | sound2.SoundId = "rbxassetid://280667448" | |
| 162 | sound2.Volume = 5 | |
| 163 | ||
| 164 | local sound3 = Instance.new("Sound",part)
| |
| 165 | sound3.SoundId = "rbxassetid://198973822" | |
| 166 | sound3.Volume = 10 | |
| 167 | ||
| 168 | local sound4 = Instance.new("Sound",part)
| |
| 169 | sound4.SoundId = "rbxassetid://258057783" | |
| 170 | sound4.Volume = 10 | |
| 171 | ||
| 172 | local sound5 = Instance.new("Sound",part)
| |
| 173 | sound5.SoundId = "rbxassetid://130932305" | |
| 174 | sound5.Volume = 10 | |
| 175 | ||
| 176 | local sound6 = Instance.new("Sound",part)
| |
| 177 | sound6.SoundId = "rbxassetid://906084456" | |
| 178 | sound6.Volume = 10 | |
| 179 | sound6.TimePosition = 2 | |
| 180 | ||
| 181 | function firstHum(target) | |
| 182 | for i,v in pairs(target:GetChildren()) do | |
| 183 | if v:IsA("Humanoid") then
| |
| 184 | return v | |
| 185 | end | |
| 186 | end | |
| 187 | return nil | |
| 188 | end | |
| 189 | ||
| 190 | local slap = false | |
| 191 | local cd = false | |
| 192 | ||
| 193 | plr:GetMouse().Button1Down:connect(function() | |
| 194 | if tool.Parent == plr.Character then | |
| 195 | if slap == false then | |
| 196 | slap = true | |
| 197 | sound2:Play() | |
| 198 | local str = Instance.new("StringValue")
| |
| 199 | str.Name = "toolanim" | |
| 200 | str.Value = "Slash" | |
| 201 | str.Parent = tool | |
| 202 | wait(1) | |
| 203 | slap = false | |
| 204 | end | |
| 205 | end | |
| 206 | end) | |
| 207 | ||
| 208 | part.Touched:connect(function(hit) | |
| 209 | if slap == true then | |
| 210 | if cd == false then | |
| 211 | if not hit:IsDescendantOf(plr.Character) then | |
| 212 | if hit.Parent:IsA("Model") then
| |
| 213 | local fhum = firstHum(hit.Parent) | |
| 214 | if fhum then | |
| 215 | cd = true | |
| 216 | fhum.PlatformStand = true | |
| 217 | sound:Play() | |
| 218 | local con1 | |
| 219 | con1 = game:GetService("RunService").Heartbeat:connect(function()
| |
| 220 | fhum.PlatformStand = true | |
| 221 | end) | |
| 222 | wait(0.1) | |
| 223 | local vel = Instance.new("BodyVelocity",hit)
| |
| 224 | vel.Velocity = ((hit.Position - plr.Character:WaitForChild("HumanoidRootPart").Position).unit + Vector3.new(0,0.5,0))*50
| |
| 225 | - | vel.MaxForce = Vector3.new(10000000,10000000,10000000) |
| 225 | + | end |
| 226 | - | wait(1) |
| 226 | + | local function makeballlimb(attachone, attachtwo, upperang, lowang, twist) |
| 227 | - | cd = false |
| 227 | + | local constraint = Instance.new("BallSocketConstraint", humanoid.Parent)
|
| 228 | - | vel:Destroy() |
| 228 | + | constraint.Attachment0 = attachone |
| 229 | - | local vel2 = Instance.new("BodyVelocity",hit)
|
| 229 | + | constraint.Attachment1 = attachtwo |
| 230 | - | vel2.Velocity = Vector3.new(0,12.5,0) |
| 230 | + | constraint.LimitsEnabled = true |
| 231 | - | vel2.MaxForce = Vector3.new(10000000,10000000,10000000) |
| 231 | + | constraint.TwistLimitsEnabled = true |
| 232 | - | local p2 = Instance.new("Part",hit)
|
| 232 | + | constraint.TwistLowerAngle = lowang |
| 233 | - | p2.Anchored = true |
| 233 | + | constraint.TwistUpperAngle = upperang |
| 234 | - | p2.Transparency = 0.6 |
| 234 | + | constraint.UpperAngle = twist |
| 235 | - | p2.CanCollide = false |
| 235 | + | end |
| 236 | - | p2.Size = Vector3.new(0.2,0.2,0.2) |
| 236 | + | local function makehingelimb(attachone, attachtwo, upperang, lowang) |
| 237 | - | p2.CFrame = CFrame.new(hit.CFrame.p) * CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)) |
| 237 | + | local constraint = Instance.new("HingeConstraint", humanoid.Parent)
|
| 238 | - | p2.BrickColor = BrickColor.new("New Yeller")
|
| 238 | + | constraint.Attachment0 = attachone |
| 239 | - | p2.Material = "Neon" |
| 239 | + | constraint.Attachment1 = attachtwo |
| 240 | - | local m2 = Instance.new("CylinderMesh",p2)
|
| 240 | + | constraint.LimitsEnabled = true |
| 241 | - | m2.Scale = Vector3.new(60,10000,60) |
| 241 | + | constraint.LowerAngle = lowang |
| 242 | - | local scln = sound3:Clone() |
| 242 | + | constraint.UpperAngle = upperang |
| 243 | - | scln.Parent = hit |
| 243 | + | end |
| 244 | - | scln:Play() |
| 244 | + | for i,v in pairs(humanoid.Parent:GetChildren()) do --scan player |
| 245 | - | local con2 |
| 245 | + | if v.ClassName == "Accessory" then |
| 246 | - | con2 = game:GetService("RunService").Heartbeat:connect(function()
|
| 246 | + | local findhandle = v:findFirstChild("Handle") --finding handle in accesorry
|
| 247 | - | p2.CFrame = CFrame.new(hit.CFrame.p) * CFrame.Angles(math.rad(0),math.rad(90),math.rad(0)) |
| 247 | + | if findhandle then |
| 248 | local attach = findhandle:findFirstChildOfClass("Attachment")
| |
| 249 | - | wait(7) |
| 249 | + | for q,w in pairs(humanoid.Parent:GetChildren()) do --scan player |
| 250 | - | vel2.Velocity = Vector3.new(0,0,0) |
| 250 | + | if w.Name == "UpperTorso" or w.Name == "Head" then |
| 251 | - | wait(0.5) |
| 251 | + | attach1 = w:findFirstChild(attach.Name) --finding attachment in head/uppertorso |
| 252 | - | scln:Stop() |
| 252 | + | end |
| 253 | - | local scln3 = sound5:Clone() |
| 253 | + | end |
| 254 | - | scln3.Parent = hit |
| 254 | + | if attach and attach1 then |
| 255 | - | scln3:Play() |
| 255 | + | local constraint = Instance.new("HingeConstraint", humanoid.Parent) --making fake weld
|
| 256 | - | wait(1) |
| 256 | + | constraint.Attachment0 = attach |
| 257 | - | local bav = Instance.new("BodyAngularVelocity",hit)
|
| 257 | + | constraint.Attachment1 = attach1 |
| 258 | - | bav.AngularVelocity = Vector3.new(math.random(0,360),math.random(0,360),math.random(0,360)) |
| 258 | + | constraint.LimitsEnabled = true |
| 259 | - | vel2.Velocity = Vector3.new(0,-250,0) |
| 259 | + | constraint.LowerAngle = 0 |
| 260 | - | p2.BrickColor = BrickColor.new("Really red")
|
| 260 | + | constraint.UpperAngle = 0 |
| 261 | - | local scln6 = sound6:Clone() |
| 261 | + | end |
| 262 | - | scln6.Parent = hit |
| 262 | + | end |
| 263 | - | scln6:Play() |
| 263 | + | end |
| 264 | - | local continue = false |
| 264 | + | end |
| 265 | - | local htc |
| 265 | + | if humanoid.Parent:findFirstChild("Head") and humanoid.Parent:findFirstChild("UpperTorso") then
|
| 266 | - | htc = hit.Touched:connect(function(hitp) |
| 266 | + | local attachment = Instance.new("Attachment", humanoid.Parent.Head)
|
| 267 | - | if not hitp:IsDescendantOf(hit.Parent) then |
| 267 | + | attachment.Position = Vector3.new(0, -0.5, 0) |
| 268 | - | continue = true |
| 268 | + | attachment.Name = "lol" |
| 269 | - | scln6:Stop() |
| 269 | + | attachment.Visible = false |
| 270 | - | vel2:Destroy() |
| 270 | + | humanoid.Parent.UpperTorso.NeckAttachment.Visible = false |
| 271 | - | con2:Disconnect() |
| 271 | + | humanoid.Parent.UpperTorso.NeckAttachment.Position = humanoid.Parent.UpperTorso.NeckAttachment.Position + Vector3.new(0,0,0) |
| 272 | - | con1:Disconnect() |
| 272 | + | local ball = Instance.new("BallSocketConstraint", humanoid.Parent)
|
| 273 | - | htc:Disconnect() |
| 273 | + | ball.Attachment0 = humanoid.Parent.UpperTorso.NeckAttachment |
| 274 | - | p2:Destroy() |
| 274 | + | ball.Attachment1 = attachment |
| 275 | - | end |
| 275 | + | ball.LimitsEnabled = true |
| 276 | ball.TwistLimitsEnabled = true | |
| 277 | - | repeat wait() until continue == true |
| 277 | + | ball.UpperAngle = 40 |
| 278 | - | local ctab = {}
|
| 278 | + | ball.Restitution = 0.5 |
| 279 | - | for i=1,4 do |
| 279 | + | ball.TwistUpperAngle = 40 |
| 280 | - | local p = Instance.new("Part",hit)
|
| 280 | + | ball.TwistLowerAngle = -40 |
| 281 | - | p.Size = Vector3.new(30,30,30) |
| 281 | + | local collidepartofleftleg = Instance.new("Part", humanoid.Parent.UpperTorso)
|
| 282 | - | p.Anchored = true |
| 282 | + | collidepartofleftleg.Name = "Bone" |
| 283 | - | p.CanCollide = false |
| 283 | + | collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7) |
| 284 | - | p.TopSurface = "Smooth" |
| 284 | + | collidepartofleftleg.Transparency = 1 |
| 285 | - | p.BottomSurface = "Smooth" |
| 285 | + | collidepartofleftleg:BreakJoints() |
| 286 | - | p.Color = Color3.fromRGB(255,math.random(0,255),0) |
| 286 | + | local weeld = Instance.new("Weld", collidepartofleftleg)
|
| 287 | - | p.CFrame = hit.CFrame |
| 287 | + | weeld.Part0 = collidepartofleftleg |
| 288 | - | local con |
| 288 | + | weeld.Part1 = humanoid.Parent["Head"] |
| 289 | - | con = game:GetService("RunService").Heartbeat:connect(function()
|
| 289 | + | if humanoid.Parent.Head:findFirstChild("Neck") then
|
| 290 | - | p.CFrame = p.CFrame * CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360))) |
| 290 | + | humanoid.Parent.Head.Neck:destroy() |
| 291 | - | p.Transparency = p.Transparency + 0.01 |
| 291 | + | end |
| 292 | - | if p.Transparency >= 1 then |
| 292 | + | if humanoid.Parent.Head:findFirstChild("face") then
|
| 293 | - | con:Disconnect() |
| 293 | + | humanoid.Parent.Head.face.Texture = "http://www.roblox.com/asset/?id=810245460" |
| 294 | - | end |
| 294 | + | end |
| 295 | - | end) |
| 295 | + | end |
| 296 | - | table.insert(ctab,con) |
| 296 | + | local LeftUpperLeg = humanoid.Parent:findFirstChild("LeftUpperLeg")
|
| 297 | - | end |
| 297 | + | local LeftLowerLeg = humanoid.Parent:findFirstChild("LeftLowerLeg")
|
| 298 | - | Instance.new("Explosion",workspace).Position = hit.Position
|
| 298 | + | -- |
| 299 | - | local scln2 = sound4:Clone() |
| 299 | + | local RightUpperLeg = humanoid.Parent:findFirstChild("RightUpperLeg")
|
| 300 | - | scln2.Parent = hit |
| 300 | + | local RightLowerLeg = humanoid.Parent:findFirstChild("RightLowerLeg")
|
| 301 | - | scln2:Play() |
| 301 | + | -- |
| 302 | - | vel2:Destroy() |
| 302 | + | local RightUpperArm = humanoid.Parent:findFirstChild("RightUpperArm")
|
| 303 | - | hit.Parent:BreakJoints() |
| 303 | + | local RightLowerArm = humanoid.Parent:findFirstChild("RightLowerArm")
|
| 304 | - | repeat wait() until not hit:IsDescendantOf(workspace) |
| 304 | + | -- |
| 305 | - | con2:Disconnect() |
| 305 | + | local LeftUpperArm = humanoid.Parent:findFirstChild("LeftUpperArm")
|
| 306 | local LeftLowerArm = humanoid.Parent:findFirstChild("LeftLowerArm")
| |
| 307 | --Foot & Hands-- | |
| 308 | ||
| 309 | local LeftFoot = humanoid.Parent:findFirstChild("LeftFoot")
| |
| 310 | local RightFoot = humanoid.Parent:findFirstChild("RightFoot")
| |
| 311 | - | end) |
| 311 | + | -- |
| 312 | local LeftHand = humanoid.Parent:findFirstChild("LeftHand")
| |
| 313 | local RightHand = humanoid.Parent:findFirstChild("RightHand")
| |
| 314 | ||
| 315 | --END-- | |
| 316 | --TORSOS-- | |
| 317 | ||
| 318 | local UpperTorso = humanoid.Parent:findFirstChild("UpperTorso")
| |
| 319 | local LowerTorso = humanoid.Parent:findFirstChild("LowerTorso")
| |
| 320 | ||
| 321 | --END-- | |
| 322 | if LowerTorso then | |
| 323 | if LeftUpperLeg then | |
| 324 | makeballlimb(LowerTorso["LeftHipRigAttachment"], LeftUpperLeg["LeftHipRigAttachment"], 50,-50, 90) | |
| 325 | end | |
| 326 | if RightUpperLeg then | |
| 327 | makeballlimb(LowerTorso["RightHipRigAttachment"], RightUpperLeg["RightHipRigAttachment"], 50,-50, 90) | |
| 328 | end | |
| 329 | if LeftLowerLeg then | |
| 330 | makehingelimb(LeftUpperLeg["LeftKneeRigAttachment"], LeftLowerLeg["LeftKneeRigAttachment"], 0,-90) | |
| 331 | end | |
| 332 | if RightLowerLeg then | |
| 333 | makehingelimb(RightUpperLeg["RightKneeRigAttachment"], RightLowerLeg["RightKneeRigAttachment"], 0,-90) | |
| 334 | end | |
| 335 | if LeftFoot then | |
| 336 | makehingelimb(LeftLowerLeg["LeftAnkleRigAttachment"], LeftFoot["LeftAnkleRigAttachment"], 30, -30) | |
| 337 | end | |
| 338 | if RightFoot then | |
| 339 | makehingelimb(RightLowerLeg["RightAnkleRigAttachment"], RightFoot["RightAnkleRigAttachment"], 30, -30) | |
| 340 | end | |
| 341 | if UpperTorso then | |
| 342 | makehingelimb(UpperTorso["WaistRigAttachment"], LowerTorso["WaistRigAttachment"], 30, -30) | |
| 343 | end | |
| 344 | end | |
| 345 | if UpperTorso then | |
| 346 | local vel = Instance.new("BodyVelocity", UpperTorso)
| |
| 347 | vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge) | |
| 348 | vel.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 10 | |
| 349 | game.Debris:AddItem(vel, 0.1) | |
| 350 | local hitsound = Instance.new("Sound", UpperTorso)
| |
| 351 | hitsound.SoundId = "http://www.roblox.com/asset/?id=148862502" | |
| 352 | hitsound:Play() | |
| 353 | hitsound.Volume = math.random(5,10) | |
| 354 | local canhit = true | |
| 355 | local hitval = 15 | |
| 356 | local uptor = humanoid.Parent.UpperTorso | |
| 357 | if RightUpperArm then | |
| 358 | makeballlimb(RightUpperArm["RightShoulderRigAttachment"], UpperTorso["RightShoulderRigAttachment"], 90,-50, 180) | |
| 359 | end | |
| 360 | if RightLowerArm then | |
| 361 | makehingelimb(RightLowerArm["RightElbowRigAttachment"], RightUpperArm["RightElbowRigAttachment"], 0,-90) | |
| 362 | end | |
| 363 | if RightHand then | |
| 364 | makehingelimb(RightHand["RightWristRigAttachment"], RightLowerArm["RightWristRigAttachment"], 30,30) | |
| 365 | end | |
| 366 | if LeftUpperArm then | |
| 367 | makeballlimb(LeftUpperArm["LeftShoulderRigAttachment"], UpperTorso["LeftShoulderRigAttachment"], 90,-50, 180) | |
| 368 | end | |
| 369 | if LeftLowerArm then | |
| 370 | makehingelimb(LeftLowerArm["LeftElbowRigAttachment"], LeftUpperArm["LeftElbowRigAttachment"], 0,-90) | |
| 371 | end | |
| 372 | if LeftHand then | |
| 373 | makehingelimb(LeftHand["LeftWristRigAttachment"], LeftLowerArm["LeftWristRigAttachment"], 30,30) | |
| 374 | end | |
| 375 | end | |
| 376 | else | |
| 377 | humanoid.Parent.Archivable = true | |
| 378 | humanoid.PlatformStand = true | |
| 379 | local clone = humanoid.Parent:Clone() | |
| 380 | clone.Parent = workspace | |
| 381 | game.Debris:AddItem(clone, 60) | |
| 382 | for i,v in pairs(clone:GetChildren()) do | |
| 383 | if v.ClassName == "Script" or v.ClassName == "LocalScript" then | |
| 384 | v:Remove() | |
| 385 | end | |
| 386 | for i,p in pairs(v:GetChildren()) do | |
| 387 | if p.ClassName == "Weld" or p.ClassName == "Motor6D" or p.ClassName == "BodyVelocity" then | |
| 388 | p:Remove() | |
| 389 | end | |
| 390 | end | |
| 391 | end | |
| 392 | for i,t in pairs(humanoid.Parent:GetChildren()) do | |
| 393 | if t.ClassName == "Accessory" or t.ClassName == "ForceField" then | |
| 394 | t:Remove() | |
| 395 | end | |
| 396 | end | |
| 397 | local vel = Instance.new("BodyVelocity", clone.Torso)
| |
| 398 | vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge) | |
| 399 | vel.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 15 | |
| 400 | game.Debris:AddItem(vel, 0.1) | |
| 401 | local hitsound = Instance.new("Sound", clone.Torso)
| |
| 402 | hitsound.SoundId = "http://www.roblox.com/asset/?id=148862502" | |
| 403 | hitsound:Play() | |
| 404 | hitsound.Volume = math.random(5,10) | |
| 405 | vel = Instance.new("BodyVelocity", clone.Torso)
| |
| 406 | vel.Velocity = clone.Torso.CFrame.lookVector * -5 | |
| 407 | vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge) | |
| 408 | using = false | |
| 409 | hit = Instance.new("Sound", clone.Torso)
| |
| 410 | hit.SoundId = "rbxassetid://260430060" | |
| 411 | hit.Volume = 0 | |
| 412 | hit1 = Instance.new("Sound", clone.Torso)
| |
| 413 | hit1.SoundId = "rbxassetid://138087186" | |
| 414 | hit1.Volume = 0 | |
| 415 | hit2 = Instance.new("Sound", clone.Torso)
| |
| 416 | hit2.SoundId = "rbxassetid://131237241" | |
| 417 | hit2.Volume = 0 | |
| 418 | hit3 = Instance.new("Sound", clone.Torso)
| |
| 419 | hit3.SoundId = "rbxassetid://278062209" | |
| 420 | hit3.Volume = 0 | |
| 421 | hit3.TimePosition = 0.33 | |
| 422 | ded = Instance.new("Sound", clone.Torso)
| |
| 423 | ded.SoundId = "rbxassetid://418892870" | |
| 424 | ded.Volume = 0 | |
| 425 | local leftarm = clone:findFirstChild("Left Arm")
| |
| 426 | local rightrm = clone:findFirstChild("Right Arm")
| |
| 427 | local leftleg = clone:findFirstChild("Left Leg")
| |
| 428 | local rightleg = clone:findFirstChild("Right Leg")
| |
| 429 | local head = clone:findFirstChild("Head")
| |
| 430 | for i, g in pairs(humanoid.Parent:GetChildren()) do | |
| 431 | if g.ClassName == "Part" then | |
| 432 | g:destroy() | |
| 433 | end | |
| 434 | end | |
| 435 | for i, h in pairs(humanoid.Parent:GetChildren()) do | |
| 436 | if h.ClassName == "Accesory" then | |
| 437 | h:destroy() | |
| 438 | end | |
| 439 | end | |
| 440 | for z,x in pairs(clone:GetChildren()) do | |
| 441 | if x.ClassName == "Accessory" then | |
| 442 | local handle = x:findFirstChild("Handle")
| |
| 443 | if handle then | |
| 444 | local attachment = handle:findFirstChildOfClass("Attachment")
| |
| 445 | if attachment then | |
| 446 | for q,w in pairs(clone:GetChildren()) do | |
| 447 | if w.Name == "Torso" or w.Name == "Head" then | |
| 448 | local anotherone = w:findFirstChild(attachment.Name) | |
| 449 | if attachment and anotherone then | |
| 450 | local constraint = Instance.new("HingeConstraint", clone) --making fake weld
| |
| 451 | constraint.Attachment0 = attachment | |
| 452 | constraint.Attachment1 = anotherone | |
| 453 | constraint.LimitsEnabled = true | |
| 454 | constraint.LowerAngle = 0 | |
| 455 | constraint.UpperAngle = 0 | |
| 456 | end | |
| 457 | end | |
| 458 | end | |
| 459 | end | |
| 460 | end | |
| 461 | end | |
| 462 | end | |
| 463 | if head and clone.Torso:findFirstChild("NeckAttachment") then
| |
| 464 | local attachment = Instance.new("Attachment", clone.Head)
| |
| 465 | attachment.Position = Vector3.new(0, -0.5, 0) | |
| 466 | attachment.Name = "lol" | |
| 467 | attachment.Visible = false | |
| 468 | clone.Torso.NeckAttachment.Visible = false | |
| 469 | clone.Torso.NeckAttachment.Position = clone.Torso.NeckAttachment.Position + Vector3.new(0,0,0) | |
| 470 | local ball = Instance.new("BallSocketConstraint", clone)
| |
| 471 | ball.Attachment0 = clone.Torso.NeckAttachment | |
| 472 | ball.Attachment1 = attachment | |
| 473 | ball.LimitsEnabled = true | |
| 474 | ball.TwistLimitsEnabled = true | |
| 475 | ball.UpperAngle = 90 | |
| 476 | ball.Restitution = 0.5 | |
| 477 | ball.TwistUpperAngle = 90 | |
| 478 | ball.TwistLowerAngle = -90 | |
| 479 | local collidepartofleftleg = Instance.new("Part", clone.Torso)
| |
| 480 | collidepartofleftleg.Name = "Bone" | |
| 481 | collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7) | |
| 482 | collidepartofleftleg.Transparency = 1 | |
| 483 | collidepartofleftleg:BreakJoints() | |
| 484 | local weeld = Instance.new("Weld", collidepartofleftleg)
| |
| 485 | weeld.Part0 = collidepartofleftleg | |
| 486 | weeld.Part1 = clone["Head"] | |
| 487 | end | |
| 488 | if leftleg ~= nil then | |
| 489 | leftleg:BreakJoints() | |
| 490 | local glue = Instance.new("Glue", clone.Torso)
| |
| 491 | glue.Part0 = clone.Torso | |
| 492 | glue.Part1 = leftleg | |
| 493 | glue.Name = "Left leg" | |
| 494 | local collider = Instance.new("Part", leftleg)
| |
| 495 | collider.Position = Vector3.new(0,999,0) | |
| 496 | collider.Size = Vector3.new(1.5, 1, 1) | |
| 497 | collider.Shape = "Cylinder" | |
| 498 | local weld = Instance.new("Weld", collider)
| |
| 499 | weld.Part0 = leftleg | |
| 500 | weld.Part1 = collider | |
| 501 | weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2) | |
| 502 | collider.TopSurface = "Smooth" | |
| 503 | collider.BottomSurface = "Smooth" | |
| 504 | collider.formFactor = "Symmetric" | |
| 505 | glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 506 | glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 507 | collider.Transparency = 1 | |
| 508 | end | |
| 509 | ------------ | |
| 510 | if rightleg ~= nil then | |
| 511 | rightleg:BreakJoints() | |
| 512 | local glue1 = Instance.new("Glue", clone.Torso)
| |
| 513 | glue1.Part0 = clone.Torso | |
| 514 | glue1.Part1 = rightleg | |
| 515 | glue1.Name = "Right leg" | |
| 516 | local collider1 = Instance.new("Part", rightleg)
| |
| 517 | collider1.Position = Vector3.new(0,999,0) | |
| 518 | collider1.Size = Vector3.new(1.5, 1, 1) | |
| 519 | collider1.Shape = "Cylinder" | |
| 520 | local weld1 = Instance.new("Weld", collider1)
| |
| 521 | weld1.Part0 = rightleg | |
| 522 | weld1.Part1 = collider1 | |
| 523 | weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2) | |
| 524 | collider1.TopSurface = "Smooth" | |
| 525 | collider1.BottomSurface = "Smooth" | |
| 526 | collider1.formFactor = "Symmetric" | |
| 527 | glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 528 | glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 529 | collider1.Transparency = 1 | |
| 530 | end | |
| 531 | ------------ | |
| 532 | if rightrm ~= nil then | |
| 533 | rightrm:BreakJoints() | |
| 534 | rightrm.CFrame = clone.Torso.CFrame * CFrame.new(1.7,0,0) | |
| 535 | local glue11 = Instance.new("Glue", clone.Torso)
| |
| 536 | glue11.Part0 = clone.Torso | |
| 537 | glue11.Part1 = rightrm | |
| 538 | glue11.Name = "Right shoulder" | |
| 539 | local collider11 = Instance.new("Part", rightrm)
| |
| 540 | collider11.Position = Vector3.new(0,9999,0) | |
| 541 | collider11.Size = Vector3.new(1.5,1,1) | |
| 542 | collider11.Shape = "Cylinder" | |
| 543 | local weld11 = Instance.new("Weld", collider11)
| |
| 544 | weld11.Part0 = rightrm | |
| 545 | weld11.Part1 = collider11 | |
| 546 | weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2) | |
| 547 | collider11.TopSurface = "Smooth" | |
| 548 | collider11.BottomSurface = "Smooth" | |
| 549 | collider11.formFactor = "Symmetric" | |
| 550 | glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
| 551 | glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
| 552 | collider11.Transparency = 1 | |
| 553 | end | |
| 554 | ------------ | |
| 555 | if leftarm ~= nil then | |
| 556 | leftarm.CFrame = clone.Torso.CFrame * CFrame.new(-1.7,0,0) | |
| 557 | leftarm:BreakJoints() | |
| 558 | local glue111 = Instance.new("Glue", clone.Torso)
| |
| 559 | glue111.Part0 = clone.Torso | |
| 560 | glue111.Part1 = leftarm | |
| 561 | glue111.Name = "Left shoulder" | |
| 562 | local collider111 = Instance.new("Part", leftarm)
| |
| 563 | collider111.Position = Vector3.new(0,9999,0) | |
| 564 | collider111.Size = Vector3.new(1.5,1,1) | |
| 565 | collider111.Shape = "Cylinder" | |
| 566 | local weld111 = Instance.new("Weld", collider111)
| |
| 567 | weld111.Part0 = leftarm | |
| 568 | weld111.Part1 = collider111 | |
| 569 | weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2) | |
| 570 | collider111.TopSurface = "Smooth" | |
| 571 | collider111.BottomSurface = "Smooth" | |
| 572 | collider111.formFactor = "Symmetric" | |
| 573 | glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
| 574 | glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
| 575 | collider111.Transparency = 1 | |
| 576 | ---------------- | |
| 577 | sensoring = Instance.new("Part", clone.Torso)
| |
| 578 | sensoring.Size = Vector3.new(1.2,1.1,0.8) | |
| 579 | sensoring.CanCollide = false | |
| 580 | sensoring.Position = clone.Torso.Position | |
| 581 | local welder = Instance.new("Weld", sensoring)
| |
| 582 | welder.Part0 = clone.Torso | |
| 583 | welder.Part1 = sensoring | |
| 584 | welder.C0 = welder.C0 * CFrame.new(0,0,1.05) | |
| 585 | sensoring.Transparency = 1 | |
| 586 | ----------------- | |
| 587 | sensoring1 = Instance.new("Part", clone.Torso)
| |
| 588 | sensoring1.Size = Vector3.new(1.2,1.1,0.8) | |
| 589 | sensoring1.CanCollide = false | |
| 590 | sensoring1.Position = clone.Torso.Position | |
| 591 | local welder1 = Instance.new("Weld", sensoring)
| |
| 592 | welder1.Part0 = clone.Torso | |
| 593 | welder1.Part1 = sensoring1 | |
| 594 | welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05) | |
| 595 | sensoring1.Transparency = 1 | |
| 596 | end | |
| 597 | clone.Name = humanoid.Parent.Name.." (PANNED)" | |
| 598 | ded:Play() | |
| 599 | vel:destroy() | |
| 600 | wait(0.5) | |
| 601 | local function touch() | |
| 602 | if not using then | |
| 603 | using = true | |
| 604 | local Math = math.random(1,4) | |
| 605 | if Math == 1 then | |
| 606 | hit:Play() | |
| 607 | end | |
| 608 | if Math == 2 then | |
| 609 | hit1:Play() | |
| 610 | end | |
| 611 | if Math == 3 then | |
| 612 | hit2:Play() | |
| 613 | end | |
| 614 | if Math == 4 then | |
| 615 | hit3:Play() | |
| 616 | end | |
| 617 | wait(0.1) | |
| 618 | using = false | |
| 619 | end | |
| 620 | end | |
| 621 | sensoring.Touched:connect(touch) | |
| 622 | sensoring1.Touched:connect(touch) | |
| 623 | while true do | |
| 624 | if clone:findFirstChild("Head") then
| |
| 625 | clone.Head.CanCollide = false | |
| 626 | end | |
| 627 | game:GetService("RunService").Stepped:wait()
| |
| 628 | end | |
| 629 | end | |
| 630 | end | |
| 631 | end | |
| 632 | end | |
| 633 | Part0.Touched:connect(hittie) | |
| 634 | function ragdoll() | |
| 635 | game.Players.LocalPlayer.Character.Archivable = true | |
| 636 | clone = game.Players.LocalPlayer.Character:Clone() | |
| 637 | clone.Parent = workspace | |
| 638 | for i,v in pairs(clone:GetChildren()) do | |
| 639 | if v.ClassName == "Script" or v.ClassName == "LocalScript" then | |
| 640 | v:Remove() | |
| 641 | end | |
| 642 | for i,p in pairs(v:GetChildren()) do | |
| 643 | if p.ClassName == "Weld" or p.ClassName == "Motor6D" or p.ClassName == "BodyVelocity" then | |
| 644 | p:Remove() | |
| 645 | end | |
| 646 | end | |
| 647 | end | |
| 648 | for i,t in pairs(game.Players.LocalPlayer.Character:GetChildren()) do | |
| 649 | if t.ClassName == "Accessory" or t.ClassName == "ForceField" then | |
| 650 | t:Remove() | |
| 651 | end | |
| 652 | end | |
| 653 | vel = Instance.new("BodyVelocity", clone.Torso)
| |
| 654 | vel.Velocity = clone.Torso.CFrame.lookVector * -5 | |
| 655 | vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge) | |
| 656 | clone.Head.face.Texture = "http://www.roblox.com/asset/?id=161061608" | |
| 657 | using = false | |
| 658 | hit = Instance.new("Sound", clone.Torso)
| |
| 659 | hit.SoundId = "rbxassetid://260430060" | |
| 660 | hit.Volume = 0 | |
| 661 | hit1 = Instance.new("Sound", clone.Torso)
| |
| 662 | hit1.SoundId = "rbxassetid://138087186" | |
| 663 | hit1.Volume = 0 | |
| 664 | hit2 = Instance.new("Sound", clone.Torso)
| |
| 665 | hit2.SoundId = "rbxassetid://131237241" | |
| 666 | hit2.Volume = 0 | |
| 667 | hit3 = Instance.new("Sound", clone.Torso)
| |
| 668 | hit3.SoundId = "rbxassetid://278062209" | |
| 669 | hit3.Volume = 0 | |
| 670 | hit3.TimePosition = 0.33 | |
| 671 | ded = Instance.new("Sound", clone.Torso)
| |
| 672 | ded.SoundId = "rbxassetid://337800380" | |
| 673 | ded.Volume = 5 | |
| 674 | local leftarm = clone:findFirstChild("Left Arm")
| |
| 675 | local rightrm = clone:findFirstChild("Right Arm")
| |
| 676 | local leftleg = clone:findFirstChild("Left Leg")
| |
| 677 | local rightleg = clone:findFirstChild("Right Leg")
| |
| 678 | local head = clone:findFirstChild("Head")
| |
| 679 | for i, g in pairs(game.Players.LocalPlayer.Character:GetChildren()) do | |
| 680 | if g.ClassName == "Part" then | |
| 681 | g:destroy() | |
| 682 | end | |
| 683 | end | |
| 684 | for i, h in pairs(game.Players.LocalPlayer.Character:GetChildren()) do | |
| 685 | if h.ClassName == "Accesory" then | |
| 686 | h:destroy() | |
| 687 | end | |
| 688 | end | |
| 689 | game.Workspace.CurrentCamera.CameraSubject = head | |
| 690 | if head then | |
| 691 | local attachment = Instance.new("Attachment", clone.Head)
| |
| 692 | attachment.Position = Vector3.new(0, -0.5, 0) | |
| 693 | attachment.Name = "lol" | |
| 694 | attachment.Visible = false | |
| 695 | clone.Torso.NeckAttachment.Visible = false | |
| 696 | clone.Torso.NeckAttachment.Position = clone.Torso.NeckAttachment.Position + Vector3.new(0,0,0) | |
| 697 | local ball = Instance.new("BallSocketConstraint", clone)
| |
| 698 | ball.Attachment0 = clone.Torso.NeckAttachment | |
| 699 | ball.Attachment1 = attachment | |
| 700 | ball.LimitsEnabled = true | |
| 701 | ball.TwistLimitsEnabled = true | |
| 702 | ball.UpperAngle = 90 | |
| 703 | ball.Restitution = 0.5 | |
| 704 | ball.TwistUpperAngle = 90 | |
| 705 | ball.TwistLowerAngle = -90 | |
| 706 | local collidepartofleftleg = Instance.new("Part", clone.Torso)
| |
| 707 | collidepartofleftleg.Name = "Bone" | |
| 708 | collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7) | |
| 709 | collidepartofleftleg.Transparency = 1 | |
| 710 | collidepartofleftleg:BreakJoints() | |
| 711 | local weeld = Instance.new("Weld", collidepartofleftleg)
| |
| 712 | weeld.Part0 = collidepartofleftleg | |
| 713 | weeld.Part1 = clone["Head"] | |
| 714 | end | |
| 715 | if leftleg ~= nil then | |
| 716 | local glue = Instance.new("Glue", clone.Torso)
| |
| 717 | glue.Part0 = clone.Torso | |
| 718 | glue.Part1 = leftleg | |
| 719 | glue.Name = "Left leg" | |
| 720 | local collider = Instance.new("Part", leftleg)
| |
| 721 | collider.Position = Vector3.new(0,999,0) | |
| 722 | collider.Size = Vector3.new(1.5, 1, 1) | |
| 723 | collider.Shape = "Cylinder" | |
| 724 | local weld = Instance.new("Weld", collider)
| |
| 725 | weld.Part0 = leftleg | |
| 726 | weld.Part1 = collider | |
| 727 | weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2) | |
| 728 | collider.TopSurface = "Smooth" | |
| 729 | collider.BottomSurface = "Smooth" | |
| 730 | collider.formFactor = "Symmetric" | |
| 731 | glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 732 | glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 733 | collider.Transparency = 1 | |
| 734 | end | |
| 735 | ------------ | |
| 736 | if rightleg ~= nil then | |
| 737 | local glue1 = Instance.new("Glue", clone.Torso)
| |
| 738 | glue1.Part0 = clone.Torso | |
| 739 | glue1.Part1 = rightleg | |
| 740 | glue1.Name = "Right leg" | |
| 741 | local collider1 = Instance.new("Part", rightleg)
| |
| 742 | collider1.Position = Vector3.new(0,999,0) | |
| 743 | collider1.Size = Vector3.new(1.5, 1, 1) | |
| 744 | collider1.Shape = "Cylinder" | |
| 745 | local weld1 = Instance.new("Weld", collider1)
| |
| 746 | weld1.Part0 = rightleg | |
| 747 | weld1.Part1 = collider1 | |
| 748 | weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2) | |
| 749 | collider1.TopSurface = "Smooth" | |
| 750 | collider1.BottomSurface = "Smooth" | |
| 751 | collider1.formFactor = "Symmetric" | |
| 752 | glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 753 | glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 754 | collider1.Transparency = 1 | |
| 755 | end | |
| 756 | ------------ | |
| 757 | if rightrm ~= nil then | |
| 758 | local glue11 = Instance.new("Glue", clone.Torso)
| |
| 759 | glue11.Part0 = clone.Torso | |
| 760 | glue11.Part1 = rightrm | |
| 761 | glue11.Name = "Right shoulder" | |
| 762 | local collider11 = Instance.new("Part", rightrm)
| |
| 763 | collider11.Position = Vector3.new(0,9999,0) | |
| 764 | collider11.Size = Vector3.new(1.5,1,1) | |
| 765 | collider11.Shape = "Cylinder" | |
| 766 | local weld11 = Instance.new("Weld", collider11)
| |
| 767 | weld11.Part0 = rightrm | |
| 768 | weld11.Part1 = collider11 | |
| 769 | weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2) | |
| 770 | collider11.TopSurface = "Smooth" | |
| 771 | collider11.BottomSurface = "Smooth" | |
| 772 | collider11.formFactor = "Symmetric" | |
| 773 | glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
| 774 | glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
| 775 | collider11.Transparency = 1 | |
| 776 | end | |
| 777 | ------------ | |
| 778 | if leftarm ~= nil then | |
| 779 | local glue111 = Instance.new("Glue", clone.Torso)
| |
| 780 | glue111.Part0 = clone.Torso | |
| 781 | glue111.Part1 = leftarm | |
| 782 | glue111.Name = "Left shoulder" | |
| 783 | local collider111 = Instance.new("Part", leftarm)
| |
| 784 | collider111.Position = Vector3.new(0,9999,0) | |
| 785 | collider111.Size = Vector3.new(1.5,1,1) | |
| 786 | collider111.Shape = "Cylinder" | |
| 787 | local weld111 = Instance.new("Weld", collider111)
| |
| 788 | weld111.Part0 = leftarm | |
| 789 | weld111.Part1 = collider111 | |
| 790 | weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2) | |
| 791 | collider111.TopSurface = "Smooth" | |
| 792 | collider111.BottomSurface = "Smooth" | |
| 793 | collider111.formFactor = "Symmetric" | |
| 794 | glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
| 795 | glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
| 796 | collider111.Transparency = 1 | |
| 797 | ---------------- | |
| 798 | sensoring = Instance.new("Part", clone.Torso)
| |
| 799 | sensoring.Size = Vector3.new(1.2,1.1,0.8) | |
| 800 | sensoring.CanCollide = false | |
| 801 | sensoring.Position = clone.Torso.Position | |
| 802 | local welder = Instance.new("Weld", sensoring)
| |
| 803 | welder.Part0 = clone.Torso | |
| 804 | welder.Part1 = sensoring | |
| 805 | welder.C0 = welder.C0 * CFrame.new(0,0,1.05) | |
| 806 | sensoring.Transparency = 1 | |
| 807 | ----------------- | |
| 808 | sensoring1 = Instance.new("Part", clone.Torso)
| |
| 809 | sensoring1.Size = Vector3.new(1.2,1.1,0.8) | |
| 810 | sensoring1.CanCollide = false | |
| 811 | sensoring1.Position = clone.Torso.Position | |
| 812 | local welder1 = Instance.new("Weld", sensoring)
| |
| 813 | welder1.Part0 = clone.Torso | |
| 814 | welder1.Part1 = sensoring1 | |
| 815 | welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05) | |
| 816 | sensoring1.Transparency = 1 | |
| 817 | end | |
| 818 | clone.Name = game.Players.LocalPlayer.Character.Name.." (DEAD)" | |
| 819 | ded:Play() | |
| 820 | vel:destroy() | |
| 821 | wait(0.2) | |
| 822 | game.Debris:AddItem(clone,60) | |
| 823 | local function touch() | |
| 824 | if not using then | |
| 825 | using = true | |
| 826 | local Math = math.random(1,4) | |
| 827 | if Math == 1 then | |
| 828 | hit:Play() | |
| 829 | end | |
| 830 | if Math == 2 then | |
| 831 | hit1:Play() | |
| 832 | end | |
| 833 | if Math == 3 then | |
| 834 | hit2:Play() | |
| 835 | end | |
| 836 | if Math == 4 then | |
| 837 | hit3:Play() | |
| 838 | end | |
| 839 | wait(0.1) | |
| 840 | using = false | |
| 841 | end | |
| 842 | end | |
| 843 | sensoring.Touched:connect(touch) | |
| 844 | sensoring1.Touched:connect(touch) | |
| 845 | while true do | |
| 846 | clone.Head.CanCollide = false | |
| 847 | game:GetService("RunService").Stepped:wait()
| |
| 848 | end | |
| 849 | end | |
| 850 | ||
| 851 | game.Players.LocalPlayer.Character.Humanoid.Died:connect(ragdoll) | |
| 852 | ||
| 853 | --di ent | |
| 854 | while true do | |
| 855 | if cananimate then | |
| 856 | if game.Players.LocalPlayer.Character.Torso.Velocity.x < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x > 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > 0.5 and cananimate then | |
| 857 | for i = 0.1,0.3 , 0.008 do | |
| 858 | if cananimate and game.Players.LocalPlayer.Character.Torso.Velocity.x < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x > 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > 0.5 and cananimate then | |
| 859 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.53402293, 0.0594797134, 0.144087285, 0.997264206, 0.0707819909, 0.0213012099, -0.0739177391, 0.9549582, 0.287386209, 2.98023224e-08, -0.28817457, 0.957577825),i) | |
| 860 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.54035091, 0.0769848824, -0.170524538, 0.99592495, -0.0847774297, 0.0307573378, 0.090184398, 0.936214805, -0.339659303, 0, 0.341049016, 0.940045416),i) | |
| 861 | game:GetService("RunService").Stepped:wait()
| |
| 862 | end | |
| 863 | end | |
| 864 | for i = 0.1,0.3 , 0.008 do | |
| 865 | if cananimate and game.Players.LocalPlayer.Character.Torso.Velocity.x < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x > 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > 0.5 and cananimate then | |
| 866 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.53173375, 0.0903658867, -0.222393572, 0.997264206, 0.0662034005, -0.0328776538, -0.0739177391, 0.893185973, -0.443570435, 2.98023224e-08, 0.444787204, 0.895636141),i) | |
| 867 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.54079688, 0.0720610619, 0.156226337, 0.99592495, -0.085669145, -0.0281783342, 0.090184398, 0.946062148, 0.311179608, 0, -0.312452823, 0.949932992),i) | |
| 868 | game:GetService("RunService").Stepped:wait()
| |
| 869 | end | |
| 870 | end | |
| 871 | elseif game.Players.LocalPlayer.Character.Torso.Velocity.x > -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x < 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < 0.5 then | |
| 872 | for i = 0,1 , 0.1 do | |
| 873 | if cananimate and game.Players.LocalPlayer.Character.Torso.Velocity.x > -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x < 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < 0.5 and cananimate then | |
| 874 | weld.C0 = weld.C0:lerp(CFrame.new(0.0769970417, -1.17027426, -1.17937994, 0, 0, 1, -0.999999881, 0, 0, 0, -1, 0),i) | |
| 875 | headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 0, 0.962374032, 0, 0.271727562, 0, 1, 0, -0.271727562, 0, 0.962374032),i) | |
| 876 | humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 0.955355227, 0, -0.295459419, 0, 1, 0, 0.295459419, 0, 0.955355227),i) | |
| 877 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.53559077, 0.0383267403, 0, 0.997264206, 0.0739177391, 0, -0.0739177391, 0.997264266, 0, 2.98023224e-08, 1.86264515e-09, 0.999999881),i) | |
| 878 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.54305458, 0.047129631, 2.98023224e-08, 0.99592495, -0.0901843905, 0, 0.090184398, 0.995925009, 0, 0, 0, 0.999999881),i) | |
| 879 | game:GetService("RunService").RenderStepped:wait()
| |
| 880 | end | |
| 881 | end | |
| 882 | end | |
| 883 | end | |
| 884 | wait() | |
| 885 | end |