Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Script do wybuchania w Roblox
- Local Script: local tool = script.Parent
- local function explode(point)
- local e = Instance.new("Explosion")
- e.DestroyJointRadiusPercent = 0 -- Spraw, aby eksplozja była nieśmiertelna --
- e.Position = point
- e.Parent = workspace
- end
- local function onActivated()
- -- Zdobądź humanoida, który aktywował narzędzie --
- local human = tool.Parent.Humanoid
- -- Wezwanie eksploduje z aktualnym punktem, w który wycelowany jest Humanoid --
- explode(human.TargetPoint)
- end
- tool.Activated:Connect(onActivated)
- Local Script: local tool = script.Parent
- local function onTouch(partOther)
- -- Najpierw spróbuj sprawdzić, czy część, której dotknęliśmy, była częścią humanoida --
- local humanOther = partOther.Parent:FindFirstChild("Humanoid")
- -- Zignoruj dotknięcia przez nie-humanoidy --
- if not humanOther then return end
- -- Ignore touches by the Humanoid carrying the sword
- if humanOther.Parent == tool.Parent then return end
- -- Zadaj trochę szkód --
- humanOther:TakeDamage(5) -- Tu wpisz ile chcesz żeby obrażenia dawało --
- end
- -- Uruchom animację ukośnika --
- local function slash()
- -- Default character scripts will listen for a "toolanim" StringValue
- local str = Instance.new("StringValue")
- str.Name = "toolanim"
- str.Value = "Slash" -- try also: Lunge
- str.Parent = tool
- end
- -- Połącz wydarzenia --
- tool.Activated:Connect(slash)
- tool.Handle.Touched:Connect(onTouch)
- Wszystko do tool te script:)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement